Writing a program in assembly to print two characters from input, by first comparing them and printing the one with the larger ASCII code first. I wrote what makes sense to me, but the assembler is giving me the error "Duplicate label(R2)". Does anyone have any idea why this wouldn't work?
.orig 3000
GETC
LD R1,R0
GETC
LD R2,R0
NOT R0,R2
ADD R0,R0,#1
ADD R0,R1,R0
BRN #3
OUT R1
OUT R2
BRNZP #2
OUT R2
OUT R1
HALT
.end
Would also add that when I break the code and just take out the lines with R2, it spits out errors for the other registers. It's like the assembler is recognizing the registers as labels.