Here is the program:
STZ 1
ENNX 1
STX 1(0:1)
SLAX 1
ENNA 1
INCX 1
ENT1 1
SRC 1
ADD 1
DEC1 -1
STZ 1
CMPA 1
MOVE -1,1(1)
NUM 1
CHAR 1
HLT 1
What I know so far:
- STZ 1 sets the next instruction to NOP so the second instruction can be ignored
- According to the answer - the ADD function should trigger the overflow.
- The ADD function should add the contents of Memory 1 to Register A
Memory 1 is set to zero with the first command - the ADD function should simply add zero to Register A.
If Mem1 is set to zero how does this set the overflow toggle to on?
REF: The Art of Computer Programming Volume 1 Page 142 Question 18