Home » Personal collection » Acorn hard disk » files » BallBot » BioBot/6502/AIAss

BioBot/6502/AIAss

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn hard disk » files » BallBot
Filename: BioBot/6502/AIAss
Read OK:
File size: 12DE bytes
Load address: 0000
Exec address: 0000
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
   10 REM Assemble BallBot AI
   20 REM Module (C) Dominic Ford 1997/8
   30 :
   40 REM Setup variables / allocate zero-page bytes
   50 MODE6:HIMEM=&3000:oswrch=&FFEE:osbyte=&FFF4
   60 idle=&81:near=&82:searching=&83:left=&84:right=&85:steer=&86:tending=&87
   70 reving=&88:stage=&89:turbo=&8A:reverse=&8B
   80 freqa=&70:freqb=&71:freqc=&72:freqd=&73:fa=&74:fb=&75:fc=&76:fd=&77
   90 :
  100 REM Start assembly
  110 FORpass=0 TO 3 STEP 3
  120 :
  130 REM Packaging for module
  140 P%=&3000:[OPT pass
  150 LDA#&8C:JSRosbyte \ Select tape to make ADFS free
  160 LDY#0:.text LDAwelcome,Y:CMP#&FF:BEQunzip
  170 JSRoswrch:INY:JMPtext \ Hello World!!
  180 .unzip LDA#(start MOD 256):STA&78:LDA#(start DIV 256):STA&79:LDY#0:STY&7A:LDA#&E:STA&7B:.movlop LDA(&78),Y:STA(&7A),Y:INY:BNEmovlop:INC&79:INC&7B:LDA&7B:CMP#&18:BNEmovlop:JMP&E00 \ Invade ADFS memory
  190 .welcome EQUB 17:EQUB 0:EQUB 17:EQUB 129
  200 EQUS "BallBot AI module 6502 version          "
  210 EQUS "Original   - Dominic Ford Sept-Dec 1997 "
  220 EQUS "Conversion - Dominic Ford Jan 1998      "
  230 EQUB 17:EQUB 1:EQUB 17:EQUB 128:EQUB &FF:.start
  240 ]
  250 :
  260 REM 6502 Artificial Intelligence module for BallBot
  270 :
  280 O%=P%:P%=&E00:[OPT (pass+4)
  290 JMPsetupbb:JMPai \ Entry points
  300 .setupbb LDA#0:STAreving:STAleft:STAright:STAsearching:STAnear:STAsteer:STAstage:STAidle:LDA#1:STAtending:RTS
  310 .ai LDA#0:STAleft:STAright:STAturbo:STAreverse
  320 LDAnear:CMP#0:BEQnotnear:LDAstage:CMP#4:BCSnotnear:JSRdonearstuff
  330 .notnear LDAnear:BNEnotmov:LDAstage:CMP#1:BEQnothunt:CMP#3:BCSnothunt:JSRhunt
  340 .nothunt LDAstage:CMP#4:BCSnotmov:AND#1:BEQnotmov:JSRmoveout
  350 .notmov LDAstage:CMP#4:BNEnotrelease:JSRreleaseb
  360 .notrelease LDA#0:STA&80:LDAleft:AND#1:CLC:ADC&80:STA&80:LDAright:AND#2:CLC:ADC&80:STA&80:LDAturbo:AND#4:CLC:ADC&80:STA&80:LDAidle:AND#8:CLC:ADC&80:STA&80:LDAreverse:AND#16:CLC:ADC&80:STA&80:RTS
  370 .hunt LDAfreqa:CMP#8:BCSnothr1:LDAfa:CMP#ASC"B":BEQnothr1:JMPrevershnt
  380 .nothr1 LDAfreqb:CMP#4:BCSnothr2:LDAfb:CMP#ASC"B":BEQnothr2:JMPrevershnt
  390 .nothr2 LDAfreqc:CMP#4:BCSnothr3:LDAfc:CMP#ASC"B":BEQnothr3
  400 .revershnt LDA#5:STAreving:LDA#&FF:STAreverse:STAturbo:STAleft:STAright:RTS
  410 .nothr3 LDAreving:BEQnothrev:LDAfreqa:CMP#38:BCCconthrev:LDAfreqb:CMP#38:BCCconthrev:LDAfreqc:CMP#38:BCSnothrev
  420 .conthrev DECreving:LDA#&FF:STAturbo:STAleft:STAreverse:RTS
  430 .nothrev LDA#0:STAreving
  440 \ Rotate to face ball (L310)
  450 LDAfb:CMP#ASC"B":BNEnottendl:LDAfreqb:CMP#38:BCCnottendl:LDA#0:STAtending
  460 .nottendl LDAfc:CMP#ASC"B":BNEnottendr:LDAfreqc:CMP#38:BCCnottendr:LDA#1:STAtending:.nottendr
  470 \Pick best ball to aim at
  480 LDAfreqa:LSR A:LSR A:STA&80:ASL A:CLC:ADC&80:PHA:CMPfreqb:BCCnothnl:LDAfb:CMP#ASC"B":BNEnothnl:LDAfc:CMP#ASC"B":BNEhnl:LDAfreqb:CMPfreqc:BCSnothnl:.hnl LDA#&FF:STAleft:STAsteer:PLA:RTS
  490 .nothnl PLA:CMPfreqc:BCCnothnr:LDAfc:CMP#ASC"B":BNEnothnr:LDAfb:CMP#ASC"B":BNEhnr:LDAfreqc:CMPfreqb:BCSnothnr:.hnr LDA#&FF:STAright:LDA#1:STAsteer:RTS
  500 .nothnr LDAfa:CMP#ASC"B":BNEl370:LDX#0:LDAsteer:CMP#1:BEQnofaadd:LDX#&FF:.nofaadd STXleft:LDX#0:CMP#&FF:BEQnofaadd2:LDX#&FF:.nofaadd2 STXright
  510 LDA#0:STAsteer:LDAsearching:LSR A:STAsearching:LDX#0:LDAfreqa:CMP#25:BCCnofaadd3:LDX#&FF:.nofaadd3 STX turbo:RTS
  520 .l370 LDAfb:CMP#ASC"B":BNEl380:LDA#&FF:STAsteer:STAleft:RTS
  530 .l380 LDAfc:CMP#ASC"B":BNEl390:LDA#1:STAsteer:LDA#&FF:STAright:RTS:.l390
  540 \ If no ball in sight, continue rotation
  550 INCsearching:LDA#0:STAsteer:STAturbo:STAsteer:LDAsearching:CMP#6:BCCnotturrot:LDA#&FF:STAturbo:.notturrot LDX#&FF:LDAtending:BEQtend0:STXright:JMPl430:.tend0 STXleft
  560 .l430 LDAsearching:CMP#5:BNEl440:LDAtending:EOR#1:STAtending
  570 .l440 LDAsearching:CMP#50:BCCl450:INCstage:.l450 RTS
  580 RTS
  590 :
  600 .moveout LDAfreqa:CMP#8:BCCmovonet:LDAfreqb:CMP#8:BCCmovonet:LDAfreqc:CMP#8:BCCmovonet:LDAreving:BEQl510:LDAfreqa:CMP#19:BCCmovonet:LDAfreqb:CMP#19:BCCmovonet:LDAfreqc:CMP#19:BCSl510
  610 .movonet LDA#&FF:STAreving:STAreverse:STAleft:STAright:RTS
  620 .l510 LDA#0:STAreving:LDAfa:CMP#ASC"B":BEQgoget:LDAfb:CMP#ASC"B":BEQgoget:LDAfc:CMP#ASC"B":BEQgoget:LDAfd:CMP#ASC"B":BNEl540:.goget DECstage:LDA#44:STAsearching:RTS
  630 .l540 LDAfa:CMP#ASC"N":BEQmovorig:CMP#ASC"P":BNEl560:.movorig LDA#&FF:STAright:RTS
  640 .l560 LDAfb:CMP#ASC"N":BEQl580:CMP#ASC"P":BEQl570:LDA#&FF:STAleft:RTS
  650 .l570 LDAfreqb:CMP#38:BCSl580:LDA#&FF:STAright:LDA#1:STAnear:RTS
  660 .l580 LDA#&FF:STAturbo:STAleft:STAright:RTS
  670 .donearstuff LDAfreqa:CMP#8:BCSl640:LDAfa:CMP#ASC"B":BEQl640:LDA#&FF:STAright:RTS
  680 .l640 LDAnear:CMP#1:BNEl650:LDAfd:CMP#ASC"U":BEQl650:LDA#&FF:STAleft:STAright:RTS
  690 .l650 INCnear:LDA#&FF:STAleft:STAturbo:LDAnear:AND#1:BEQnearl:LDA#&FF:.nearl STAright
  700 LDAnear:CMP#18:BCCnearend:LDA#0:STAnear:STAsearching:INCstage:LDA#1:STAtending:.nearend RTS
  710 .releaseb LDA#&FF:STAleft:STAright:STAreverse:STAturbo:INCnear:LDAnear:CMP#10:BCCnearend:LDA#0:STAnear:LDA#&FF:STAidle:RTS
  720 ]:NEXT
  730 OSCLI "SAVE AI 3000 "+STR$~O%

 � Assemble BallBot AI
