; ; XBOT-103 - eXperimental roBOT ; ; Sample robot - by Shaheryar Alam 02/23/99 8:40am #msg Beware Randman! #def turn_rate #def acc #def heat mov turn_rate, 4 opo 17, 4 ; scan arc mov ax, 1 int 3 ; turn keep-shift on :1 ipo p_rand, ax ; get random number and ax, 255 ; fix it to 0 to 255 opo p_abs_turret, ax ; aim turret :2 opo 11, 100 ; throttle 100% opo 14, turn_rate ; turn opo 12, 3 ; rotate turret :21 ipo 7, ax ; scan cmp ax, 1500 ; get anything? jgr 2 ; if not, then scan again ipo 8, acc ; get accuracy from scan opo 12, acc ; rotate turret to face target opo 15, 0 ; Fire! ; opo 15, acc ; Fire! opo 12, acc ; rotate turret to keep facing target ipo 2, heat ; get heat cmp heat, 300 ; check heat jgr 3 ; if hotter then go to 3 jmp 21 ; scan again ;Cool Off :3 opo 14, 90 ; turn ipo 7, ax ; scan ipo 8, acc ; get accuracy from scan shl acc, 1 ; acc = acc * 2 opo 12, acc ; rotate turret to face target opo 14, 5 ; turn opo 11 100 ; throttle 100% ipo 2, heat ; get heat cmp heat, 150 ; check heat jgr 3 ; if hotter go to 3 jmp 2 ; scan again #END