; ; Made by hugo ; ONLY A TESTER> ; #config scanner=4 #config weapon=2 #config armor=2 #config engine=2 #config heatsinks=2 #config shield=0 #def turn_rate #def ownangle #def turangle #def expang #def acc #def scanw #def arm #def abc #msg Hello opo 13, 0 ; Port 13 - Set turret to 0 degrees opo 17, 5 ; Port 17 - Set scan arc to 10 degrees. opo 20, 200 ; shutdown level=300'c opo 11, 100 ; set speed to 10 % opo 19, 27 ;set transponder to my lucky number. mov ax, 1 gsb 192 ;set sines. int 3 ;keepshift. ipo 3, ownangle ;make sure ownangle is good. ipo 5, turangle ;make sure turangle is good. opo 22, 15 del 10 opo 22, 30 :1 ipo 7, ax ;scan. cmp ax, 1500 ; compare range to 1500 ja 124 ipo 8, acc ; get acc mov ax, acc shl acc, 1 ; convert to degrees (exagerating slightly). add acc, ax add turangle,acc opo 12, acc ; Port 13 - Set turret off. to face foe degrees ipo 2, ax ; get temp. cmp ax, 150 ; if temp>220 ja 111 ; skip fire int 9 ; get trgt info ;mov ex, [6] err ex shr ex, 4 add ex, 400 mov ax, [ex] mpy ax, fx shr fx, 7 sub ax, 1 opo 15, ax ; fire ;opo 15, -1 ;opo 15, 0 ; fire add ax, 2 opo 15, ax jmp 111 :111 :3 opo 11, 100 ; set speed to 60 % mov abc, 60 ;turn about 160'. This comand is over ridden if no damage ipo 6, ax ;if damage cmp ax, arm ;has increased, jb 1234 ;don't ipo 10, abc ;turn randomly shr abc, 11 ; :1234 add ownangle,abc mov arm, ax ; (set arm to current damage- but only after compare.) ;err arm opo 14, abc ;change real heading. jmp 1 ;search. :10 do 16 :11 add turangle,12 opo 12, 12 ; Port 13 - Set turret off. to rand degrees ipo 7, ax ;scan dist into ax cmp ax, 1500 ; compare range to 1500 ja 12 xor cx, cx :12 loop 11 jmp 3 ; alternative search :15 opo 17, 64 ; Port 17 - Set scan arc to 64 degrees. ipo 7, ax ;scan dist into ax cmp ax, 1500 ; compare range to 1500 ja 16 ; flip & try again if fail. ipo 8, acc ; get acc. shl acc, 5 ;convert acc to degrees add turangle, acc ;move scanner to face thy foe. opo 12, acc ; Port 13 - Set turret off. to rand degrees ;next round :123 opo 17, 28 ; Port 17 - Set scan arc to 64 degrees. ipo 7, ax ;scan dist into ax cmp ax, 1500 ; compare range to 1500 ja 15 ; redo last round if fail. ipo 8, acc ; get acc. shl acc, 4 ;convert acc to degrees add turangle, acc ;move scanner to face thy foe. opo 12, acc ; Port 13 - Set turret off. to rand degrees :124 opo 17, 13 ; Port 17 - Set scan arc to 64 degrees. ipo 7, ax ;scan dist into ax cmp ax, 1500 ; compare range to 1500 ja 123 ; redo last round on fail. ipo 8, acc ; get acc. shl acc, 3 ;convert acc to degrees add turangle, acc ;move scanner to face thy foe. opo 12, acc ; Port 13 - Set turret off. to rand degrees :125 opo 17, 5 ; Port 17 - Set scan arc to 64 degrees. ipo 7, ax ;scan dist into ax cmp ax, 1500 ; compare range to 1500 ja 124 ; redo last round on fail. ipo 8, acc ; get acc. shl acc, 2 ;convert acc to degrees add turangle, acc ;move scanner to face thy foe. opo 12, acc ; Port 13 - Set turret off. to rand degrees ipo 7, ax ; scan dist into ax cmp ax, 1500 ; compare range to 1500 ja 125 ; redo last round on fail. jmp 3 :16 add turangle,128 ;flip scanner opo 12 ,128 ; " " jmp 15 :192 mov @400, 0 ; mov @401, 2 ; mov @402, 3 ; mov @403, 4 ; mov @404, 4 ; mov @405, 3 ; mov @406, 2 mov @407, 0 mov @408, 0 mov @409, -2 mov @410, -3 mov @411, -4 mov @412, -4 mov @413, -3 mov @414, -2 mov @415, 0 ret #END