ASMB,A,B,L HED ** Light Chaser ** * by Tim Riker ORG 10B ** Light chaser CHAS CLA,CCE A=0,E=1 RL ELA rotate E and A left 1 OTA 1 Write to S LDB DELAY Get delay CMB 2's complement LOOPL INB,SZB Increment B, Skip one if B=0 JMP LOOPL Jump to the delay loop CLE,SZA E=0, Skip one if A=0 JMP RL Rotate left some more CCE Set E RR ERA rotate E and A right 1 OTA 1 Write to S LDB DELAY Get delay CMB 2's complement LOOPR INB,SZB Increment B, Skip one if B=0 JMP LOOPR Jump to the delay loop CLE,SZA E=0, Skip one if A=0 JMP RR Rotate right some more JMP CHAS Rotate left again DELAY OCT 017777 amount to delay ** Too fast Binary Counter COU CLA LPA INA OTA 1 Write to S SZA JMP LPA JMP COU ** Too slow rotate left ROTL CLA Clear A INA SL OTA 1 Write to S RAL CLB COUNT INB SZB JMP COUNT SZA JMP SL JMP ROTL ** Brain dead, too fast, light chaser CHAS2 NOP CLA INA OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAL OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 RAR OTA 1 JMP CHAS2 ** read A from S and halt LIA 1 LOAD (A)=SWITCH REG INA HLT 077B