Home » Personal collection » Acorn ADFS disks » Archimedes » Dominic_3B.ADF » Files/Programs/BANG2

Files/Programs/BANG2

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 ADFS disks » Archimedes » Dominic_3B.ADF
Filename: Files/Programs/BANG2
Read OK:
File size: 1896 bytes
Load address: FFFFFB44
Exec address: B1761131
Duplicates

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

File contents
   10REM >Bang!
   20REM by David Llewellyn-Jones
   30REM (the Flying Pig)
   40REM for 32-bit machines
   50REM (c) BAU February 1993
   60:
   70speed%=2<<16
   80tracks%=1
   90PRINTRND(-(TIME+1)*VALRIGHT$(TIME$,2))
  100MODE 13
  110PRINT"Compiling..."
  120PROCass
  130PRINT"Press a key..."
  140k=GET
  150CLS
  160OFF
  170CALL start
  180END
  190:
  200DEF PROCass
  210DIM code% 50000
  220link=14:pc=15
  230x=5:y=6:h=7:v=8
  240track=9:base=10:temp=11:add=12
  250count=1:point=2:key=3:top=4
  260amount%=90
  270FOR pass%=0 TO 2 STEP 2
  280P%=code%
  290[OPTpass%
  300.random FNrndplace
  310.rndadd EQUD random
  320.rndcnt EQUD random
  330.xstart EQUD RND(320)<<16
  340.ystart EQUD RND(256)<<16
  350.which  EQUD 1
  360.colour EQUB RND(255)
  370        EQUB RND(255)
  380        EQUB RND(255)
  390        EQUB RND(255)
  400        EQUB RND(255)
  410        EQUB RND(255)
  420.colno1 EQUB RND(255)
  430.colno2 EQUB RND(255)
  440.coladd EQUB 0
  450        ALIGN
  460.vdu    EQUD 148
  470        EQUD -1
  480        ALIGN
  490
  500.start  STR     link,return
  510        LDR     base,vdu
  520        ADD     top,base,#81920
  530        SUB     top,top,#640
  540        MOV     track,#1
  550        MOV     key,#1
  560.loop   SWI     "OS_ReadEscapeState"
  570        BCS     end
  580        MOV     count,#0
  590        ADD     key,key,#1
  600        CMP     key,#100
  610        BLGT    set
  620        ADR     add,data+32
  630.loop2  ADD     count,count,#1
  640        TEQ     count,#(amount%/3)
  650        BLEQ    chng2
  660        TEQ     count,#(amount%/3*2)
  670        BLEQ    chng4
  680        TEQ     count,#1
  690        BLEQ    chng1
  700        MOV     temp,#0
  710        ADD     x,add,track,LSL#2
  720        LDR     point,[x,#-36]
  730        CMP     point,top
  740        CMPLT   base,point
  750        STRLTB  temp,[point]
  760        LDMIA   add,{x,y,h,v}
  770        CMP     x,#65536
  780        CMPGT   y,#131072
  790        BLE     skip1
  800        CMP     x,#(316<<16)
  810        CMPLT   y,#16646144
  820        BGE     skip1
  830        MOV     temp,y,LSR#16
  840        ADD     point,base,temp,LSL#8
  850        ADD     point,point,temp,LSL#6
  860        ADD     point,point,x,LSR#16
  870        MOV     temp,#0
  880        STRB    temp,[point],#640
  890        STRB    temp,[point],#-321
  900        STRB    temp,[point],#2
  910        STRB    temp,[point]
  920.skip1  SUB     x,x,h
  930        SUB     v,v,#1024
  940        SUB     y,y,v
  950        CMP     h,#0
  960        ADDLT   h,h,#64
  970        SUBGT   h,h,#64
  980        MOV     point,#0
  990        TEQ     key,#1
 1000        BLEQ    reset
 1010        CMP     x,#65536
 1020        CMPGT   y,#131072
 1030        BLE     skip2
 1040        CMP     x,#(316<<16)
 1050        CMPLT   y,#16646144
 1060        BGE     skip2
 1070        MOV     temp,y,LSR#16
 1080        ADD     point,base,temp,LSL#8
 1090        ADD     point,point,temp,LSL#6
 1100        ADD     point,point,x,LSR#16
 1110        LDRB    temp,colno1
 1120        STRB    temp,[point],#640
 1130        STRB    temp,[point],#-321
 1140        STRB    temp,[point],#2
 1150        STRB    temp,[point]
 1160.skip2  STMIA   add,{x,y,h,v}
 1170        SUB     temp,point,#1
 1180        SUB     add,add,#36
 1190        ADD     x,add,track,LSL#2
 1200        STR     temp,[x]
 1210        LDRB    temp,colno2
 1220        FNplottracks
 1230        ADD     add,add,#52
 1240        CMP     count,#amount%
 1250        BLE     loop2
 1260        ADD     track,track,#1
 1270        CMP     track,#tracks%
 1280        MOVGT   track,#1
 1290        B       loop
 1300.end    LDR     pc,return
 1310.return EQUD 0
 1320
 1330.reset  LDR     temp,which
 1340        CMP     count,temp
 1350        MOVLT   pc,link
 1360        ADD     temp,temp,#(amount%/3)
 1370        CMP     count,temp
 1380        MOVGT   pc,link
 1390        LDR     x,xstart
 1400        LDR     y,ystart
 1410        LDR     temp,rndcnt
 1420        ADR     h,rndadd
 1430        CMP     temp,h
 1440        LDRGE   temp,rndadd
 1450        LDR     h,[temp],#4
 1460        LDR     v,[temp],#4
 1470        STR     temp,rndcnt
 1480        STMIA   add,{x,y,h,v}
 1490        MOV     pc,link
 1500.set    SUB     key,key,#100
 1510        LDR     x,xstart
 1520        LDR     y,ystart
 1530        ADD     x,x,y,LSR#1
 1540        ADD     x,x,#16<<16
 1550        CMP     x,#320<<16
 1560        SUBGE   x,x,#300<<16
 1570        STR     x,xstart
 1580        ADD     y,y,x
 1590        SUB     y,y,#64<<16
 1600        CMP     y,#256<<16
 1610        SUBGE   y,y,#250<<16
 1620        CMP     y,#1<<16
 1630        ADDLE   y,y,#250<<16
 1640        STR     y,ystart
 1650        LDR     temp,which
 1660        ADD     temp,temp,#(amount%/3)
 1670        CMP     temp,#amount%
 1680        MOVGT   temp,#1
 1690        STR     temp,which
 1700        LDRB    temp,coladd
 1710        ADD     temp,temp,#2
 1720        CMP     temp,#6
 1730        MOVGE   temp,#0
 1740        STRB    temp,coladd
 1750        ADR     x,colour
 1760        ADD     temp,x,temp
 1770        LDRB    x,[temp]
 1780        ADD     x,x,#3
 1790        CMP     x,#255
 1800        SUBGE   x,x,#253
 1810        STRB    x,[temp]
 1820        LDRB    y,[temp,#1]!
 1830        SUB     y,y,#5
 1840        CMP     y,#1
 1850        ADDGE   y,y,#256
 1860        STRB    y,[temp]
 1870        MOV     pc,link
 1880
 1890.chng2  LDRB    x,colour+2
 1900        STRB    x,colno1
 1910        LDRB    x,colour+3
 1920        STRB    x,colno2
 1930        MOV     pc,link
 1940
 1950.chng4  LDRB    x,colour+4
 1960        STRB    x,colno1
 1970        LDRB    x,colour+5
 1980        STRB    x,colno2
 1990        MOV     pc,link
 2000
 2010.chng1  LDRB    x,colour
 2020        STRB    x,colno1
 2030        LDRB    x,colour+1
 2040        STRB    x,colno2
 2050        MOV     pc,link
 2060.data
 2070]
 2080NEXTpass%
 2090SYS "OS_ReadVduVariables",vdu,vdu
 2100PROCpoints
 2110ENDPROC
 2120 
 2130DEF PROCpoints
 2140x%=RND(1280)<<14
 2150y%=(256<<16)-(RND(1024)<<14)
 2160n%=0
 2170c=4*tracks%
 2180FOR n=data+c TO data+amount%*(16+c)+c STEP 16+c
 2190 n%+=2
 2200 IF n% MOD (amount%/5)=0 x%=RND(1280)<<14:y%=(256<<16)-(RND(1024)<<14)
 2210 a=RAD(RND(360000)/1000)
 2220 d=1-1/(1+RND(10000)/1000)
 2230 !n=x%
 2240 n!4=y%
 2250 n!8=speed%*COS(a)*d
 2260 n!12=speed%*SIN(a)*d
 2270 FOR l%=n+16 TO n+16+c STEP 4
 2280  !l%=0
 2290 NEXT
 2300NEXT
 2310ENDPROC
 2320:
 2330DEF FNplottracks
 2340FOR n=1 TO tracks%
 2350[OPT pass%
 2360        LDR     point,[add,#4]!
 2370        CMP     point,top
 2380        CMPLT   base,point
 2390        STRLTB  temp,[point]
 2400]
 2410NEXT
 2420=0
 2430:
 2440DEF FNrndplace
 2450FOR n=1 TO 700
 2460a=RAD(RND(360000)/1000)
 2470d=1-1/(1+RND(10000)/1000)
 2480[OPT pass%
 2490        EQUD speed%*COSa*d
 2500        EQUD speed%*SINa*d
 2510]
 2520NEXT
 2530=0

� >Bang!
� by David Llewellyn-Jones
� (the Flying Pig)
(� for 32-bit machines
2� (c) BAU February 1993
<:
Fspeed%=2<<16
P
tracks%=1
Z�(-(�+1)*�‘$,2))
d� 13
n�"Compiling..."
x�ass
��"Press a key..."
�k=�
��
��
�� start
��
�:
�
� �ass
�� code% 50000
�link=14:pc=15
�x=5:y=6:h=7:v=8
�"track=9:base=10:temp=11:add=12
�count=1:point=2:key=3:top=4
amount%=90
� pass%=0 � 2 � 2
P%=code%
"
[OPTpass%
,.random �rndplace
6.rndadd EQUD random
@.rndcnt EQUD random
J.xstart EQUD �(320)<<16
T.ystart EQUD �(256)<<16
^.which  EQUD 1
h.colour EQUB �(255)
r        EQUB �(255)
|        EQUB �(255)
�        EQUB �(255)
�        EQUB �(255)
�        EQUB �(255)
�.colno1 EQUB �(255)
�.colno2 EQUB �(255)
�.coladd EQUB 0
�        ALIGN
�.vdu    EQUD 148
�        EQUD -1
�        ALIGN
�
�.start  STR     link,return
�        LDR     base,vdu
#        ADD     top,base,#81920
         SUB     top,top,#640
        MOV     track,#1
&        MOV     key,#1
0(.loop   SWI     "OS_ReadEscapeState"
:        BCS     end
D        MOV     count,#0
N        ADD     key,key,#1
X        CMP     key,#100
b        BLGT    set
l        ADR     add,data+32
v".loop2  ADD     count,count,#1
�&        TEQ     count,#(amount%/3)
�        BLEQ    chng2
�(        TEQ     count,#(amount%/3*2)
�        BLEQ    chng4
�        TEQ     count,#1
�        BLEQ    chng1
�        MOV     temp,#0
�%        ADD     x,add,track,LSL#2
�"        LDR     point,[x,#-36]
�        CMP     point,top
�        CMPLT   base,point
�         STRLTB  temp,[point]
�!        LDMIA   add,{x,y,h,v}
        CMP     x,#65536
        CMPGT   y,#131072
        BLE     skip1
          CMP     x,#(316<<16)
*        CMPLT   y,#16646144
4        BGE     skip1
>!        MOV     temp,y,LSR#16
H)        ADD     point,base,temp,LSL#8
R*        ADD     point,point,temp,LSL#6
\(        ADD     point,point,x,LSR#16
f        MOV     temp,#0
p%        STRB    temp,[point],#640
z&        STRB    temp,[point],#-321
�#        STRB    temp,[point],#2
�         STRB    temp,[point]
�.skip1  SUB     x,x,h
�        SUB     v,v,#1024
�        SUB     y,y,v
�        CMP     h,#0
�        ADDLT   h,h,#64
�        SUBGT   h,h,#64
�        MOV     point,#0
�        TEQ     key,#1
�        BLEQ    reset
�        CMP     x,#65536
�        CMPGT   y,#131072
        BLE     skip2
         CMP     x,#(316<<16)
        CMPLT   y,#16646144
$        BGE     skip2
.!        MOV     temp,y,LSR#16
8)        ADD     point,base,temp,LSL#8
B*        ADD     point,point,temp,LSL#6
L(        ADD     point,point,x,LSR#16
V        LDRB    temp,colno1
`%        STRB    temp,[point],#640
j&        STRB    temp,[point],#-321
t#        STRB    temp,[point],#2
~         STRB    temp,[point]
�!.skip2  STMIA   add,{x,y,h,v}
�!        SUB     temp,point,#1
�        SUB     add,add,#36
�%        ADD     x,add,track,LSL#2
�        STR     temp,[x]
�        LDRB    temp,colno2
�        �plottracks
�        ADD     add,add,#52
�"        CMP     count,#amount%
�        BLE     loop2
�"        ADD     track,track,#1
�"        CMP     track,#tracks%
        MOVGT   track,#1

        B       loop
.end    LDR     pc,return
.return EQUD 0
(
2.reset  LDR     temp,which
<        CMP     count,temp
F        MOVLT   pc,link
P*        ADD     temp,temp,#(amount%/3)
Z        CMP     count,temp
d        MOVGT   pc,link
n        LDR     x,xstart
x        LDR     y,ystart
�        LDR     temp,rndcnt
�        ADR     h,rndadd
�        CMP     temp,h
�        LDRGE   temp,rndadd
�        LDR     h,[temp],#4
�        LDR     v,[temp],#4
�        STR     temp,rndcnt
�!        STMIA   add,{x,y,h,v}
�        MOV     pc,link
� .set    SUB     key,key,#100
�        LDR     x,xstart
�        LDR     y,ystart
�        ADD     x,x,y,LSR#1
        ADD     x,x,#16<<16
        CMP     x,#320<<16
         SUBGE   x,x,#300<<16
"        STR     x,xstart
,        ADD     y,y,x
6        SUB     y,y,#64<<16
@        CMP     y,#256<<16
J         SUBGE   y,y,#250<<16
T        CMP     y,#1<<16
^         ADDLE   y,y,#250<<16
h        STR     y,ystart
r        LDR     temp,which
|*        ADD     temp,temp,#(amount%/3)
�!        CMP     temp,#amount%
�        MOVGT   temp,#1
�        STR     temp,which
�        LDRB    temp,coladd
�         ADD     temp,temp,#2
�        CMP     temp,#6
�        MOVGE   temp,#0
�        STRB    temp,coladd
�        ADR     x,colour
�        ADD     temp,x,temp
�        LDRB    x,[temp]
�        ADD     x,x,#3
�        CMP     x,#255
        SUBGE   x,x,#253
        STRB    x,[temp]
         LDRB    y,[temp,#1]!
&        SUB     y,y,#5
0        CMP     y,#1
:        ADDGE   y,y,#256
D        STRB    y,[temp]
N        MOV     pc,link
X
b.chng2  LDRB    x,colour+2
l        STRB    x,colno1
v        LDRB    x,colour+3
�        STRB    x,colno2
�        MOV     pc,link
�
�.chng4  LDRB    x,colour+4
�        STRB    x,colno1
�        LDRB    x,colour+5
�        STRB    x,colno2
�        MOV     pc,link
�
�.chng1  LDRB    x,colour
�        STRB    x,colno1
�        LDRB    x,colour+1
�        STRB    x,colno2
        MOV     pc,link
	.data
]
 
�pass%
*$ș "OS_ReadVduVariables",vdu,vdu
4�points
>�
H 
R
� �points
\x%=�(1280)<<14
fy%=(256<<16)-(�(1024)<<14)
pn%=0
zc=4*tracks%
�-� n=data+c � data+amount%*(16+c)+c � 16+c
�
 n%+=2
�C � n% � (amount%/5)=0 x%=�(1280)<<14:y%=(256<<16)-(�(1024)<<14)
� a=�(�(360000)/1000)
� d=1-1/(1+�(10000)/1000)
�
 !n=x%
� n!4=y%
� n!8=speed%*�(a)*d
� n!12=speed%*�(a)*d
� � l%=n+16 � n+16+c � 4
�  !l%=0
� �
��
	�
	:
	� �plottracks
	$� n=1 � tracks%
	.[OPT pass%
	8#        LDR     point,[add,#4]!
	B        CMP     point,top
	L        CMPLT   base,point
	V         STRLTB  temp,[point]
	`]
	j�
	t=0
	~:
	�� �rndplace
	�� n=1 � 700
	�a=�(�(360000)/1000)
	�d=1-1/(1+�(10000)/1000)
	�[OPT pass%
	�        EQUD speed%*�a*d
	�        EQUD speed%*�a*d
	�]
	��
	�=0
�
00000000  0d 00 0a 0c f4 20 3e 42  61 6e 67 21 0d 00 14 1e  |..... >Bang!....|
00000010  f4 20 62 79 20 44 61 76  69 64 20 4c 6c 65 77 65  |. by David Llewe|
00000020  6c 6c 79 6e 2d 4a 6f 6e  65 73 0d 00 1e 16 f4 20  |llyn-Jones..... |
00000030  28 74 68 65 20 46 6c 79  69 6e 67 20 50 69 67 29  |(the Flying Pig)|
00000040  0d 00 28 19 f4 20 66 6f  72 20 33 32 2d 62 69 74  |..(.. for 32-bit|
00000050  20 6d 61 63 68 69 6e 65  73 0d 00 32 1b f4 20 28  | machines..2.. (|
00000060  63 29 20 42 41 55 20 46  65 62 72 75 61 72 79 20  |c) BAU February |
00000070  31 39 39 33 0d 00 3c 05  3a 0d 00 46 10 73 70 65  |1993..<.:..F.spe|
00000080  65 64 25 3d 32 3c 3c 31  36 0d 00 50 0d 74 72 61  |ed%=2<<16..P.tra|
00000090  63 6b 73 25 3d 31 0d 00  5a 16 f1 b3 28 2d 28 91  |cks%=1..Z...(-(.|
000000a0  2b 31 29 2a bb c2 91 24  2c 32 29 29 0d 00 64 08  |+1)*...$,2))..d.|
000000b0  eb 20 31 33 0d 00 6e 13  f1 22 43 6f 6d 70 69 6c  |. 13..n.."Compil|
000000c0  69 6e 67 2e 2e 2e 22 0d  00 78 08 f2 61 73 73 0d  |ing..."..x..ass.|
000000d0  00 82 15 f1 22 50 72 65  73 73 20 61 20 6b 65 79  |...."Press a key|
000000e0  2e 2e 2e 22 0d 00 8c 07  6b 3d a5 0d 00 96 05 db  |..."....k=......|
000000f0  0d 00 a0 05 87 0d 00 aa  0b d6 20 73 74 61 72 74  |.......... start|
00000100  0d 00 b4 05 e0 0d 00 be  05 3a 0d 00 c8 0a dd 20  |.........:..... |
00000110  f2 61 73 73 0d 00 d2 11  de 20 63 6f 64 65 25 20  |.ass..... code% |
00000120  35 30 30 30 30 0d 00 dc  11 6c 69 6e 6b 3d 31 34  |50000....link=14|
00000130  3a 70 63 3d 31 35 0d 00  e6 13 78 3d 35 3a 79 3d  |:pc=15....x=5:y=|
00000140  36 3a 68 3d 37 3a 76 3d  38 0d 00 f0 22 74 72 61  |6:h=7:v=8..."tra|
00000150  63 6b 3d 39 3a 62 61 73  65 3d 31 30 3a 74 65 6d  |ck=9:base=10:tem|
00000160  70 3d 31 31 3a 61 64 64  3d 31 32 0d 00 fa 1f 63  |p=11:add=12....c|
00000170  6f 75 6e 74 3d 31 3a 70  6f 69 6e 74 3d 32 3a 6b  |ount=1:point=2:k|
00000180  65 79 3d 33 3a 74 6f 70  3d 34 0d 01 04 0e 61 6d  |ey=3:top=4....am|
00000190  6f 75 6e 74 25 3d 39 30  0d 01 0e 15 e3 20 70 61  |ount%=90..... pa|
000001a0  73 73 25 3d 30 20 b8 20  32 20 88 20 32 0d 01 18  |ss%=0 . 2 . 2...|
000001b0  0c 50 25 3d 63 6f 64 65  25 0d 01 22 0d 5b 4f 50  |.P%=code%..".[OP|
000001c0  54 70 61 73 73 25 0d 01  2c 15 2e 72 61 6e 64 6f  |Tpass%..,..rando|
000001d0  6d 20 a4 72 6e 64 70 6c  61 63 65 0d 01 36 17 2e  |m .rndplace..6..|
000001e0  72 6e 64 61 64 64 20 45  51 55 44 20 72 61 6e 64  |rndadd EQUD rand|
000001f0  6f 6d 0d 01 40 17 2e 72  6e 64 63 6e 74 20 45 51  |om..@..rndcnt EQ|
00000200  55 44 20 72 61 6e 64 6f  6d 0d 01 4a 1b 2e 78 73  |UD random..J..xs|
00000210  74 61 72 74 20 45 51 55  44 20 b3 28 33 32 30 29  |tart EQUD .(320)|
00000220  3c 3c 31 36 0d 01 54 1b  2e 79 73 74 61 72 74 20  |<<16..T..ystart |
00000230  45 51 55 44 20 b3 28 32  35 36 29 3c 3c 31 36 0d  |EQUD .(256)<<16.|
00000240  01 5e 12 2e 77 68 69 63  68 20 20 45 51 55 44 20  |.^..which  EQUD |
00000250  31 0d 01 68 17 2e 63 6f  6c 6f 75 72 20 45 51 55  |1..h..colour EQU|
00000260  42 20 b3 28 32 35 35 29  0d 01 72 17 20 20 20 20  |B .(255)..r.    |
00000270  20 20 20 20 45 51 55 42  20 b3 28 32 35 35 29 0d  |    EQUB .(255).|
00000280  01 7c 17 20 20 20 20 20  20 20 20 45 51 55 42 20  |.|.        EQUB |
00000290  b3 28 32 35 35 29 0d 01  86 17 20 20 20 20 20 20  |.(255)....      |
000002a0  20 20 45 51 55 42 20 b3  28 32 35 35 29 0d 01 90  |  EQUB .(255)...|
000002b0  17 20 20 20 20 20 20 20  20 45 51 55 42 20 b3 28  |.        EQUB .(|
000002c0  32 35 35 29 0d 01 9a 17  20 20 20 20 20 20 20 20  |255)....        |
000002d0  45 51 55 42 20 b3 28 32  35 35 29 0d 01 a4 17 2e  |EQUB .(255).....|
000002e0  63 6f 6c 6e 6f 31 20 45  51 55 42 20 b3 28 32 35  |colno1 EQUB .(25|
000002f0  35 29 0d 01 ae 17 2e 63  6f 6c 6e 6f 32 20 45 51  |5).....colno2 EQ|
00000300  55 42 20 b3 28 32 35 35  29 0d 01 b8 12 2e 63 6f  |UB .(255).....co|
00000310  6c 61 64 64 20 45 51 55  42 20 30 0d 01 c2 11 20  |ladd EQUB 0.... |
00000320  20 20 20 20 20 20 20 41  4c 49 47 4e 0d 01 cc 14  |       ALIGN....|
00000330  2e 76 64 75 20 20 20 20  45 51 55 44 20 31 34 38  |.vdu    EQUD 148|
00000340  0d 01 d6 13 20 20 20 20  20 20 20 20 45 51 55 44  |....        EQUD|
00000350  20 2d 31 0d 01 e0 11 20  20 20 20 20 20 20 20 41  | -1....        A|
00000360  4c 49 47 4e 0d 01 ea 04  0d 01 f4 1f 2e 73 74 61  |LIGN.........sta|
00000370  72 74 20 20 53 54 52 20  20 20 20 20 6c 69 6e 6b  |rt  STR     link|
00000380  2c 72 65 74 75 72 6e 0d  01 fe 1c 20 20 20 20 20  |,return....     |
00000390  20 20 20 4c 44 52 20 20  20 20 20 62 61 73 65 2c  |   LDR     base,|
000003a0  76 64 75 0d 02 08 23 20  20 20 20 20 20 20 20 41  |vdu...#        A|
000003b0  44 44 20 20 20 20 20 74  6f 70 2c 62 61 73 65 2c  |DD     top,base,|
000003c0  23 38 31 39 32 30 0d 02  12 20 20 20 20 20 20 20  |#81920...       |
000003d0  20 20 53 55 42 20 20 20  20 20 74 6f 70 2c 74 6f  |  SUB     top,to|
000003e0  70 2c 23 36 34 30 0d 02  1c 1c 20 20 20 20 20 20  |p,#640....      |
000003f0  20 20 4d 4f 56 20 20 20  20 20 74 72 61 63 6b 2c  |  MOV     track,|
00000400  23 31 0d 02 26 1a 20 20  20 20 20 20 20 20 4d 4f  |#1..&.        MO|
00000410  56 20 20 20 20 20 6b 65  79 2c 23 31 0d 02 30 28  |V     key,#1..0(|
00000420  2e 6c 6f 6f 70 20 20 20  53 57 49 20 20 20 20 20  |.loop   SWI     |
00000430  22 4f 53 5f 52 65 61 64  45 73 63 61 70 65 53 74  |"OS_ReadEscapeSt|
00000440  61 74 65 22 0d 02 3a 17  20 20 20 20 20 20 20 20  |ate"..:.        |
00000450  42 43 53 20 20 20 20 20  65 6e 64 0d 02 44 1c 20  |BCS     end..D. |
00000460  20 20 20 20 20 20 20 4d  4f 56 20 20 20 20 20 63  |       MOV     c|
00000470  6f 75 6e 74 2c 23 30 0d  02 4e 1e 20 20 20 20 20  |ount,#0..N.     |
00000480  20 20 20 41 44 44 20 20  20 20 20 6b 65 79 2c 6b  |   ADD     key,k|
00000490  65 79 2c 23 31 0d 02 58  1c 20 20 20 20 20 20 20  |ey,#1..X.       |
000004a0  20 43 4d 50 20 20 20 20  20 6b 65 79 2c 23 31 30  | CMP     key,#10|
000004b0  30 0d 02 62 17 20 20 20  20 20 20 20 20 42 4c 47  |0..b.        BLG|
000004c0  54 20 20 20 20 73 65 74  0d 02 6c 1f 20 20 20 20  |T    set..l.    |
000004d0  20 20 20 20 41 44 52 20  20 20 20 20 61 64 64 2c  |    ADR     add,|
000004e0  64 61 74 61 2b 33 32 0d  02 76 22 2e 6c 6f 6f 70  |data+32..v".loop|
000004f0  32 20 20 41 44 44 20 20  20 20 20 63 6f 75 6e 74  |2  ADD     count|
00000500  2c 63 6f 75 6e 74 2c 23  31 0d 02 80 26 20 20 20  |,count,#1...&   |
00000510  20 20 20 20 20 54 45 51  20 20 20 20 20 63 6f 75  |     TEQ     cou|
00000520  6e 74 2c 23 28 61 6d 6f  75 6e 74 25 2f 33 29 0d  |nt,#(amount%/3).|
00000530  02 8a 19 20 20 20 20 20  20 20 20 42 4c 45 51 20  |...        BLEQ |
00000540  20 20 20 63 68 6e 67 32  0d 02 94 28 20 20 20 20  |   chng2...(    |
00000550  20 20 20 20 54 45 51 20  20 20 20 20 63 6f 75 6e  |    TEQ     coun|
00000560  74 2c 23 28 61 6d 6f 75  6e 74 25 2f 33 2a 32 29  |t,#(amount%/3*2)|
00000570  0d 02 9e 19 20 20 20 20  20 20 20 20 42 4c 45 51  |....        BLEQ|
00000580  20 20 20 20 63 68 6e 67  34 0d 02 a8 1c 20 20 20  |    chng4....   |
00000590  20 20 20 20 20 54 45 51  20 20 20 20 20 63 6f 75  |     TEQ     cou|
000005a0  6e 74 2c 23 31 0d 02 b2  19 20 20 20 20 20 20 20  |nt,#1....       |
000005b0  20 42 4c 45 51 20 20 20  20 63 68 6e 67 31 0d 02  | BLEQ    chng1..|
000005c0  bc 1b 20 20 20 20 20 20  20 20 4d 4f 56 20 20 20  |..        MOV   |
000005d0  20 20 74 65 6d 70 2c 23  30 0d 02 c6 25 20 20 20  |  temp,#0...%   |
000005e0  20 20 20 20 20 41 44 44  20 20 20 20 20 78 2c 61  |     ADD     x,a|
000005f0  64 64 2c 74 72 61 63 6b  2c 4c 53 4c 23 32 0d 02  |dd,track,LSL#2..|
00000600  d0 22 20 20 20 20 20 20  20 20 4c 44 52 20 20 20  |."        LDR   |
00000610  20 20 70 6f 69 6e 74 2c  5b 78 2c 23 2d 33 36 5d  |  point,[x,#-36]|
00000620  0d 02 da 1d 20 20 20 20  20 20 20 20 43 4d 50 20  |....        CMP |
00000630  20 20 20 20 70 6f 69 6e  74 2c 74 6f 70 0d 02 e4  |    point,top...|
00000640  1e 20 20 20 20 20 20 20  20 43 4d 50 4c 54 20 20  |.        CMPLT  |
00000650  20 62 61 73 65 2c 70 6f  69 6e 74 0d 02 ee 20 20  | base,point...  |
00000660  20 20 20 20 20 20 20 53  54 52 4c 54 42 20 20 74  |       STRLTB  t|
00000670  65 6d 70 2c 5b 70 6f 69  6e 74 5d 0d 02 f8 21 20  |emp,[point]...! |
00000680  20 20 20 20 20 20 20 4c  44 4d 49 41 20 20 20 61  |       LDMIA   a|
00000690  64 64 2c 7b 78 2c 79 2c  68 2c 76 7d 0d 03 02 1c  |dd,{x,y,h,v}....|
000006a0  20 20 20 20 20 20 20 20  43 4d 50 20 20 20 20 20  |        CMP     |
000006b0  78 2c 23 36 35 35 33 36  0d 03 0c 1d 20 20 20 20  |x,#65536....    |
000006c0  20 20 20 20 43 4d 50 47  54 20 20 20 79 2c 23 31  |    CMPGT   y,#1|
000006d0  33 31 30 37 32 0d 03 16  19 20 20 20 20 20 20 20  |31072....       |
000006e0  20 42 4c 45 20 20 20 20  20 73 6b 69 70 31 0d 03  | BLE     skip1..|
000006f0  20 20 20 20 20 20 20 20  20 20 43 4d 50 20 20 20  |          CMP   |
00000700  20 20 78 2c 23 28 33 31  36 3c 3c 31 36 29 0d 03  |  x,#(316<<16)..|
00000710  2a 1f 20 20 20 20 20 20  20 20 43 4d 50 4c 54 20  |*.        CMPLT |
00000720  20 20 79 2c 23 31 36 36  34 36 31 34 34 0d 03 34  |  y,#16646144..4|
00000730  19 20 20 20 20 20 20 20  20 42 47 45 20 20 20 20  |.        BGE    |
00000740  20 73 6b 69 70 31 0d 03  3e 21 20 20 20 20 20 20  | skip1..>!      |
00000750  20 20 4d 4f 56 20 20 20  20 20 74 65 6d 70 2c 79  |  MOV     temp,y|
00000760  2c 4c 53 52 23 31 36 0d  03 48 29 20 20 20 20 20  |,LSR#16..H)     |
00000770  20 20 20 41 44 44 20 20  20 20 20 70 6f 69 6e 74  |   ADD     point|
00000780  2c 62 61 73 65 2c 74 65  6d 70 2c 4c 53 4c 23 38  |,base,temp,LSL#8|
00000790  0d 03 52 2a 20 20 20 20  20 20 20 20 41 44 44 20  |..R*        ADD |
000007a0  20 20 20 20 70 6f 69 6e  74 2c 70 6f 69 6e 74 2c  |    point,point,|
000007b0  74 65 6d 70 2c 4c 53 4c  23 36 0d 03 5c 28 20 20  |temp,LSL#6..\(  |
000007c0  20 20 20 20 20 20 41 44  44 20 20 20 20 20 70 6f  |      ADD     po|
000007d0  69 6e 74 2c 70 6f 69 6e  74 2c 78 2c 4c 53 52 23  |int,point,x,LSR#|
000007e0  31 36 0d 03 66 1b 20 20  20 20 20 20 20 20 4d 4f  |16..f.        MO|
000007f0  56 20 20 20 20 20 74 65  6d 70 2c 23 30 0d 03 70  |V     temp,#0..p|
00000800  25 20 20 20 20 20 20 20  20 53 54 52 42 20 20 20  |%        STRB   |
00000810  20 74 65 6d 70 2c 5b 70  6f 69 6e 74 5d 2c 23 36  | temp,[point],#6|
00000820  34 30 0d 03 7a 26 20 20  20 20 20 20 20 20 53 54  |40..z&        ST|
00000830  52 42 20 20 20 20 74 65  6d 70 2c 5b 70 6f 69 6e  |RB    temp,[poin|
00000840  74 5d 2c 23 2d 33 32 31  0d 03 84 23 20 20 20 20  |t],#-321...#    |
00000850  20 20 20 20 53 54 52 42  20 20 20 20 74 65 6d 70  |    STRB    temp|
00000860  2c 5b 70 6f 69 6e 74 5d  2c 23 32 0d 03 8e 20 20  |,[point],#2...  |
00000870  20 20 20 20 20 20 20 53  54 52 42 20 20 20 20 74  |       STRB    t|
00000880  65 6d 70 2c 5b 70 6f 69  6e 74 5d 0d 03 98 19 2e  |emp,[point].....|
00000890  73 6b 69 70 31 20 20 53  55 42 20 20 20 20 20 78  |skip1  SUB     x|
000008a0  2c 78 2c 68 0d 03 a2 1d  20 20 20 20 20 20 20 20  |,x,h....        |
000008b0  53 55 42 20 20 20 20 20  76 2c 76 2c 23 31 30 32  |SUB     v,v,#102|
000008c0  34 0d 03 ac 19 20 20 20  20 20 20 20 20 53 55 42  |4....        SUB|
000008d0  20 20 20 20 20 79 2c 79  2c 76 0d 03 b6 18 20 20  |     y,y,v....  |
000008e0  20 20 20 20 20 20 43 4d  50 20 20 20 20 20 68 2c  |      CMP     h,|
000008f0  23 30 0d 03 c0 1b 20 20  20 20 20 20 20 20 41 44  |#0....        AD|
00000900  44 4c 54 20 20 20 68 2c  68 2c 23 36 34 0d 03 ca  |DLT   h,h,#64...|
00000910  1b 20 20 20 20 20 20 20  20 53 55 42 47 54 20 20  |.        SUBGT  |
00000920  20 68 2c 68 2c 23 36 34  0d 03 d4 1c 20 20 20 20  | h,h,#64....    |
00000930  20 20 20 20 4d 4f 56 20  20 20 20 20 70 6f 69 6e  |    MOV     poin|
00000940  74 2c 23 30 0d 03 de 1a  20 20 20 20 20 20 20 20  |t,#0....        |
00000950  54 45 51 20 20 20 20 20  6b 65 79 2c 23 31 0d 03  |TEQ     key,#1..|
00000960  e8 19 20 20 20 20 20 20  20 20 42 4c 45 51 20 20  |..        BLEQ  |
00000970  20 20 72 65 73 65 74 0d  03 f2 1c 20 20 20 20 20  |  reset....     |
00000980  20 20 20 43 4d 50 20 20  20 20 20 78 2c 23 36 35  |   CMP     x,#65|
00000990  35 33 36 0d 03 fc 1d 20  20 20 20 20 20 20 20 43  |536....        C|
000009a0  4d 50 47 54 20 20 20 79  2c 23 31 33 31 30 37 32  |MPGT   y,#131072|
000009b0  0d 04 06 19 20 20 20 20  20 20 20 20 42 4c 45 20  |....        BLE |
000009c0  20 20 20 20 73 6b 69 70  32 0d 04 10 20 20 20 20  |    skip2...    |
000009d0  20 20 20 20 20 43 4d 50  20 20 20 20 20 78 2c 23  |     CMP     x,#|
000009e0  28 33 31 36 3c 3c 31 36  29 0d 04 1a 1f 20 20 20  |(316<<16)....   |
000009f0  20 20 20 20 20 43 4d 50  4c 54 20 20 20 79 2c 23  |     CMPLT   y,#|
00000a00  31 36 36 34 36 31 34 34  0d 04 24 19 20 20 20 20  |16646144..$.    |
00000a10  20 20 20 20 42 47 45 20  20 20 20 20 73 6b 69 70  |    BGE     skip|
00000a20  32 0d 04 2e 21 20 20 20  20 20 20 20 20 4d 4f 56  |2...!        MOV|
00000a30  20 20 20 20 20 74 65 6d  70 2c 79 2c 4c 53 52 23  |     temp,y,LSR#|
00000a40  31 36 0d 04 38 29 20 20  20 20 20 20 20 20 41 44  |16..8)        AD|
00000a50  44 20 20 20 20 20 70 6f  69 6e 74 2c 62 61 73 65  |D     point,base|
00000a60  2c 74 65 6d 70 2c 4c 53  4c 23 38 0d 04 42 2a 20  |,temp,LSL#8..B* |
00000a70  20 20 20 20 20 20 20 41  44 44 20 20 20 20 20 70  |       ADD     p|
00000a80  6f 69 6e 74 2c 70 6f 69  6e 74 2c 74 65 6d 70 2c  |oint,point,temp,|
00000a90  4c 53 4c 23 36 0d 04 4c  28 20 20 20 20 20 20 20  |LSL#6..L(       |
00000aa0  20 41 44 44 20 20 20 20  20 70 6f 69 6e 74 2c 70  | ADD     point,p|
00000ab0  6f 69 6e 74 2c 78 2c 4c  53 52 23 31 36 0d 04 56  |oint,x,LSR#16..V|
00000ac0  1f 20 20 20 20 20 20 20  20 4c 44 52 42 20 20 20  |.        LDRB   |
00000ad0  20 74 65 6d 70 2c 63 6f  6c 6e 6f 31 0d 04 60 25  | temp,colno1..`%|
00000ae0  20 20 20 20 20 20 20 20  53 54 52 42 20 20 20 20  |        STRB    |
00000af0  74 65 6d 70 2c 5b 70 6f  69 6e 74 5d 2c 23 36 34  |temp,[point],#64|
00000b00  30 0d 04 6a 26 20 20 20  20 20 20 20 20 53 54 52  |0..j&        STR|
00000b10  42 20 20 20 20 74 65 6d  70 2c 5b 70 6f 69 6e 74  |B    temp,[point|
00000b20  5d 2c 23 2d 33 32 31 0d  04 74 23 20 20 20 20 20  |],#-321..t#     |
00000b30  20 20 20 53 54 52 42 20  20 20 20 74 65 6d 70 2c  |   STRB    temp,|
00000b40  5b 70 6f 69 6e 74 5d 2c  23 32 0d 04 7e 20 20 20  |[point],#2..~   |
00000b50  20 20 20 20 20 20 53 54  52 42 20 20 20 20 74 65  |      STRB    te|
00000b60  6d 70 2c 5b 70 6f 69 6e  74 5d 0d 04 88 21 2e 73  |mp,[point]...!.s|
00000b70  6b 69 70 32 20 20 53 54  4d 49 41 20 20 20 61 64  |kip2  STMIA   ad|
00000b80  64 2c 7b 78 2c 79 2c 68  2c 76 7d 0d 04 92 21 20  |d,{x,y,h,v}...! |
00000b90  20 20 20 20 20 20 20 53  55 42 20 20 20 20 20 74  |       SUB     t|
00000ba0  65 6d 70 2c 70 6f 69 6e  74 2c 23 31 0d 04 9c 1f  |emp,point,#1....|
00000bb0  20 20 20 20 20 20 20 20  53 55 42 20 20 20 20 20  |        SUB     |
00000bc0  61 64 64 2c 61 64 64 2c  23 33 36 0d 04 a6 25 20  |add,add,#36...% |
00000bd0  20 20 20 20 20 20 20 41  44 44 20 20 20 20 20 78  |       ADD     x|
00000be0  2c 61 64 64 2c 74 72 61  63 6b 2c 4c 53 4c 23 32  |,add,track,LSL#2|
00000bf0  0d 04 b0 1c 20 20 20 20  20 20 20 20 53 54 52 20  |....        STR |
00000c00  20 20 20 20 74 65 6d 70  2c 5b 78 5d 0d 04 ba 1f  |    temp,[x]....|
00000c10  20 20 20 20 20 20 20 20  4c 44 52 42 20 20 20 20  |        LDRB    |
00000c20  74 65 6d 70 2c 63 6f 6c  6e 6f 32 0d 04 c4 17 20  |temp,colno2.... |
00000c30  20 20 20 20 20 20 20 a4  70 6c 6f 74 74 72 61 63  |       .plottrac|
00000c40  6b 73 0d 04 ce 1f 20 20  20 20 20 20 20 20 41 44  |ks....        AD|
00000c50  44 20 20 20 20 20 61 64  64 2c 61 64 64 2c 23 35  |D     add,add,#5|
00000c60  32 0d 04 d8 22 20 20 20  20 20 20 20 20 43 4d 50  |2..."        CMP|
00000c70  20 20 20 20 20 63 6f 75  6e 74 2c 23 61 6d 6f 75  |     count,#amou|
00000c80  6e 74 25 0d 04 e2 19 20  20 20 20 20 20 20 20 42  |nt%....        B|
00000c90  4c 45 20 20 20 20 20 6c  6f 6f 70 32 0d 04 ec 22  |LE     loop2..."|
00000ca0  20 20 20 20 20 20 20 20  41 44 44 20 20 20 20 20  |        ADD     |
00000cb0  74 72 61 63 6b 2c 74 72  61 63 6b 2c 23 31 0d 04  |track,track,#1..|
00000cc0  f6 22 20 20 20 20 20 20  20 20 43 4d 50 20 20 20  |."        CMP   |
00000cd0  20 20 74 72 61 63 6b 2c  23 74 72 61 63 6b 73 25  |  track,#tracks%|
00000ce0  0d 05 00 1c 20 20 20 20  20 20 20 20 4d 4f 56 47  |....        MOVG|
00000cf0  54 20 20 20 74 72 61 63  6b 2c 23 31 0d 05 0a 18  |T   track,#1....|
00000d00  20 20 20 20 20 20 20 20  42 20 20 20 20 20 20 20  |        B       |
00000d10  6c 6f 6f 70 0d 05 14 1d  2e 65 6e 64 20 20 20 20  |loop.....end    |
00000d20  4c 44 52 20 20 20 20 20  70 63 2c 72 65 74 75 72  |LDR     pc,retur|
00000d30  6e 0d 05 1e 12 2e 72 65  74 75 72 6e 20 45 51 55  |n.....return EQU|
00000d40  44 20 30 0d 05 28 04 0d  05 32 1e 2e 72 65 73 65  |D 0..(...2..rese|
00000d50  74 20 20 4c 44 52 20 20  20 20 20 74 65 6d 70 2c  |t  LDR     temp,|
00000d60  77 68 69 63 68 0d 05 3c  1e 20 20 20 20 20 20 20  |which..<.       |
00000d70  20 43 4d 50 20 20 20 20  20 63 6f 75 6e 74 2c 74  | CMP     count,t|
00000d80  65 6d 70 0d 05 46 1b 20  20 20 20 20 20 20 20 4d  |emp..F.        M|
00000d90  4f 56 4c 54 20 20 20 70  63 2c 6c 69 6e 6b 0d 05  |OVLT   pc,link..|
00000da0  50 2a 20 20 20 20 20 20  20 20 41 44 44 20 20 20  |P*        ADD   |
00000db0  20 20 74 65 6d 70 2c 74  65 6d 70 2c 23 28 61 6d  |  temp,temp,#(am|
00000dc0  6f 75 6e 74 25 2f 33 29  0d 05 5a 1e 20 20 20 20  |ount%/3)..Z.    |
00000dd0  20 20 20 20 43 4d 50 20  20 20 20 20 63 6f 75 6e  |    CMP     coun|
00000de0  74 2c 74 65 6d 70 0d 05  64 1b 20 20 20 20 20 20  |t,temp..d.      |
00000df0  20 20 4d 4f 56 47 54 20  20 20 70 63 2c 6c 69 6e  |  MOVGT   pc,lin|
00000e00  6b 0d 05 6e 1c 20 20 20  20 20 20 20 20 4c 44 52  |k..n.        LDR|
00000e10  20 20 20 20 20 78 2c 78  73 74 61 72 74 0d 05 78  |     x,xstart..x|
00000e20  1c 20 20 20 20 20 20 20  20 4c 44 52 20 20 20 20  |.        LDR    |
00000e30  20 79 2c 79 73 74 61 72  74 0d 05 82 1f 20 20 20  | y,ystart....   |
00000e40  20 20 20 20 20 4c 44 52  20 20 20 20 20 74 65 6d  |     LDR     tem|
00000e50  70 2c 72 6e 64 63 6e 74  0d 05 8c 1c 20 20 20 20  |p,rndcnt....    |
00000e60  20 20 20 20 41 44 52 20  20 20 20 20 68 2c 72 6e  |    ADR     h,rn|
00000e70  64 61 64 64 0d 05 96 1a  20 20 20 20 20 20 20 20  |dadd....        |
00000e80  43 4d 50 20 20 20 20 20  74 65 6d 70 2c 68 0d 05  |CMP     temp,h..|
00000e90  a0 1f 20 20 20 20 20 20  20 20 4c 44 52 47 45 20  |..        LDRGE |
00000ea0  20 20 74 65 6d 70 2c 72  6e 64 61 64 64 0d 05 aa  |  temp,rndadd...|
00000eb0  1f 20 20 20 20 20 20 20  20 4c 44 52 20 20 20 20  |.        LDR    |
00000ec0  20 68 2c 5b 74 65 6d 70  5d 2c 23 34 0d 05 b4 1f  | h,[temp],#4....|
00000ed0  20 20 20 20 20 20 20 20  4c 44 52 20 20 20 20 20  |        LDR     |
00000ee0  76 2c 5b 74 65 6d 70 5d  2c 23 34 0d 05 be 1f 20  |v,[temp],#4.... |
00000ef0  20 20 20 20 20 20 20 53  54 52 20 20 20 20 20 74  |       STR     t|
00000f00  65 6d 70 2c 72 6e 64 63  6e 74 0d 05 c8 21 20 20  |emp,rndcnt...!  |
00000f10  20 20 20 20 20 20 53 54  4d 49 41 20 20 20 61 64  |      STMIA   ad|
00000f20  64 2c 7b 78 2c 79 2c 68  2c 76 7d 0d 05 d2 1b 20  |d,{x,y,h,v}.... |
00000f30  20 20 20 20 20 20 20 4d  4f 56 20 20 20 20 20 70  |       MOV     p|
00000f40  63 2c 6c 69 6e 6b 0d 05  dc 20 2e 73 65 74 20 20  |c,link... .set  |
00000f50  20 20 53 55 42 20 20 20  20 20 6b 65 79 2c 6b 65  |  SUB     key,ke|
00000f60  79 2c 23 31 30 30 0d 05  e6 1c 20 20 20 20 20 20  |y,#100....      |
00000f70  20 20 4c 44 52 20 20 20  20 20 78 2c 78 73 74 61  |  LDR     x,xsta|
00000f80  72 74 0d 05 f0 1c 20 20  20 20 20 20 20 20 4c 44  |rt....        LD|
00000f90  52 20 20 20 20 20 79 2c  79 73 74 61 72 74 0d 05  |R     y,ystart..|
00000fa0  fa 1f 20 20 20 20 20 20  20 20 41 44 44 20 20 20  |..        ADD   |
00000fb0  20 20 78 2c 78 2c 79 2c  4c 53 52 23 31 0d 06 04  |  x,x,y,LSR#1...|
00000fc0  1f 20 20 20 20 20 20 20  20 41 44 44 20 20 20 20  |.        ADD    |
00000fd0  20 78 2c 78 2c 23 31 36  3c 3c 31 36 0d 06 0e 1e  | x,x,#16<<16....|
00000fe0  20 20 20 20 20 20 20 20  43 4d 50 20 20 20 20 20  |        CMP     |
00000ff0  78 2c 23 33 32 30 3c 3c  31 36 0d 06 18 20 20 20  |x,#320<<16...   |
00001000  20 20 20 20 20 20 53 55  42 47 45 20 20 20 78 2c  |      SUBGE   x,|
00001010  78 2c 23 33 30 30 3c 3c  31 36 0d 06 22 1c 20 20  |x,#300<<16..".  |
00001020  20 20 20 20 20 20 53 54  52 20 20 20 20 20 78 2c  |      STR     x,|
00001030  78 73 74 61 72 74 0d 06  2c 19 20 20 20 20 20 20  |xstart..,.      |
00001040  20 20 41 44 44 20 20 20  20 20 79 2c 79 2c 78 0d  |  ADD     y,y,x.|
00001050  06 36 1f 20 20 20 20 20  20 20 20 53 55 42 20 20  |.6.        SUB  |
00001060  20 20 20 79 2c 79 2c 23  36 34 3c 3c 31 36 0d 06  |   y,y,#64<<16..|
00001070  40 1e 20 20 20 20 20 20  20 20 43 4d 50 20 20 20  |@.        CMP   |
00001080  20 20 79 2c 23 32 35 36  3c 3c 31 36 0d 06 4a 20  |  y,#256<<16..J |
00001090  20 20 20 20 20 20 20 20  53 55 42 47 45 20 20 20  |        SUBGE   |
000010a0  79 2c 79 2c 23 32 35 30  3c 3c 31 36 0d 06 54 1c  |y,y,#250<<16..T.|
000010b0  20 20 20 20 20 20 20 20  43 4d 50 20 20 20 20 20  |        CMP     |
000010c0  79 2c 23 31 3c 3c 31 36  0d 06 5e 20 20 20 20 20  |y,#1<<16..^     |
000010d0  20 20 20 20 41 44 44 4c  45 20 20 20 79 2c 79 2c  |    ADDLE   y,y,|
000010e0  23 32 35 30 3c 3c 31 36  0d 06 68 1c 20 20 20 20  |#250<<16..h.    |
000010f0  20 20 20 20 53 54 52 20  20 20 20 20 79 2c 79 73  |    STR     y,ys|
00001100  74 61 72 74 0d 06 72 1e  20 20 20 20 20 20 20 20  |tart..r.        |
00001110  4c 44 52 20 20 20 20 20  74 65 6d 70 2c 77 68 69  |LDR     temp,whi|
00001120  63 68 0d 06 7c 2a 20 20  20 20 20 20 20 20 41 44  |ch..|*        AD|
00001130  44 20 20 20 20 20 74 65  6d 70 2c 74 65 6d 70 2c  |D     temp,temp,|
00001140  23 28 61 6d 6f 75 6e 74  25 2f 33 29 0d 06 86 21  |#(amount%/3)...!|
00001150  20 20 20 20 20 20 20 20  43 4d 50 20 20 20 20 20  |        CMP     |
00001160  74 65 6d 70 2c 23 61 6d  6f 75 6e 74 25 0d 06 90  |temp,#amount%...|
00001170  1b 20 20 20 20 20 20 20  20 4d 4f 56 47 54 20 20  |.        MOVGT  |
00001180  20 74 65 6d 70 2c 23 31  0d 06 9a 1e 20 20 20 20  | temp,#1....    |
00001190  20 20 20 20 53 54 52 20  20 20 20 20 74 65 6d 70  |    STR     temp|
000011a0  2c 77 68 69 63 68 0d 06  a4 1f 20 20 20 20 20 20  |,which....      |
000011b0  20 20 4c 44 52 42 20 20  20 20 74 65 6d 70 2c 63  |  LDRB    temp,c|
000011c0  6f 6c 61 64 64 0d 06 ae  20 20 20 20 20 20 20 20  |oladd...        |
000011d0  20 41 44 44 20 20 20 20  20 74 65 6d 70 2c 74 65  | ADD     temp,te|
000011e0  6d 70 2c 23 32 0d 06 b8  1b 20 20 20 20 20 20 20  |mp,#2....       |
000011f0  20 43 4d 50 20 20 20 20  20 74 65 6d 70 2c 23 36  | CMP     temp,#6|
00001200  0d 06 c2 1b 20 20 20 20  20 20 20 20 4d 4f 56 47  |....        MOVG|
00001210  45 20 20 20 74 65 6d 70  2c 23 30 0d 06 cc 1f 20  |E   temp,#0.... |
00001220  20 20 20 20 20 20 20 53  54 52 42 20 20 20 20 74  |       STRB    t|
00001230  65 6d 70 2c 63 6f 6c 61  64 64 0d 06 d6 1c 20 20  |emp,coladd....  |
00001240  20 20 20 20 20 20 41 44  52 20 20 20 20 20 78 2c  |      ADR     x,|
00001250  63 6f 6c 6f 75 72 0d 06  e0 1f 20 20 20 20 20 20  |colour....      |
00001260  20 20 41 44 44 20 20 20  20 20 74 65 6d 70 2c 78  |  ADD     temp,x|
00001270  2c 74 65 6d 70 0d 06 ea  1c 20 20 20 20 20 20 20  |,temp....       |
00001280  20 4c 44 52 42 20 20 20  20 78 2c 5b 74 65 6d 70  | LDRB    x,[temp|
00001290  5d 0d 06 f4 1a 20 20 20  20 20 20 20 20 41 44 44  |]....        ADD|
000012a0  20 20 20 20 20 78 2c 78  2c 23 33 0d 06 fe 1a 20  |     x,x,#3.... |
000012b0  20 20 20 20 20 20 20 43  4d 50 20 20 20 20 20 78  |       CMP     x|
000012c0  2c 23 32 35 35 0d 07 08  1c 20 20 20 20 20 20 20  |,#255....       |
000012d0  20 53 55 42 47 45 20 20  20 78 2c 78 2c 23 32 35  | SUBGE   x,x,#25|
000012e0  33 0d 07 12 1c 20 20 20  20 20 20 20 20 53 54 52  |3....        STR|
000012f0  42 20 20 20 20 78 2c 5b  74 65 6d 70 5d 0d 07 1c  |B    x,[temp]...|
00001300  20 20 20 20 20 20 20 20  20 4c 44 52 42 20 20 20  |         LDRB   |
00001310  20 79 2c 5b 74 65 6d 70  2c 23 31 5d 21 0d 07 26  | y,[temp,#1]!..&|
00001320  1a 20 20 20 20 20 20 20  20 53 55 42 20 20 20 20  |.        SUB    |
00001330  20 79 2c 79 2c 23 35 0d  07 30 18 20 20 20 20 20  | y,y,#5..0.     |
00001340  20 20 20 43 4d 50 20 20  20 20 20 79 2c 23 31 0d  |   CMP     y,#1.|
00001350  07 3a 1c 20 20 20 20 20  20 20 20 41 44 44 47 45  |.:.        ADDGE|
00001360  20 20 20 79 2c 79 2c 23  32 35 36 0d 07 44 1c 20  |   y,y,#256..D. |
00001370  20 20 20 20 20 20 20 53  54 52 42 20 20 20 20 79  |       STRB    y|
00001380  2c 5b 74 65 6d 70 5d 0d  07 4e 1b 20 20 20 20 20  |,[temp]..N.     |
00001390  20 20 20 4d 4f 56 20 20  20 20 20 70 63 2c 6c 69  |   MOV     pc,li|
000013a0  6e 6b 0d 07 58 04 0d 07  62 1e 2e 63 68 6e 67 32  |nk..X...b..chng2|
000013b0  20 20 4c 44 52 42 20 20  20 20 78 2c 63 6f 6c 6f  |  LDRB    x,colo|
000013c0  75 72 2b 32 0d 07 6c 1c  20 20 20 20 20 20 20 20  |ur+2..l.        |
000013d0  53 54 52 42 20 20 20 20  78 2c 63 6f 6c 6e 6f 31  |STRB    x,colno1|
000013e0  0d 07 76 1e 20 20 20 20  20 20 20 20 4c 44 52 42  |..v.        LDRB|
000013f0  20 20 20 20 78 2c 63 6f  6c 6f 75 72 2b 33 0d 07  |    x,colour+3..|
00001400  80 1c 20 20 20 20 20 20  20 20 53 54 52 42 20 20  |..        STRB  |
00001410  20 20 78 2c 63 6f 6c 6e  6f 32 0d 07 8a 1b 20 20  |  x,colno2....  |
00001420  20 20 20 20 20 20 4d 4f  56 20 20 20 20 20 70 63  |      MOV     pc|
00001430  2c 6c 69 6e 6b 0d 07 94  04 0d 07 9e 1e 2e 63 68  |,link.........ch|
00001440  6e 67 34 20 20 4c 44 52  42 20 20 20 20 78 2c 63  |ng4  LDRB    x,c|
00001450  6f 6c 6f 75 72 2b 34 0d  07 a8 1c 20 20 20 20 20  |olour+4....     |
00001460  20 20 20 53 54 52 42 20  20 20 20 78 2c 63 6f 6c  |   STRB    x,col|
00001470  6e 6f 31 0d 07 b2 1e 20  20 20 20 20 20 20 20 4c  |no1....        L|
00001480  44 52 42 20 20 20 20 78  2c 63 6f 6c 6f 75 72 2b  |DRB    x,colour+|
00001490  35 0d 07 bc 1c 20 20 20  20 20 20 20 20 53 54 52  |5....        STR|
000014a0  42 20 20 20 20 78 2c 63  6f 6c 6e 6f 32 0d 07 c6  |B    x,colno2...|
000014b0  1b 20 20 20 20 20 20 20  20 4d 4f 56 20 20 20 20  |.        MOV    |
000014c0  20 70 63 2c 6c 69 6e 6b  0d 07 d0 04 0d 07 da 1c  | pc,link........|
000014d0  2e 63 68 6e 67 31 20 20  4c 44 52 42 20 20 20 20  |.chng1  LDRB    |
000014e0  78 2c 63 6f 6c 6f 75 72  0d 07 e4 1c 20 20 20 20  |x,colour....    |
000014f0  20 20 20 20 53 54 52 42  20 20 20 20 78 2c 63 6f  |    STRB    x,co|
00001500  6c 6e 6f 31 0d 07 ee 1e  20 20 20 20 20 20 20 20  |lno1....        |
00001510  4c 44 52 42 20 20 20 20  78 2c 63 6f 6c 6f 75 72  |LDRB    x,colour|
00001520  2b 31 0d 07 f8 1c 20 20  20 20 20 20 20 20 53 54  |+1....        ST|
00001530  52 42 20 20 20 20 78 2c  63 6f 6c 6e 6f 32 0d 08  |RB    x,colno2..|
00001540  02 1b 20 20 20 20 20 20  20 20 4d 4f 56 20 20 20  |..        MOV   |
00001550  20 20 70 63 2c 6c 69 6e  6b 0d 08 0c 09 2e 64 61  |  pc,link.....da|
00001560  74 61 0d 08 16 05 5d 0d  08 20 0a ed 70 61 73 73  |ta....].. ..pass|
00001570  25 0d 08 2a 24 c8 99 20  22 4f 53 5f 52 65 61 64  |%..*$.. "OS_Read|
00001580  56 64 75 56 61 72 69 61  62 6c 65 73 22 2c 76 64  |VduVariables",vd|
00001590  75 2c 76 64 75 0d 08 34  0b f2 70 6f 69 6e 74 73  |u,vdu..4..points|
000015a0  0d 08 3e 05 e1 0d 08 48  05 20 0d 08 52 0d dd 20  |..>....H. ..R.. |
000015b0  f2 70 6f 69 6e 74 73 0d  08 5c 12 78 25 3d b3 28  |.points..\.x%=.(|
000015c0  31 32 38 30 29 3c 3c 31  34 0d 08 66 1e 79 25 3d  |1280)<<14..f.y%=|
000015d0  28 32 35 36 3c 3c 31 36  29 2d 28 b3 28 31 30 32  |(256<<16)-(.(102|
000015e0  34 29 3c 3c 31 34 29 0d  08 70 08 6e 25 3d 30 0d  |4)<<14)..p.n%=0.|
000015f0  08 7a 0f 63 3d 34 2a 74  72 61 63 6b 73 25 0d 08  |.z.c=4*tracks%..|
00001600  84 2d e3 20 6e 3d 64 61  74 61 2b 63 20 b8 20 64  |.-. n=data+c . d|
00001610  61 74 61 2b 61 6d 6f 75  6e 74 25 2a 28 31 36 2b  |ata+amount%*(16+|
00001620  63 29 2b 63 20 88 20 31  36 2b 63 0d 08 8e 0a 20  |c)+c . 16+c.... |
00001630  6e 25 2b 3d 32 0d 08 98  43 20 e7 20 6e 25 20 83  |n%+=2...C . n% .|
00001640  20 28 61 6d 6f 75 6e 74  25 2f 35 29 3d 30 20 78  | (amount%/5)=0 x|
00001650  25 3d b3 28 31 32 38 30  29 3c 3c 31 34 3a 79 25  |%=.(1280)<<14:y%|
00001660  3d 28 32 35 36 3c 3c 31  36 29 2d 28 b3 28 31 30  |=(256<<16)-(.(10|
00001670  32 34 29 3c 3c 31 34 29  0d 08 a2 18 20 61 3d b2  |24)<<14).... a=.|
00001680  28 b3 28 33 36 30 30 30  30 29 2f 31 30 30 30 29  |(.(360000)/1000)|
00001690  0d 08 ac 1c 20 64 3d 31  2d 31 2f 28 31 2b b3 28  |.... d=1-1/(1+.(|
000016a0  31 30 30 30 30 29 2f 31  30 30 30 29 0d 08 b6 0a  |10000)/1000)....|
000016b0  20 21 6e 3d 78 25 0d 08  c0 0b 20 6e 21 34 3d 79  | !n=x%.... n!4=y|
000016c0  25 0d 08 ca 16 20 6e 21  38 3d 73 70 65 65 64 25  |%.... n!8=speed%|
000016d0  2a 9b 28 61 29 2a 64 0d  08 d4 17 20 6e 21 31 32  |*.(a)*d.... n!12|
000016e0  3d 73 70 65 65 64 25 2a  b5 28 61 29 2a 64 0d 08  |=speed%*.(a)*d..|
000016f0  de 1b 20 e3 20 6c 25 3d  6e 2b 31 36 20 b8 20 6e  |.. . l%=n+16 . n|
00001700  2b 31 36 2b 63 20 88 20  34 0d 08 e8 0b 20 20 21  |+16+c . 4....  !|
00001710  6c 25 3d 30 0d 08 f2 06  20 ed 0d 08 fc 05 ed 0d  |l%=0.... .......|
00001720  09 06 05 e1 0d 09 10 05  3a 0d 09 1a 11 dd 20 a4  |........:..... .|
00001730  70 6c 6f 74 74 72 61 63  6b 73 0d 09 24 13 e3 20  |plottracks..$.. |
00001740  6e 3d 31 20 b8 20 74 72  61 63 6b 73 25 0d 09 2e  |n=1 . tracks%...|
00001750  0e 5b 4f 50 54 20 70 61  73 73 25 0d 09 38 23 20  |.[OPT pass%..8# |
00001760  20 20 20 20 20 20 20 4c  44 52 20 20 20 20 20 70  |       LDR     p|
00001770  6f 69 6e 74 2c 5b 61 64  64 2c 23 34 5d 21 0d 09  |oint,[add,#4]!..|
00001780  42 1d 20 20 20 20 20 20  20 20 43 4d 50 20 20 20  |B.        CMP   |
00001790  20 20 70 6f 69 6e 74 2c  74 6f 70 0d 09 4c 1e 20  |  point,top..L. |
000017a0  20 20 20 20 20 20 20 43  4d 50 4c 54 20 20 20 62  |       CMPLT   b|
000017b0  61 73 65 2c 70 6f 69 6e  74 0d 09 56 20 20 20 20  |ase,point..V    |
000017c0  20 20 20 20 20 53 54 52  4c 54 42 20 20 74 65 6d  |     STRLTB  tem|
000017d0  70 2c 5b 70 6f 69 6e 74  5d 0d 09 60 05 5d 0d 09  |p,[point]..`.]..|
000017e0  6a 05 ed 0d 09 74 06 3d  30 0d 09 7e 05 3a 0d 09  |j....t.=0..~.:..|
000017f0  88 0f dd 20 a4 72 6e 64  70 6c 61 63 65 0d 09 92  |... .rndplace...|
00001800  0f e3 20 6e 3d 31 20 b8  20 37 30 30 0d 09 9c 17  |.. n=1 . 700....|
00001810  61 3d b2 28 b3 28 33 36  30 30 30 30 29 2f 31 30  |a=.(.(360000)/10|
00001820  30 30 29 0d 09 a6 1b 64  3d 31 2d 31 2f 28 31 2b  |00)....d=1-1/(1+|
00001830  b3 28 31 30 30 30 30 29  2f 31 30 30 30 29 0d 09  |.(10000)/1000)..|
00001840  b0 0e 5b 4f 50 54 20 70  61 73 73 25 0d 09 ba 1c  |..[OPT pass%....|
00001850  20 20 20 20 20 20 20 20  45 51 55 44 20 73 70 65  |        EQUD spe|
00001860  65 64 25 2a 9b 61 2a 64  0d 09 c4 1c 20 20 20 20  |ed%*.a*d....    |
00001870  20 20 20 20 45 51 55 44  20 73 70 65 65 64 25 2a  |    EQUD speed%*|
00001880  b5 61 2a 64 0d 09 ce 05  5d 0d 09 d8 05 ed 0d 09  |.a*d....].......|
00001890  e2 06 3d 30 0d ff                                 |..=0..|
00001896
Files/Programs/BANG2.m0
Files/Programs/BANG2.m1
Files/Programs/BANG2.m2
Files/Programs/BANG2.m4
Files/Programs/BANG2.m5