The whole program, including table, data, and instructions, follows.
Program to Add 1
label address data comment 0000000000000000 0000000000100000 start0000000000001000 0000000000000001 0000000000001001 number to increment 0000000000000010 0000000000000000 answer instr_1 0000000000001000 0000000000000001 from address 0000000000001001 0000000000001100 to address 0000000000001010 0000000000001111 'to' bits to copy to 0000000000001011 0000000000110000 instr.addr.and rot. Instr_2 0000000000001100 0000000001000000 from address 0000000000001101 0000000000000010 to address 0000000000001110 0000000011111111 'to' bits to copy to 0000000000001111 0000000001000000 instr.addr.and rot. Instr_3 0000000000010000 0000000000000000 from address 0000000000010001 0000000000000000 to address 0000000000010010 0000000000000000 'to' bits to copy to 0000000000010011 0000000001000000 instr.addr.and rot. Add1tabl 0000000001000000 0000000000000001 0000000001000001 0000000000000010 0000000001000010 0000000000000011 0000000001000011 0000000000000100 0000000001000100 0000000000000101 0000000001000101 0000000000000110 0000000001000110 0000000000000111 0000000001000111 0000000000001000 0000000001001000 0000000000001001 0000000001001001 0000000000010000After instruction 1 (at 'instr_1') is executed, the memory has the following values. Italics show to where data was copied and arrows show from where data was copied.
After Instruction 1 Has Been Executed
label address data comment 0000000000000000 0000000000110000 <----|start0000000000001000 0000000000000001 0000000000001001 ---| | number to increment 0000000000000010 0000000000000000 | | answer | | instr_1 0000000000001000 0000000000000001 | | from address 0000000000001001 0000000000001100 | | to address 0000000000001010 0000000000001111 | | 'to' bits to copy to 0000000000001011 0000000000110000 ---+-| instr.addr.and rot. instr_2 0000000000001100 0000000001001001 <--| from address 0000000000001101 0000000000000010 to address 0000000000001110 0000000011111111 'to' bits to copy to 0000000000001111 0000000001000000 instr.addr.and rot. instr_3 0000000000010000 0000000000000000 from address 0000000000010001 0000000000000000 to address 0000000000010010 0000000000000000 'to' bits to copy to 0000000000010011 0000000001000000 instr.addr.and rot. add1tabl 0000000001000000 0000000000000001 0000000001000001 0000000000000010 0000000001000010 0000000000000011 0000000001000011 0000000000000100 0000000001000100 0000000000000101 0000000001000101 0000000000000110 0000000001000110 0000000000000111 0000000001000111 0000000000001000 0000000001001000 0000000000001001 0000000001001001 0000000000010000
Page 27
Page 26 . . . Page 1 . . . Page 28