Examples of error code
1) Error code 1 : undefined label
A label is used by an instruction but the label is not in the symbol table.
eg.)
.ORIG x3000
LEA R0, DATA1
.END
DATA1 is not defined in the assembly code.
2) Error code 2 : invalid instruction
An invalid instruction is one that is not defined in the LC-3b ISA
eg.)
.ORIG x1000
MUL R0, R1, R2
.END
or
.ORIG x1000
ABC
.END
3) Error code 3 : invalid constant
An invalid constant is a constant that is too large to be assembled into an LC-3b instruction. An odd constant that follows .ORIG is also an invalid constant.
eg.)
.ORIG x1000
ADD R0, R1, #20 ; error
.END
or
.ORIG x1001 ; error
ADD R0, R1, #1
.END
4) Error code 4 : errors which do not belong to any of the above categories.
eg.)
.ORIG x1000
ADD R0, R1
.END
or
.ORIG x1000
.FILL
.END
or
.ORIG x1000
NOT R1, R2, R3
.END