% � Module (C) Dominic Ford 1997/8
 :
(1 � Setup variables / allocate zero-page bytes
2) �6:�=&3000:oswrch=&FFEE:osbyte=&FFF4
<M idle=&81:near=&82:searching=&83:left=&84:right=&85:steer=&86:tending=&87
F/ reving=&88:stage=&89:turbo=&8A:reverse=&8B
PH freqa=&70:freqb=&71:freqc=&72:freqd=&73:fa=&74:fb=&75:fc=&76:fd=&77
Z :
d � Start assembly
n �pass=0 � 3 � 3
x :
� � Packaging for module
� P%=&3000:[OPT pass
�6 LDA#&8C:JSRosbyte \ Select tape to make ADFS free
�. LDY#0:.text LDAwelcome,Y:CMP#&FF:BEQunzip
�* JSRoswrch:INY:JMPtext \ Hello World!!
�� .unzip LDA#(start � 256):STA&78:LDA#(start � 256):STA&79:LDY#0:STY&7A:LDA#&E:STA&7B:.movlop LDA(&78),Y:STA(&7A),Y:INY:BNEmovlop:INC&79:INC&7B:LDA&7B:CMP#&18:BNEmovlop:JMP&E00 \ Invade ADFS memory
�- .welcome EQUB 17:EQUB 0:EQUB 17:EQUB 129
�4 EQUS "BallBot AI module 6502 version          "
�4 EQUS "Original   - Dominic Ford Sept-Dec 1997 "
�4 EQUS "Conversion - Dominic Ford Jan 1998      "
�4 EQUB 17:EQUB 1:EQUB 17:EQUB 128:EQUB &FF:.start
� ]
� :
6 � 6502 Artificial Intelligence module for BallBot
 :
  O%=P%:P%=&E00:[OPT (pass+4)
"$ JMPsetupbb:JMPai \ Entry points
,r .setupbb LDA#0:STAreving:STAleft:STAright:STAsearching:STAnear:STAsteer:STAstage:STAidle:LDA#1:STAtending:RTS
63 .ai LDA#0:STAleft:STAright:STAturbo:STAreverse
@F LDAnear:CMP#0:BEQnotnear:LDAstage:CMP#4:BCSnotnear:JSRdonearstuff
JR .notnear LDAnear:BNEnotmov:LDAstage:CMP#1:BEQnothunt:CMP#3:BCSnothunt:JSRhunt
T? .nothunt LDAstage:CMP#4:BCSnotmov:�#1:BEQnotmov:JSRmoveout
^5 .notmov LDAstage:CMP#4:BNEnotrelease:JSRreleaseb
h� .notrelease LDA#0:STA&80:LDAleft:�#1:CLC:ADC&80:STA&80:LDAright:�#2:CLC:ADC&80:STA&80:LDAturbo:�#4:CLC:ADC&80:STA&80:LDAidle:�#8:CLC:ADC&80:STA&80:LDAreverse:�#16:CLC:ADC&80:STA&80:RTS
rI .hunt LDAfreqa:CMP#8:BCSnothr1:LDAfa:CMP#�"B":BEQnothr1:JMPrevershnt
|K .nothr1 LDAfreqb:CMP#4:BCSnothr2:LDAfb:CMP#�"B":BEQnothr2:JMPrevershnt
�> .nothr2 LDAfreqc:CMP#4:BCSnothr3:LDAfc:CMP#�"B":BEQnothr3
�P .revershnt LDA#5:STAreving:LDA#&FF:STAreverse:STAturbo:STAleft:STAright:RTS
�t .nothr3 LDAreving:BEQnothrev:LDAfreqa:CMP#38:BCCconthrev:LDAfreqb:CMP#38:BCCconthrev:LDAfreqc:CMP#38:BCSnothrev
�@ .conthrev DECreving:LDA#&FF:STAturbo:STAleft:STAreverse:RTS
� .nothrev LDA#0:STAreving
�! \ Rotate to face ball (L310)
�L LDAfb:CMP#�"B":BNEnottendl:LDAfreqb:CMP#38:BCCnottendl:LDA#0:STAtending
�` .nottendl LDAfc:CMP#�"B":BNEnottendr:LDAfreqc:CMP#38:BCCnottendr:LDA#1:STAtending:.nottendr
� \Pick best ball to aim at
� LDAfreqa:LSR A:LSR A:STA&80:ASL A:CLC:ADC&80:PHA:CMPfreqb:BCCnothnl:LDAfb:CMP#�"B":BNEnothnl:LDAfc:CMP#�"B":BNEhnl:LDAfreqb:CMPfreqc:BCSnothnl:.hnl LDA#&FF:STAleft:STAsteer:PLA:RTS
� .nothnl PLA:CMPfreqc:BCCnothnr:LDAfc:CMP#�"B":BNEnothnr:LDAfb:CMP#�"B":BNEhnr:LDAfreqc:CMPfreqb:BCSnothnr:.hnr LDA#&FF:STAright:LDA#1:STAsteer:RTS
� .nothnr LDAfa:CMP#�"B":BNEl370:LDX#0:LDAsteer:CMP#1:BEQnofaadd:LDX#&FF:.nofaadd STXleft:LDX#0:CMP#&FF:BEQnofaadd2:LDX#&FF:.nofaadd2 STXright
�u LDA#0:STAsteer:LDAsearching:LSR A:STAsearching:LDX#0:LDAfreqa:CMP#25:BCCnofaadd3:LDX#&FF:.nofaadd3 STX turbo:RTS
> .l370 LDAfb:CMP#�"B":BNEl380:LDA#&FF:STAsteer:STAleft:RTS
K .l380 LDAfc:CMP#�"B":BNEl390:LDA#1:STAsteer:LDA#&FF:STAright:RTS:.l390
- \ If no ball in sight, continue rotation
&� INCsearching:LDA#0:STAsteer:STAturbo:STAsteer:LDAsearching:CMP#6:BCCnotturrot:LDA#&FF:STAturbo:.notturrot LDX#&FF:LDAtending:BEQtend0:STXright:JMPl430:.tend0 STXleft
0? .l430 LDAsearching:CMP#5:BNEl440:LDAtending:�#1:STAtending
:9 .l440 LDAsearching:CMP#50:BCCl450:INCstage:.l450 RTS
D RTS
N :
X� .moveout LDAfreqa:CMP#8:BCCmovonet:LDAfreqb:CMP#8:BCCmovonet:LDAfreqc:CMP#8:BCCmovonet:LDAreving:BEQl510:LDAfreqa:CMP#19:BCCmovonet:LDAfreqb:CMP#19:BCCmovonet:LDAfreqc:CMP#19:BCSl510
b? .movonet LDA#&FF:STAreving:STAreverse:STAleft:STAright:RTS
l� .l510 LDA#0:STAreving:LDAfa:CMP#�"B":BEQgoget:LDAfb:CMP#�"B":BEQgoget:LDAfc:CMP#�"B":BEQgoget:LDAfd:CMP#�"B":BNEl540:.goget DECstage:LDA#44:STAsearching:RTS
vS .l540 LDAfa:CMP#�"N":BEQmovorig:CMP#�"P":BNEl560:.movorig LDA#&FF:STAright:RTS
�F .l560 LDAfb:CMP#�"N":BEQl580:CMP#�"P":BEQl570:LDA#&FF:STAleft:RTS
�E .l570 LDAfreqb:CMP#38:BCSl580:LDA#&FF:STAright:LDA#1:STAnear:RTS
�0 .l580 LDA#&FF:STAturbo:STAleft:STAright:RTS
�T .donearstuff LDAfreqa:CMP#8:BCSl640:LDAfa:CMP#�"B":BEQl640:LDA#&FF:STAright:RTS
�T .l640 LDAnear:CMP#1:BNEl650:LDAfd:CMP#�"U":BEQl650:LDA#&FF:STAleft:STAright:RTS
�X .l650 INCnear:LDA#&FF:STAleft:STAturbo:LDAnear:�#1:BEQnearl:LDA#&FF:.nearl STAright
�` LDAnear:CMP#18:BCCnearend:LDA#0:STAnear:STAsearching:INCstage:LDA#1:STAtending:.nearend RTS
� .releaseb LDA#&FF:STAleft:STAright:STAreverse:STAturbo:INCnear:LDAnear:CMP#10:BCCnearend:LDA#0:STAnear:LDA#&FF:STAidle:RTS
� ]:�
� � "SAVE AI 3000 "+�~O%
�
00000000  0d 00 0a 1a 20 f4 20 41  73 73 65 6d 62 6c 65 20  |.... . Assemble |
00000010  42 61 6c 6c 42 6f 74 20  41 49 0d 00 14 25 20 f4  |BallBot AI...% .|
00000020  20 4d 6f 64 75 6c 65 20  28 43 29 20 44 6f 6d 69  | Module (C) Domi|
00000030  6e 69 63 20 46 6f 72 64  20 31 39 39 37 2f 38 0d  |nic Ford 1997/8.|
00000040  00 1e 06 20 3a 0d 00 28  31 20 f4 20 53 65 74 75  |... :..(1 . Setu|
00000050  70 20 76 61 72 69 61 62  6c 65 73 20 2f 20 61 6c  |p variables / al|
00000060  6c 6f 63 61 74 65 20 7a  65 72 6f 2d 70 61 67 65  |locate zero-page|
00000070  20 62 79 74 65 73 0d 00  32 29 20 eb 36 3a d3 3d  | bytes..2) .6:.=|
00000080  26 33 30 30 30 3a 6f 73  77 72 63 68 3d 26 46 46  |&3000:oswrch=&FF|
00000090  45 45 3a 6f 73 62 79 74  65 3d 26 46 46 46 34 0d  |EE:osbyte=&FFF4.|
000000a0  00 3c 4d 20 69 64 6c 65  3d 26 38 31 3a 6e 65 61  |.<M idle=&81:nea|
000000b0  72 3d 26 38 32 3a 73 65  61 72 63 68 69 6e 67 3d  |r=&82:searching=|
000000c0  26 38 33 3a 6c 65 66 74  3d 26 38 34 3a 72 69 67  |&83:left=&84:rig|
000000d0  68 74 3d 26 38 35 3a 73  74 65 65 72 3d 26 38 36  |ht=&85:steer=&86|
000000e0  3a 74 65 6e 64 69 6e 67  3d 26 38 37 0d 00 46 2f  |:tending=&87..F/|
000000f0  20 72 65 76 69 6e 67 3d  26 38 38 3a 73 74 61 67  | reving=&88:stag|
00000100  65 3d 26 38 39 3a 74 75  72 62 6f 3d 26 38 41 3a  |e=&89:turbo=&8A:|
00000110  72 65 76 65 72 73 65 3d  26 38 42 0d 00 50 48 20  |reverse=&8B..PH |
00000120  66 72 65 71 61 3d 26 37  30 3a 66 72 65 71 62 3d  |freqa=&70:freqb=|
00000130  26 37 31 3a 66 72 65 71  63 3d 26 37 32 3a 66 72  |&71:freqc=&72:fr|
00000140  65 71 64 3d 26 37 33 3a  66 61 3d 26 37 34 3a 66  |eqd=&73:fa=&74:f|
00000150  62 3d 26 37 35 3a 66 63  3d 26 37 36 3a 66 64 3d  |b=&75:fc=&76:fd=|
00000160  26 37 37 0d 00 5a 06 20  3a 0d 00 64 15 20 f4 20  |&77..Z. :..d. . |
00000170  53 74 61 72 74 20 61 73  73 65 6d 62 6c 79 0d 00  |Start assembly..|
00000180  6e 14 20 e3 70 61 73 73  3d 30 20 b8 20 33 20 88  |n. .pass=0 . 3 .|
00000190  20 33 0d 00 78 06 20 3a  0d 00 82 1b 20 f4 20 50  | 3..x. :.... . P|
000001a0  61 63 6b 61 67 69 6e 67  20 66 6f 72 20 6d 6f 64  |ackaging for mod|
000001b0  75 6c 65 0d 00 8c 17 20  50 25 3d 26 33 30 30 30  |ule.... P%=&3000|
000001c0  3a 5b 4f 50 54 20 70 61  73 73 0d 00 96 36 20 4c  |:[OPT pass...6 L|
000001d0  44 41 23 26 38 43 3a 4a  53 52 6f 73 62 79 74 65  |DA#&8C:JSRosbyte|
000001e0  20 5c 20 53 65 6c 65 63  74 20 74 61 70 65 20 74  | \ Select tape t|
000001f0  6f 20 6d 61 6b 65 20 41  44 46 53 20 66 72 65 65  |o make ADFS free|
00000200  0d 00 a0 2e 20 4c 44 59  23 30 3a 2e 74 65 78 74  |.... LDY#0:.text|
00000210  20 4c 44 41 77 65 6c 63  6f 6d 65 2c 59 3a 43 4d  | LDAwelcome,Y:CM|
00000220  50 23 26 46 46 3a 42 45  51 75 6e 7a 69 70 0d 00  |P#&FF:BEQunzip..|
00000230  aa 2a 20 4a 53 52 6f 73  77 72 63 68 3a 49 4e 59  |.* JSRoswrch:INY|
00000240  3a 4a 4d 50 74 65 78 74  20 5c 20 48 65 6c 6c 6f  |:JMPtext \ Hello|
00000250  20 57 6f 72 6c 64 21 21  0d 00 b4 c8 20 2e 75 6e  | World!!.... .un|
00000260  7a 69 70 20 4c 44 41 23  28 73 74 61 72 74 20 83  |zip LDA#(start .|
00000270  20 32 35 36 29 3a 53 54  41 26 37 38 3a 4c 44 41  | 256):STA&78:LDA|
00000280  23 28 73 74 61 72 74 20  81 20 32 35 36 29 3a 53  |#(start . 256):S|
00000290  54 41 26 37 39 3a 4c 44  59 23 30 3a 53 54 59 26  |TA&79:LDY#0:STY&|
000002a0  37 41 3a 4c 44 41 23 26  45 3a 53 54 41 26 37 42  |7A:LDA#&E:STA&7B|
000002b0  3a 2e 6d 6f 76 6c 6f 70  20 4c 44 41 28 26 37 38  |:.movlop LDA(&78|
000002c0  29 2c 59 3a 53 54 41 28  26 37 41 29 2c 59 3a 49  |),Y:STA(&7A),Y:I|
000002d0  4e 59 3a 42 4e 45 6d 6f  76 6c 6f 70 3a 49 4e 43  |NY:BNEmovlop:INC|
000002e0  26 37 39 3a 49 4e 43 26  37 42 3a 4c 44 41 26 37  |&79:INC&7B:LDA&7|
000002f0  42 3a 43 4d 50 23 26 31  38 3a 42 4e 45 6d 6f 76  |B:CMP#&18:BNEmov|
00000300  6c 6f 70 3a 4a 4d 50 26  45 30 30 20 5c 20 49 6e  |lop:JMP&E00 \ In|
00000310  76 61 64 65 20 41 44 46  53 20 6d 65 6d 6f 72 79  |vade ADFS memory|
00000320  0d 00 be 2d 20 2e 77 65  6c 63 6f 6d 65 20 45 51  |...- .welcome EQ|
00000330  55 42 20 31 37 3a 45 51  55 42 20 30 3a 45 51 55  |UB 17:EQUB 0:EQU|
00000340  42 20 31 37 3a 45 51 55  42 20 31 32 39 0d 00 c8  |B 17:EQUB 129...|
00000350  34 20 45 51 55 53 20 22  42 61 6c 6c 42 6f 74 20  |4 EQUS "BallBot |
00000360  41 49 20 6d 6f 64 75 6c  65 20 36 35 30 32 20 76  |AI module 6502 v|
00000370  65 72 73 69 6f 6e 20 20  20 20 20 20 20 20 20 20  |ersion          |
00000380  22 0d 00 d2 34 20 45 51  55 53 20 22 4f 72 69 67  |"...4 EQUS "Orig|
00000390  69 6e 61 6c 20 20 20 2d  20 44 6f 6d 69 6e 69 63  |inal   - Dominic|
000003a0  20 46 6f 72 64 20 53 65  70 74 2d 44 65 63 20 31  | Ford Sept-Dec 1|
000003b0  39 39 37 20 22 0d 00 dc  34 20 45 51 55 53 20 22  |997 "...4 EQUS "|
000003c0  43 6f 6e 76 65 72 73 69  6f 6e 20 2d 20 44 6f 6d  |Conversion - Dom|
000003d0  69 6e 69 63 20 46 6f 72  64 20 4a 61 6e 20 31 39  |inic Ford Jan 19|
000003e0  39 38 20 20 20 20 20 20  22 0d 00 e6 34 20 45 51  |98      "...4 EQ|
000003f0  55 42 20 31 37 3a 45 51  55 42 20 31 3a 45 51 55  |UB 17:EQUB 1:EQU|
00000400  42 20 31 37 3a 45 51 55  42 20 31 32 38 3a 45 51  |B 17:EQUB 128:EQ|
00000410  55 42 20 26 46 46 3a 2e  73 74 61 72 74 0d 00 f0  |UB &FF:.start...|
00000420  06 20 5d 0d 00 fa 06 20  3a 0d 01 04 36 20 f4 20  |. ].... :...6 . |
00000430  36 35 30 32 20 41 72 74  69 66 69 63 69 61 6c 20  |6502 Artificial |
00000440  49 6e 74 65 6c 6c 69 67  65 6e 63 65 20 6d 6f 64  |Intelligence mod|
00000450  75 6c 65 20 66 6f 72 20  42 61 6c 6c 42 6f 74 0d  |ule for BallBot.|
00000460  01 0e 06 20 3a 0d 01 18  20 20 4f 25 3d 50 25 3a  |... :...  O%=P%:|
00000470  50 25 3d 26 45 30 30 3a  5b 4f 50 54 20 28 70 61  |P%=&E00:[OPT (pa|
00000480  73 73 2b 34 29 0d 01 22  24 20 4a 4d 50 73 65 74  |ss+4).."$ JMPset|
00000490  75 70 62 62 3a 4a 4d 50  61 69 20 5c 20 45 6e 74  |upbb:JMPai \ Ent|
000004a0  72 79 20 70 6f 69 6e 74  73 0d 01 2c 72 20 2e 73  |ry points..,r .s|
000004b0  65 74 75 70 62 62 20 4c  44 41 23 30 3a 53 54 41  |etupbb LDA#0:STA|
000004c0  72 65 76 69 6e 67 3a 53  54 41 6c 65 66 74 3a 53  |reving:STAleft:S|
000004d0  54 41 72 69 67 68 74 3a  53 54 41 73 65 61 72 63  |TAright:STAsearc|
000004e0  68 69 6e 67 3a 53 54 41  6e 65 61 72 3a 53 54 41  |hing:STAnear:STA|
000004f0  73 74 65 65 72 3a 53 54  41 73 74 61 67 65 3a 53  |steer:STAstage:S|
00000500  54 41 69 64 6c 65 3a 4c  44 41 23 31 3a 53 54 41  |TAidle:LDA#1:STA|
00000510  74 65 6e 64 69 6e 67 3a  52 54 53 0d 01 36 33 20  |tending:RTS..63 |
00000520  2e 61 69 20 4c 44 41 23  30 3a 53 54 41 6c 65 66  |.ai LDA#0:STAlef|
00000530  74 3a 53 54 41 72 69 67  68 74 3a 53 54 41 74 75  |t:STAright:STAtu|
00000540  72 62 6f 3a 53 54 41 72  65 76 65 72 73 65 0d 01  |rbo:STAreverse..|
00000550  40 46 20 4c 44 41 6e 65  61 72 3a 43 4d 50 23 30  |@F LDAnear:CMP#0|
00000560  3a 42 45 51 6e 6f 74 6e  65 61 72 3a 4c 44 41 73  |:BEQnotnear:LDAs|
00000570  74 61 67 65 3a 43 4d 50  23 34 3a 42 43 53 6e 6f  |tage:CMP#4:BCSno|
00000580  74 6e 65 61 72 3a 4a 53  52 64 6f 6e 65 61 72 73  |tnear:JSRdonears|
00000590  74 75 66 66 0d 01 4a 52  20 2e 6e 6f 74 6e 65 61  |tuff..JR .notnea|
000005a0  72 20 4c 44 41 6e 65 61  72 3a 42 4e 45 6e 6f 74  |r LDAnear:BNEnot|
000005b0  6d 6f 76 3a 4c 44 41 73  74 61 67 65 3a 43 4d 50  |mov:LDAstage:CMP|
000005c0  23 31 3a 42 45 51 6e 6f  74 68 75 6e 74 3a 43 4d  |#1:BEQnothunt:CM|
000005d0  50 23 33 3a 42 43 53 6e  6f 74 68 75 6e 74 3a 4a  |P#3:BCSnothunt:J|
000005e0  53 52 68 75 6e 74 0d 01  54 3f 20 2e 6e 6f 74 68  |SRhunt..T? .noth|
000005f0  75 6e 74 20 4c 44 41 73  74 61 67 65 3a 43 4d 50  |unt LDAstage:CMP|
00000600  23 34 3a 42 43 53 6e 6f  74 6d 6f 76 3a 80 23 31  |#4:BCSnotmov:.#1|
00000610  3a 42 45 51 6e 6f 74 6d  6f 76 3a 4a 53 52 6d 6f  |:BEQnotmov:JSRmo|
00000620  76 65 6f 75 74 0d 01 5e  35 20 2e 6e 6f 74 6d 6f  |veout..^5 .notmo|
00000630  76 20 4c 44 41 73 74 61  67 65 3a 43 4d 50 23 34  |v LDAstage:CMP#4|
00000640  3a 42 4e 45 6e 6f 74 72  65 6c 65 61 73 65 3a 4a  |:BNEnotrelease:J|
00000650  53 52 72 65 6c 65 61 73  65 62 0d 01 68 bd 20 2e  |SRreleaseb..h. .|
00000660  6e 6f 74 72 65 6c 65 61  73 65 20 4c 44 41 23 30  |notrelease LDA#0|
00000670  3a 53 54 41 26 38 30 3a  4c 44 41 6c 65 66 74 3a  |:STA&80:LDAleft:|
00000680  80 23 31 3a 43 4c 43 3a  41 44 43 26 38 30 3a 53  |.#1:CLC:ADC&80:S|
00000690  54 41 26 38 30 3a 4c 44  41 72 69 67 68 74 3a 80  |TA&80:LDAright:.|
000006a0  23 32 3a 43 4c 43 3a 41  44 43 26 38 30 3a 53 54  |#2:CLC:ADC&80:ST|
000006b0  41 26 38 30 3a 4c 44 41  74 75 72 62 6f 3a 80 23  |A&80:LDAturbo:.#|
000006c0  34 3a 43 4c 43 3a 41 44  43 26 38 30 3a 53 54 41  |4:CLC:ADC&80:STA|
000006d0  26 38 30 3a 4c 44 41 69  64 6c 65 3a 80 23 38 3a  |&80:LDAidle:.#8:|
000006e0  43 4c 43 3a 41 44 43 26  38 30 3a 53 54 41 26 38  |CLC:ADC&80:STA&8|
000006f0  30 3a 4c 44 41 72 65 76  65 72 73 65 3a 80 23 31  |0:LDAreverse:.#1|
00000700  36 3a 43 4c 43 3a 41 44  43 26 38 30 3a 53 54 41  |6:CLC:ADC&80:STA|
00000710  26 38 30 3a 52 54 53 0d  01 72 49 20 2e 68 75 6e  |&80:RTS..rI .hun|
00000720  74 20 4c 44 41 66 72 65  71 61 3a 43 4d 50 23 38  |t LDAfreqa:CMP#8|
00000730  3a 42 43 53 6e 6f 74 68  72 31 3a 4c 44 41 66 61  |:BCSnothr1:LDAfa|
00000740  3a 43 4d 50 23 97 22 42  22 3a 42 45 51 6e 6f 74  |:CMP#."B":BEQnot|
00000750  68 72 31 3a 4a 4d 50 72  65 76 65 72 73 68 6e 74  |hr1:JMPrevershnt|
00000760  0d 01 7c 4b 20 2e 6e 6f  74 68 72 31 20 4c 44 41  |..|K .nothr1 LDA|
00000770  66 72 65 71 62 3a 43 4d  50 23 34 3a 42 43 53 6e  |freqb:CMP#4:BCSn|
00000780  6f 74 68 72 32 3a 4c 44  41 66 62 3a 43 4d 50 23  |othr2:LDAfb:CMP#|
00000790  97 22 42 22 3a 42 45 51  6e 6f 74 68 72 32 3a 4a  |."B":BEQnothr2:J|
000007a0  4d 50 72 65 76 65 72 73  68 6e 74 0d 01 86 3e 20  |MPrevershnt...> |
000007b0  2e 6e 6f 74 68 72 32 20  4c 44 41 66 72 65 71 63  |.nothr2 LDAfreqc|
000007c0  3a 43 4d 50 23 34 3a 42  43 53 6e 6f 74 68 72 33  |:CMP#4:BCSnothr3|
000007d0  3a 4c 44 41 66 63 3a 43  4d 50 23 97 22 42 22 3a  |:LDAfc:CMP#."B":|
000007e0  42 45 51 6e 6f 74 68 72  33 0d 01 90 50 20 2e 72  |BEQnothr3...P .r|
000007f0  65 76 65 72 73 68 6e 74  20 4c 44 41 23 35 3a 53  |evershnt LDA#5:S|
00000800  54 41 72 65 76 69 6e 67  3a 4c 44 41 23 26 46 46  |TAreving:LDA#&FF|
00000810  3a 53 54 41 72 65 76 65  72 73 65 3a 53 54 41 74  |:STAreverse:STAt|
00000820  75 72 62 6f 3a 53 54 41  6c 65 66 74 3a 53 54 41  |urbo:STAleft:STA|
00000830  72 69 67 68 74 3a 52 54  53 0d 01 9a 74 20 2e 6e  |right:RTS...t .n|
00000840  6f 74 68 72 33 20 4c 44  41 72 65 76 69 6e 67 3a  |othr3 LDAreving:|
00000850  42 45 51 6e 6f 74 68 72  65 76 3a 4c 44 41 66 72  |BEQnothrev:LDAfr|
00000860  65 71 61 3a 43 4d 50 23  33 38 3a 42 43 43 63 6f  |eqa:CMP#38:BCCco|
00000870  6e 74 68 72 65 76 3a 4c  44 41 66 72 65 71 62 3a  |nthrev:LDAfreqb:|
00000880  43 4d 50 23 33 38 3a 42  43 43 63 6f 6e 74 68 72  |CMP#38:BCCconthr|
00000890  65 76 3a 4c 44 41 66 72  65 71 63 3a 43 4d 50 23  |ev:LDAfreqc:CMP#|
000008a0  33 38 3a 42 43 53 6e 6f  74 68 72 65 76 0d 01 a4  |38:BCSnothrev...|
000008b0  40 20 2e 63 6f 6e 74 68  72 65 76 20 44 45 43 72  |@ .conthrev DECr|
000008c0  65 76 69 6e 67 3a 4c 44  41 23 26 46 46 3a 53 54  |eving:LDA#&FF:ST|
000008d0  41 74 75 72 62 6f 3a 53  54 41 6c 65 66 74 3a 53  |Aturbo:STAleft:S|
000008e0  54 41 72 65 76 65 72 73  65 3a 52 54 53 0d 01 ae  |TAreverse:RTS...|
000008f0  1d 20 2e 6e 6f 74 68 72  65 76 20 4c 44 41 23 30  |. .nothrev LDA#0|
00000900  3a 53 54 41 72 65 76 69  6e 67 0d 01 b8 21 20 5c  |:STAreving...! \|
00000910  20 52 6f 74 61 74 65 20  74 6f 20 66 61 63 65 20  | Rotate to face |
00000920  62 61 6c 6c 20 28 4c 33  31 30 29 0d 01 c2 4c 20  |ball (L310)...L |
00000930  4c 44 41 66 62 3a 43 4d  50 23 97 22 42 22 3a 42  |LDAfb:CMP#."B":B|
00000940  4e 45 6e 6f 74 74 65 6e  64 6c 3a 4c 44 41 66 72  |NEnottendl:LDAfr|
00000950  65 71 62 3a 43 4d 50 23  33 38 3a 42 43 43 6e 6f  |eqb:CMP#38:BCCno|
00000960  74 74 65 6e 64 6c 3a 4c  44 41 23 30 3a 53 54 41  |ttendl:LDA#0:STA|
00000970  74 65 6e 64 69 6e 67 0d  01 cc 60 20 2e 6e 6f 74  |tending...` .not|
00000980  74 65 6e 64 6c 20 4c 44  41 66 63 3a 43 4d 50 23  |tendl LDAfc:CMP#|
00000990  97 22 42 22 3a 42 4e 45  6e 6f 74 74 65 6e 64 72  |."B":BNEnottendr|
000009a0  3a 4c 44 41 66 72 65 71  63 3a 43 4d 50 23 33 38  |:LDAfreqc:CMP#38|
000009b0  3a 42 43 43 6e 6f 74 74  65 6e 64 72 3a 4c 44 41  |:BCCnottendr:LDA|
000009c0  23 31 3a 53 54 41 74 65  6e 64 69 6e 67 3a 2e 6e  |#1:STAtending:.n|
000009d0  6f 74 74 65 6e 64 72 0d  01 d6 1e 20 5c 50 69 63  |ottendr.... \Pic|
000009e0  6b 20 62 65 73 74 20 62  61 6c 6c 20 74 6f 20 61  |k best ball to a|
000009f0  69 6d 20 61 74 0d 01 e0  b9 20 4c 44 41 66 72 65  |im at.... LDAfre|
00000a00  71 61 3a 4c 53 52 20 41  3a 4c 53 52 20 41 3a 53  |qa:LSR A:LSR A:S|
00000a10  54 41 26 38 30 3a 41 53  4c 20 41 3a 43 4c 43 3a  |TA&80:ASL A:CLC:|
00000a20  41 44 43 26 38 30 3a 50  48 41 3a 43 4d 50 66 72  |ADC&80:PHA:CMPfr|
00000a30  65 71 62 3a 42 43 43 6e  6f 74 68 6e 6c 3a 4c 44  |eqb:BCCnothnl:LD|
00000a40  41 66 62 3a 43 4d 50 23  97 22 42 22 3a 42 4e 45  |Afb:CMP#."B":BNE|
00000a50  6e 6f 74 68 6e 6c 3a 4c  44 41 66 63 3a 43 4d 50  |nothnl:LDAfc:CMP|
00000a60  23 97 22 42 22 3a 42 4e  45 68 6e 6c 3a 4c 44 41  |#."B":BNEhnl:LDA|
00000a70  66 72 65 71 62 3a 43 4d  50 66 72 65 71 63 3a 42  |freqb:CMPfreqc:B|
00000a80  43 53 6e 6f 74 68 6e 6c  3a 2e 68 6e 6c 20 4c 44  |CSnothnl:.hnl LD|
00000a90  41 23 26 46 46 3a 53 54  41 6c 65 66 74 3a 53 54  |A#&FF:STAleft:ST|
00000aa0  41 73 74 65 65 72 3a 50  4c 41 3a 52 54 53 0d 01  |Asteer:PLA:RTS..|
00000ab0  ea 97 20 2e 6e 6f 74 68  6e 6c 20 50 4c 41 3a 43  |.. .nothnl PLA:C|
00000ac0  4d 50 66 72 65 71 63 3a  42 43 43 6e 6f 74 68 6e  |MPfreqc:BCCnothn|
00000ad0  72 3a 4c 44 41 66 63 3a  43 4d 50 23 97 22 42 22  |r:LDAfc:CMP#."B"|
00000ae0  3a 42 4e 45 6e 6f 74 68  6e 72 3a 4c 44 41 66 62  |:BNEnothnr:LDAfb|
00000af0  3a 43 4d 50 23 97 22 42  22 3a 42 4e 45 68 6e 72  |:CMP#."B":BNEhnr|
00000b00  3a 4c 44 41 66 72 65 71  63 3a 43 4d 50 66 72 65  |:LDAfreqc:CMPfre|
00000b10  71 62 3a 42 43 53 6e 6f  74 68 6e 72 3a 2e 68 6e  |qb:BCSnothnr:.hn|
00000b20  72 20 4c 44 41 23 26 46  46 3a 53 54 41 72 69 67  |r LDA#&FF:STArig|
00000b30  68 74 3a 4c 44 41 23 31  3a 53 54 41 73 74 65 65  |ht:LDA#1:STAstee|
00000b40  72 3a 52 54 53 0d 01 f4  91 20 2e 6e 6f 74 68 6e  |r:RTS.... .nothn|
00000b50  72 20 4c 44 41 66 61 3a  43 4d 50 23 97 22 42 22  |r LDAfa:CMP#."B"|
00000b60  3a 42 4e 45 6c 33 37 30  3a 4c 44 58 23 30 3a 4c  |:BNEl370:LDX#0:L|
00000b70  44 41 73 74 65 65 72 3a  43 4d 50 23 31 3a 42 45  |DAsteer:CMP#1:BE|
00000b80  51 6e 6f 66 61 61 64 64  3a 4c 44 58 23 26 46 46  |Qnofaadd:LDX#&FF|
00000b90  3a 2e 6e 6f 66 61 61 64  64 20 53 54 58 6c 65 66  |:.nofaadd STXlef|
00000ba0  74 3a 4c 44 58 23 30 3a  43 4d 50 23 26 46 46 3a  |t:LDX#0:CMP#&FF:|
00000bb0  42 45 51 6e 6f 66 61 61  64 64 32 3a 4c 44 58 23  |BEQnofaadd2:LDX#|
00000bc0  26 46 46 3a 2e 6e 6f 66  61 61 64 64 32 20 53 54  |&FF:.nofaadd2 ST|
00000bd0  58 72 69 67 68 74 0d 01  fe 75 20 4c 44 41 23 30  |Xright...u LDA#0|
00000be0  3a 53 54 41 73 74 65 65  72 3a 4c 44 41 73 65 61  |:STAsteer:LDAsea|
00000bf0  72 63 68 69 6e 67 3a 4c  53 52 20 41 3a 53 54 41  |rching:LSR A:STA|
00000c00  73 65 61 72 63 68 69 6e  67 3a 4c 44 58 23 30 3a  |searching:LDX#0:|
00000c10  4c 44 41 66 72 65 71 61  3a 43 4d 50 23 32 35 3a  |LDAfreqa:CMP#25:|
00000c20  42 43 43 6e 6f 66 61 61  64 64 33 3a 4c 44 58 23  |BCCnofaadd3:LDX#|
00000c30  26 46 46 3a 2e 6e 6f 66  61 61 64 64 33 20 53 54  |&FF:.nofaadd3 ST|
00000c40  58 20 74 75 72 62 6f 3a  52 54 53 0d 02 08 3e 20  |X turbo:RTS...> |
00000c50  2e 6c 33 37 30 20 4c 44  41 66 62 3a 43 4d 50 23  |.l370 LDAfb:CMP#|
00000c60  97 22 42 22 3a 42 4e 45  6c 33 38 30 3a 4c 44 41  |."B":BNEl380:LDA|
00000c70  23 26 46 46 3a 53 54 41  73 74 65 65 72 3a 53 54  |#&FF:STAsteer:ST|
00000c80  41 6c 65 66 74 3a 52 54  53 0d 02 12 4b 20 2e 6c  |Aleft:RTS...K .l|
00000c90  33 38 30 20 4c 44 41 66  63 3a 43 4d 50 23 97 22  |380 LDAfc:CMP#."|
00000ca0  42 22 3a 42 4e 45 6c 33  39 30 3a 4c 44 41 23 31  |B":BNEl390:LDA#1|
00000cb0  3a 53 54 41 73 74 65 65  72 3a 4c 44 41 23 26 46  |:STAsteer:LDA#&F|
00000cc0  46 3a 53 54 41 72 69 67  68 74 3a 52 54 53 3a 2e  |F:STAright:RTS:.|
00000cd0  6c 33 39 30 0d 02 1c 2d  20 5c 20 49 66 20 6e 6f  |l390...- \ If no|
00000ce0  20 62 61 6c 6c 20 69 6e  20 73 69 67 68 74 2c 20  | ball in sight, |
00000cf0  63 6f 6e 74 69 6e 75 65  20 72 6f 74 61 74 69 6f  |continue rotatio|
00000d00  6e 0d 02 26 aa 20 49 4e  43 73 65 61 72 63 68 69  |n..&. INCsearchi|
00000d10  6e 67 3a 4c 44 41 23 30  3a 53 54 41 73 74 65 65  |ng:LDA#0:STAstee|
00000d20  72 3a 53 54 41 74 75 72  62 6f 3a 53 54 41 73 74  |r:STAturbo:STAst|
00000d30  65 65 72 3a 4c 44 41 73  65 61 72 63 68 69 6e 67  |eer:LDAsearching|
00000d40  3a 43 4d 50 23 36 3a 42  43 43 6e 6f 74 74 75 72  |:CMP#6:BCCnottur|
00000d50  72 6f 74 3a 4c 44 41 23  26 46 46 3a 53 54 41 74  |rot:LDA#&FF:STAt|
00000d60  75 72 62 6f 3a 2e 6e 6f  74 74 75 72 72 6f 74 20  |urbo:.notturrot |
00000d70  4c 44 58 23 26 46 46 3a  4c 44 41 74 65 6e 64 69  |LDX#&FF:LDAtendi|
00000d80  6e 67 3a 42 45 51 74 65  6e 64 30 3a 53 54 58 72  |ng:BEQtend0:STXr|
00000d90  69 67 68 74 3a 4a 4d 50  6c 34 33 30 3a 2e 74 65  |ight:JMPl430:.te|
00000da0  6e 64 30 20 53 54 58 6c  65 66 74 0d 02 30 3f 20  |nd0 STXleft..0? |
00000db0  2e 6c 34 33 30 20 4c 44  41 73 65 61 72 63 68 69  |.l430 LDAsearchi|
00000dc0  6e 67 3a 43 4d 50 23 35  3a 42 4e 45 6c 34 34 30  |ng:CMP#5:BNEl440|
00000dd0  3a 4c 44 41 74 65 6e 64  69 6e 67 3a 82 23 31 3a  |:LDAtending:.#1:|
00000de0  53 54 41 74 65 6e 64 69  6e 67 0d 02 3a 39 20 2e  |STAtending..:9 .|
00000df0  6c 34 34 30 20 4c 44 41  73 65 61 72 63 68 69 6e  |l440 LDAsearchin|
00000e00  67 3a 43 4d 50 23 35 30  3a 42 43 43 6c 34 35 30  |g:CMP#50:BCCl450|
00000e10  3a 49 4e 43 73 74 61 67  65 3a 2e 6c 34 35 30 20  |:INCstage:.l450 |
00000e20  52 54 53 0d 02 44 08 20  52 54 53 0d 02 4e 06 20  |RTS..D. RTS..N. |
00000e30  3a 0d 02 58 bb 20 2e 6d  6f 76 65 6f 75 74 20 4c  |:..X. .moveout L|
00000e40  44 41 66 72 65 71 61 3a  43 4d 50 23 38 3a 42 43  |DAfreqa:CMP#8:BC|
00000e50  43 6d 6f 76 6f 6e 65 74  3a 4c 44 41 66 72 65 71  |Cmovonet:LDAfreq|
00000e60  62 3a 43 4d 50 23 38 3a  42 43 43 6d 6f 76 6f 6e  |b:CMP#8:BCCmovon|
00000e70  65 74 3a 4c 44 41 66 72  65 71 63 3a 43 4d 50 23  |et:LDAfreqc:CMP#|
00000e80  38 3a 42 43 43 6d 6f 76  6f 6e 65 74 3a 4c 44 41  |8:BCCmovonet:LDA|
00000e90  72 65 76 69 6e 67 3a 42  45 51 6c 35 31 30 3a 4c  |reving:BEQl510:L|
00000ea0  44 41 66 72 65 71 61 3a  43 4d 50 23 31 39 3a 42  |DAfreqa:CMP#19:B|
00000eb0  43 43 6d 6f 76 6f 6e 65  74 3a 4c 44 41 66 72 65  |CCmovonet:LDAfre|
00000ec0  71 62 3a 43 4d 50 23 31  39 3a 42 43 43 6d 6f 76  |qb:CMP#19:BCCmov|
00000ed0  6f 6e 65 74 3a 4c 44 41  66 72 65 71 63 3a 43 4d  |onet:LDAfreqc:CM|
00000ee0  50 23 31 39 3a 42 43 53  6c 35 31 30 0d 02 62 3f  |P#19:BCSl510..b?|
00000ef0  20 2e 6d 6f 76 6f 6e 65  74 20 4c 44 41 23 26 46  | .movonet LDA#&F|
00000f00  46 3a 53 54 41 72 65 76  69 6e 67 3a 53 54 41 72  |F:STAreving:STAr|
00000f10  65 76 65 72 73 65 3a 53  54 41 6c 65 66 74 3a 53  |everse:STAleft:S|
00000f20  54 41 72 69 67 68 74 3a  52 54 53 0d 02 6c a1 20  |TAright:RTS..l. |
00000f30  2e 6c 35 31 30 20 4c 44  41 23 30 3a 53 54 41 72  |.l510 LDA#0:STAr|
00000f40  65 76 69 6e 67 3a 4c 44  41 66 61 3a 43 4d 50 23  |eving:LDAfa:CMP#|
00000f50  97 22 42 22 3a 42 45 51  67 6f 67 65 74 3a 4c 44  |."B":BEQgoget:LD|
00000f60  41 66 62 3a 43 4d 50 23  97 22 42 22 3a 42 45 51  |Afb:CMP#."B":BEQ|
00000f70  67 6f 67 65 74 3a 4c 44  41 66 63 3a 43 4d 50 23  |goget:LDAfc:CMP#|
00000f80  97 22 42 22 3a 42 45 51  67 6f 67 65 74 3a 4c 44  |."B":BEQgoget:LD|
00000f90  41 66 64 3a 43 4d 50 23  97 22 42 22 3a 42 4e 45  |Afd:CMP#."B":BNE|
00000fa0  6c 35 34 30 3a 2e 67 6f  67 65 74 20 44 45 43 73  |l540:.goget DECs|
00000fb0  74 61 67 65 3a 4c 44 41  23 34 34 3a 53 54 41 73  |tage:LDA#44:STAs|
00000fc0  65 61 72 63 68 69 6e 67  3a 52 54 53 0d 02 76 53  |earching:RTS..vS|
00000fd0  20 2e 6c 35 34 30 20 4c  44 41 66 61 3a 43 4d 50  | .l540 LDAfa:CMP|
00000fe0  23 97 22 4e 22 3a 42 45  51 6d 6f 76 6f 72 69 67  |#."N":BEQmovorig|
00000ff0  3a 43 4d 50 23 97 22 50  22 3a 42 4e 45 6c 35 36  |:CMP#."P":BNEl56|
00001000  30 3a 2e 6d 6f 76 6f 72  69 67 20 4c 44 41 23 26  |0:.movorig LDA#&|
00001010  46 46 3a 53 54 41 72 69  67 68 74 3a 52 54 53 0d  |FF:STAright:RTS.|
00001020  02 80 46 20 2e 6c 35 36  30 20 4c 44 41 66 62 3a  |..F .l560 LDAfb:|
00001030  43 4d 50 23 97 22 4e 22  3a 42 45 51 6c 35 38 30  |CMP#."N":BEQl580|
00001040  3a 43 4d 50 23 97 22 50  22 3a 42 45 51 6c 35 37  |:CMP#."P":BEQl57|
00001050  30 3a 4c 44 41 23 26 46  46 3a 53 54 41 6c 65 66  |0:LDA#&FF:STAlef|
00001060  74 3a 52 54 53 0d 02 8a  45 20 2e 6c 35 37 30 20  |t:RTS...E .l570 |
00001070  4c 44 41 66 72 65 71 62  3a 43 4d 50 23 33 38 3a  |LDAfreqb:CMP#38:|
00001080  42 43 53 6c 35 38 30 3a  4c 44 41 23 26 46 46 3a  |BCSl580:LDA#&FF:|
00001090  53 54 41 72 69 67 68 74  3a 4c 44 41 23 31 3a 53  |STAright:LDA#1:S|
000010a0  54 41 6e 65 61 72 3a 52  54 53 0d 02 94 30 20 2e  |TAnear:RTS...0 .|
000010b0  6c 35 38 30 20 4c 44 41  23 26 46 46 3a 53 54 41  |l580 LDA#&FF:STA|
000010c0  74 75 72 62 6f 3a 53 54  41 6c 65 66 74 3a 53 54  |turbo:STAleft:ST|
000010d0  41 72 69 67 68 74 3a 52  54 53 0d 02 9e 54 20 2e  |Aright:RTS...T .|
000010e0  64 6f 6e 65 61 72 73 74  75 66 66 20 4c 44 41 66  |donearstuff LDAf|
000010f0  72 65 71 61 3a 43 4d 50  23 38 3a 42 43 53 6c 36  |reqa:CMP#8:BCSl6|
00001100  34 30 3a 4c 44 41 66 61  3a 43 4d 50 23 97 22 42  |40:LDAfa:CMP#."B|
00001110  22 3a 42 45 51 6c 36 34  30 3a 4c 44 41 23 26 46  |":BEQl640:LDA#&F|
00001120  46 3a 53 54 41 72 69 67  68 74 3a 52 54 53 0d 02  |F:STAright:RTS..|
00001130  a8 54 20 2e 6c 36 34 30  20 4c 44 41 6e 65 61 72  |.T .l640 LDAnear|
00001140  3a 43 4d 50 23 31 3a 42  4e 45 6c 36 35 30 3a 4c  |:CMP#1:BNEl650:L|
00001150  44 41 66 64 3a 43 4d 50  23 97 22 55 22 3a 42 45  |DAfd:CMP#."U":BE|
00001160  51 6c 36 35 30 3a 4c 44  41 23 26 46 46 3a 53 54  |Ql650:LDA#&FF:ST|
00001170  41 6c 65 66 74 3a 53 54  41 72 69 67 68 74 3a 52  |Aleft:STAright:R|
00001180  54 53 0d 02 b2 58 20 2e  6c 36 35 30 20 49 4e 43  |TS...X .l650 INC|
00001190  6e 65 61 72 3a 4c 44 41  23 26 46 46 3a 53 54 41  |near:LDA#&FF:STA|
000011a0  6c 65 66 74 3a 53 54 41  74 75 72 62 6f 3a 4c 44  |left:STAturbo:LD|
000011b0  41 6e 65 61 72 3a 80 23  31 3a 42 45 51 6e 65 61  |Anear:.#1:BEQnea|
000011c0  72 6c 3a 4c 44 41 23 26  46 46 3a 2e 6e 65 61 72  |rl:LDA#&FF:.near|
000011d0  6c 20 53 54 41 72 69 67  68 74 0d 02 bc 60 20 4c  |l STAright...` L|
000011e0  44 41 6e 65 61 72 3a 43  4d 50 23 31 38 3a 42 43  |DAnear:CMP#18:BC|
000011f0  43 6e 65 61 72 65 6e 64  3a 4c 44 41 23 30 3a 53  |Cnearend:LDA#0:S|
00001200  54 41 6e 65 61 72 3a 53  54 41 73 65 61 72 63 68  |TAnear:STAsearch|
00001210  69 6e 67 3a 49 4e 43 73  74 61 67 65 3a 4c 44 41  |ing:INCstage:LDA|
00001220  23 31 3a 53 54 41 74 65  6e 64 69 6e 67 3a 2e 6e  |#1:STAtending:.n|
00001230  65 61 72 65 6e 64 20 52  54 53 0d 02 c6 7f 20 2e  |earend RTS.... .|
00001240  72 65 6c 65 61 73 65 62  20 4c 44 41 23 26 46 46  |releaseb LDA#&FF|
00001250  3a 53 54 41 6c 65 66 74  3a 53 54 41 72 69 67 68  |:STAleft:STArigh|
00001260  74 3a 53 54 41 72 65 76  65 72 73 65 3a 53 54 41  |t:STAreverse:STA|
00001270  74 75 72 62 6f 3a 49 4e  43 6e 65 61 72 3a 4c 44  |turbo:INCnear:LD|
00001280  41 6e 65 61 72 3a 43 4d  50 23 31 30 3a 42 43 43  |Anear:CMP#10:BCC|
00001290  6e 65 61 72 65 6e 64 3a  4c 44 41 23 30 3a 53 54  |nearend:LDA#0:ST|
000012a0  41 6e 65 61 72 3a 4c 44  41 23 26 46 46 3a 53 54  |Anear:LDA#&FF:ST|
000012b0  41 69 64 6c 65 3a 52 54  53 0d 02 d0 08 20 5d 3a  |Aidle:RTS.... ]:|
000012c0  ed 0d 02 da 1b 20 ff 20  22 53 41 56 45 20 41 49  |..... . "SAVE AI|
000012d0  20 33 30 30 30 20 22 2b  c3 7e 4f 25 0d ff        | 3000 "+.~O%..|
000012de