/part 21 /test adm 0/ 21 /program number stt, szs 10 /if sw1 up hlt /halt after read-in /begin test of adm /similar to test of add clo /clear overflow flip-flop skp i /clo should never skip hlt /big error cla /check add of 0s to 0s dac tmp adm tmp sas tmp /ac should be same as storage hlt sza hlt /error lac pmx /check add of 377777 to 000000 adm tmp sas tmp hlt /error sas pmx hlt /error cla /check add of 000000 to 377777 adm tmp sas tmp hlt /error sas pmx hlt /error dzm tmp /check add of 400000 to 000000 lac nmx adm tmp sas tmp hlt /error sas nmx hlt /error cla /check add of 000000 to 400000 adm tmp sas tmp hlt /error sas nmx hlt /error szo /overflow should be 0 up to now hlt /overflow error lac pmx /add 377777 to 400000 adm tmp sas tmp hlt /error sza /result should be plus 0 hlt /error lac zoz /252525 dac tmp adm tmp sas tmp hlt /error sas ozo /525252 hlt /error szo i /overflow should be on now hlt /overflow error lac ab /125252 dac tmp adm tmp sas tmp hlt /error sas ac /252524 hlt /error lac ons /777777 dac tmp cla adm tmp /check clear of -0 sas tmp hlt /error sza hlt /error szo /overflow should be off hlt /error cma /-0 dac tmp lac ad /1 adm tmp sas tmp hlt /error sas ad hlt /error szo /overflow should be off hlt /error lac ozo /525252 dac tmp lac ons /-0 adm tmp sas tmp hlt /error sas ozo hlt /error lac zoz /252525 dac tmp lac ons /-0 adm tmp sas tmp hlt /error sas zoz hlt /error szo /overflow should be off hlt /error /end of adm test szs 20 /if sense switch 2 up, jmp stt 2 /iterate program jmp 7772 /read in next test program /storage and constants ons, 777777 zro, 000000 pmx, 377777 nmx, 400000 zoz, 252525 ozo, 525252 ab, 125252 ac, 252524 ad, 000001 tmp, 0 /end of program foo, start stt