#config scanner=4 #config heatsinks=2 #config weapon=2 mov ax, 1 int 3 mov dx, 64 opo 11, 100 !scan opo 17, dx ;set scanwidth to dx ipo 7, ax ;scan cmp ax, 1500 ;find? jae !nothing ;found nothing goto !move jbe !found ;found something goto !found !nothing opo 14, 128 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 !tighten !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 cmp dx, 4 jae !small opo 18, 1 opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 opo 18, 0 jmp !tighten !overburnlarge cmp dx, 4 jae !small opo 18, 1 opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 opo 18, 0 jmp !tighten !large opo 15, 0 opo 15, 0 opo 15, 0 opo 15, 0 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, 2 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 ipo 10, ax opo 14, ax jmp !tighten