; Widow, a modified version of TRACON, a ; Sample robot - by Ed T. Toton III 02/24/97, modified by Jude Hungerford #def t #def u #def x #def f #def a #def trg #def trg2 #def col mov t, -1 mov u, 1 mov x, 7 mov f, 0 mov trg, 0 mov trg2, 0 opo 17, 3 ; Scan-arc = 0 not (just a line) :10 opo 11, 100 opo 14, x :20 cmp trg2, 0 jle 30 cmp trg, 0 jgr 25 dec trg2 mov trg, 8 neg x :25 dec trg :30 ipo 12, col ;start wall_collision cmp col, 0 je 32 opo 11, 0 opo 14, 128 ipo 13 ;end wall_collision :32 ipo 7, ax ; Scan cmp ax, 1500 ; Find anything? jls 40 ; If so, shoot! jmp 70 ; If not, continue scans. :40 ipo 2, ax ; check heat cmp ax, 250 ; hotter than 250? jgr 20 ; if so, forget target, continue scan. ipo 8, a add a, a sub a, 2 ;firing sequence opo 15, a ;fire. add a, 4 opo 15, a ;fire. sub a, 2 opo 15, a ;fire. sub a, 1 opo 15, a ;fire. add a, 2 opo 15, a ;fire. ipo 2, ax cmp ax, 210 jgr 45 ;check heat sub a, 1 opo 15, a ;fire. add a, 1 opo 15, a ;fire. sub a, 2 opo 15, a ;fire. add a, 1 opo a, 15 ;fire opo 14, a :45 add t, u cmp t, 1 jgr 60 mov f, 1 mov trg, 15 mov trg2, 3 :50 jmp 20 ; Scan again. :60 neg u jmp 4 :70 cmp f, 1 jne 7 :80 jmp 10