I am doing a practice exam question.
The Question is
Is there anything wrong in this line of LC3 code? (The starred line)
ADD R3, R3, 0;
**BRNZ ISPOS;**
HALT
.BLKW 250
ISPOS NOT R3, R3 ....
I saw that the starred line is Branch and the condition codes are negative and zero, basically go to label ISPOS if the condition code is negative or zero or halt the program otherwise.
I would say that this line of LC3 code has nothing wrong with it. Does anyone see any problems with it?
Yes, there are a couple different errors with this code segment.
Opcodes cannot have anything other than a label preceding them.
Must become:
You cannot have any random characters after operands, unless they are commented out
Must change to: