@0 MOV RIGHT,ACC MOV ACC,DOWN MOV ACC,DOWN @1 MOV UP,RIGHT MAIN:MOV UP,RIGHT MOV UP,DOWN MOV RIGHT,ACC MOV ACC,LEFT ADD ACC MOV ACC,DOWN JRO DOWN JMP MAIN @2 MOV LEFT,DOWN MOV UP,ACC MOV ACC,RIGHT ADD ACC MOV ACC,DOWN JMP LOOP MAIN:MOV LEFT,DOWN MOV UP,ACC MOV UP,LEFT MOV ACC,RIGHT ADD ACC MOV ACC,DOWN LOOP:JRO DOWN JMP MAIN @3 MOV LEFT,ACC MOV ACC,DOWN MOV ACC,DOWN @4 MOV UP,ACC LOOP:SUB UP JLZ DONE MOV -1 UP MOV -1 DOWN JMP LOOP DONE:ADD LEFT MOV 1,UP JLZ ADJUST MOV 2,DOWN MOV LEFT,NIL JRO 3 ADJUST:MOV 1,DOWN ADD LEFT MOV ACC,DOWN @5 MOV UP,ACC LOOP:SUB UP JLZ DONE MOV -1 UP MOV -1 DOWN JMP LOOP DONE:ADD RIGHT MOV 1,UP JLZ ADJUST MOV 2,DOWN MOV RIGHT,NIL JRO 3 ADJUST:MOV 1,DOWN ADD RIGHT MOV ACC,DOWN @6 @7 MOV RIGHT,DOWN MAIN:ADD 2 JRO UP SUB 1 SUB 1 MOV RIGHT,DOWN MOV ACC,DOWN MOV UP,RIGHT MOV 0,ACC JMP MAIN @8 ADD 2 JRO UP SUB 1 SUB 1 MOV ACC,LEFT MOV UP,DOWN MAIN:MOV 0,ACC ADD 2 JRO UP SUB 1 SUB 1 MOV ACC,LEFT MOV UP,DOWN MOV LEFT,DOWN JMP MAIN