在此问题中,用户只能输入1或2。如果用户输入1,我想创建一组单独的指令,但是如果用户输入2,我想终止程序。
.ORIG x3000
LOOP AND R0, R0, #0
LEA R0, USER1
PUTS
TRAP x23
ADD R0, R0, #-2
BRz OVER ;2-2 will be zero, so end the program
BR LOOP ; here i want to go back to loop just to continue with the instructions
USER1 .STRINGZ "Enter 1 for converting to the Celsius, or 2 for exit"
USER2 .STRINGZ "Good Bye Your Name"
OVER TRAP x25
.end
但是,当我输入2时,它将忽略BRz OVER
,即使它应该为零,它也会继续重复循环。