#config scanner=3 #config heatsinks=2 #config weapon=2 #config armor=1 #config mines=0 #config shield=0 #config engine=4 #def dist #def acc #def turnam mov ax, 1 int 3 mov dx, 64 opo 11, 100 !scan opo 17, dx ;set scanwidth to dx ipo 8, acc ipo 7, ax ;scan cmp ax, 1500 ;find? jae !nothing jbe !found ;found something goto !found !nothing mov turnam, 16 mpy turnam, acc opo 14, turnam cmp dx, 64 ;is scanwidth 64? jeq !flip ;yes then flip jbe !widen ;no then widen !flip ;flip scanarc opo 12, 128 ;rotate 128 jmp !scan ;scan !widen shl dx, 1 jmp !scan !found opo 11, 100 cmp dx, 16 jbe !fire ipo 8, bx mov fx, dx div fx, 4 mpy bx, fx opo 12, bx jmp !move !fire ipo 8, bx mov fx, dx div fx, 2 mpy bx, fx opo 12, bx jmp !heatcheck !heatcheck ipo 2, ax cmp ax, 150 jbe !mega cmp ax, 200 jbe !overburnlarge cmp ax, 220 jbe !large cmp ax, 240 jbe !overburnsmall cmp ax, 260 jbe !small cmp ax, 275 jbe !single jmp !move !mega opo 18, 1 opo 15, 0 opo 15, -1 opo 15, 1 opo 15, 0 opo 15, 0 opo 18, 0 jmp !tighten !overburnlarge opo 18, 1 opo 15, 0 opo 15, 0 opo 15, 1 opo 15, -1 opo 18, 0 jmp !tighten !large cmp dx, 2 jbe !small opo 15, 0 opo 15, 0 opo 15, 1 opo 15, -1 jmp !tighten !overburnsmall opo 18, 1 opo 15, 0 opo 15, 0 opo 18, 0 jmp !tighten !small opo 15, 0 opo 15, 0 jmp !tighten !single opo 15, 0 jmp !tighten !tighten cmp dx, 1 jbe !scan shr dx, 1 jmp !scan !move opo 11, 100 int 2 err fx cmp fx, 900 jgr !bottom cmp fx, 100 jls !top cmp ex, 100 jls !left cmp ex, 900 jgr !right jmp !rand !bottom mov ax, @1 mov bx, 0 sub bx, ax opo 14, bx jmp !tighten !top mov ax, @1 mov bx, 128 sub bx, ax opo 14, bx jmp !tighten !left mov ax, @1 mov bx, 64 sub bx, ax opo 14, bx jmp !tighten !right mov ax, @1 mov bx, 191 sub bx, ax opo 14, bx jmp !tighten !rand jmp !move2 !move2 opo 11, 100 ipo 4, ax cmp ax, 128 jls !moveneg jgr !movepos jeq !moveequ !moveneg opo 14, 16 jmp !tighten !movepos opo 14, -16 jmp !tighten !moveequ jmp !heatcheck