A token is classified after its quotes have been stripped, so a string literal reading "ADD" looked exactly like the ADD instruction and was assembled as one. It failed with "attempting to assemble outside the Program Segment", a message about a mistake nobody had made. The literal and label checks were already guarded against strings and the instruction check was not. Mnemonics match without regard to case, so "or" and "and" were caught by this too, and those are ordinary enough words to want in a message. Third of its family, after a string beginning with '0' being read as a malformed number and a string in the Program Segment being silently discarded. All three have the same root. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
4 lines
42 B
Plaintext
4 lines
42 B
Plaintext
ADD OR and NOP
|
|
Execution halted.
|
|
[exit 0]
|