Program to check whether the value in register is even or odd
.ORIG X3000
AND R2,R1,X0001
BRZ EVEN
LEA R0,DEF ;PRINTS ODD IF VALUE IN REGISTER R2 IS 1
PUTS
HALT
EVEN:
LEA R0,ABC ;PRINTS EVEN IF VALUE IN R2 IS 0
PUTS
HALT
ABC .STRINGZ "EVEN"
DEF .STRINGZ "ODD"
.END