#config weapon=1 #config scanner=4 #config mines=1 #config engine=3 #config armor=2 #def busted #def him #def conflag #def caanflag #def howmany mov busted, 0 mov conflag, 0 mov howmany, 0 mov caanflag, 0 mov ax, 1 int 3 !begin mov dx, 64 opo 21, 999 mov bx, 0 !start opo 11, 100 cmp conflag 0 je !connect !collision ipo 1, ax cmp ax 0 ja !go opo 14, 64 opo 11, 100 !info int 16 cmp fx 0 je !scan int 15 mov busted, fx !scan opo 17, dx ipo 7, ex cmp ex 2000 jae !laymines !hunt cmp @5 him je !laymines cmp @5 busted je !caanhim mov ax, @5 int 14 !hunting mov bx, dx mov ax, @3 add ax, 1002 jmp ax :1005 sar bx, 1 opo 12, bx cmp dx 2 jbe !whattodo shr dx, 1 !whattodo cmp caanflag 1 jae !overburn !fire ipo 2, ax cmp ax 80 ja !move opo 15, @3 add @3, 2 opo 15, @3 sub @3, 4 opo 15, @3 add @3, 2 opo 15, @3 opo 15, @3 !move mov bx, @1 ipo 3, ax add ax, @2 cmp ex, 150 jae !turn ipo 10, ax and ax, 48 !turn add ax, 16 and ax 255 sub ax, bx opo 14, ax jmp !start !connect mov conflag, 1 ipo 19, ax int 14 !connect2 int 16 inc bx cmp bx 3 ja !start cmp fx 0 je !connect2 int 15 mov him, fx jmp !start !laymines opo 11, 100 ipo 22, howmany cmp howmany 0 je !widescan opo 22, 15 !widescan opo 11, 100 cmp dx 64 jae !flip shl dx 1 jmp !start !flip opo 12, 128 opo 14, 8 jmp !start !go opo 11, 100 jmp !info !caanhim mov caanflag, 1 jmp !hunting !overburn opo 18, 1 opo 15, @3 opo 15, @3 opo 15, @3 opo 15, @3 opo 15, @3 opo 15, @3 opo 18, 0 mov caanflag, 0 jmp !move :1000 shl bx, 1 mov ax, 0 sub ax, bx mov bx, ax jmp 1005 :1001 mov ax, 0 sub ax, bx mov bx, ax jmp 1005 :1002 mov bx, 0 jmp 1005 :1003 jmp 1005 :1004 shl bx, 1 jmp 1005