Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199611.adf » Regulars » StarInfo/Atkins/FIREWORKS

StarInfo/Atkins/FIREWORKS

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 » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199611.adf » Regulars
Filename: StarInfo/Atkins/FIREWORKS
Read OK:
File size: 2EE5 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM> FIREWORKS
   20REM By Keith Atkins.
   30
   40ON ERROR MODE 15: PRINT REPORT$;" AT LINE ";ERL:END
   50
   60REM OPERATIONAL PARAMETERS(1) - (THERES MORE AFTER THE ASSEMBLY)
   70
   80      MAXSPARKS  = 300       :REM MAXIMUM SPARKS PER BURST
   90      SPK_OCNT   = 16        :REM  OLD ENTRIES(MIN IS 2)
  100      MODE 15                :REM SUPPORTS 13 OR 15
  110
  120      OFF
  120      DIM TBL_SIN 4*360
  130      FOR I% = 0 TO 360
  140       TBL_SIN!(I%*4) = SIN(RAD(I%))*2^19   :REM ^19 TO RETAIN PRECIS
  150      NEXT I%
  160
  170REM SPARK TABLE ENTRY DEFINITION.
  180
  190         SPK_X      = 0
  200         SPK_Y      = 4
  210         SPK_LIFE   = 8
  220         SPK_COL    = 12
  230         SPK_THETA  = 16
  240         SPK_MTHETA = 20
  250         SPK_STAT   = 24
  260         SPK_KCNT   = 28
  270         SPK_OX     = 32                  :REM OLD ENTRIES START HERE
  280         SPK_OY     = 36
  290         SPK_BLEN   = 40
  300         SPK_LEN    = SPK_OX+SPK_OCNT*8
  310         SPK_LOX    = SPK_LEN-16
  320         SPK_DELX   = SPK_LEN-8
  330         SPK_DELY   = SPK_DELX+4
  340
  350         POT_X   = 320
  360         POT_Y   = 00
  370         POT_H   = 50
  380         POT_W   = 30
  390         POT_T   = POT_Y+POT_H
  400
  410         DIM SPARKS% SPK_LEN*MAXSPARKS
  420
  430         PROC_ASM
  440
  450REM OPERATIONAL PARAMETERS(2)
  460
  470         !DELAY      = 1         :REM LOOP DELAY BETWEEN SPARKS
  480         !MAXBURST   = 1000      :REM NUMBER OF SPARKS PER CYCLE
  490         CASE MODE OF
  500          WHEN 13:!SCXFAC=1:!SCYFAC=1:!SWIDTH=320:!SHEIGHT=256-1
  510          WHEN 15:!SCXFAC=0:!SCYFAC=1:!SWIDTH=640:!SHEIGHT=256-1
  520               OTHERWISE:
  530               ERROR 99," Mode must be 13 or 15 ":END
  520         ENDCASE
  530
  540         SYS "OS_ReadVduVariables",ascreen,ascreen
  550         CLG
  560         GCOL 3  TINT 192
  570         RECTANGLE FILL 2*POT_X-POT_W,2*POT_Y,2*POT_W,3*POT_H/2
  580         GCOL 11 TINT 192
  590         RECTANGLE FILL 2*POT_X-POT_W,POT_H,2*POT_W,POT_H
  600         CALL FWSTART
  610         CALL CONTROL
  620         END
  630
  640        DEF PROC_ASM
  650        DIM FW 4000
  660
  670REM REGISTER DEFINITIONS
  680
  690     R_SPK    = 12
  700     R_W1     = 11
  710     R_PLT    = 11
  720     R_COLTAB = 10
  730     R_SIN    = 10
  740     R_COS    = 10
  750     R_CNT    = 9
  760     R_THETA  = 8
  770     R_MTHETA = 7
  780     R_SCNT   = 6
  790     R_OLDS   = 5
  800
  810REM R0 - R4 ARE USED AS INSECURE LOCAL WORK REGISTERS
  820
  830     FOR PASS = 0 TO 2 STEP 2
  840     P% = FW
  850     [OPT PASS
  860.CONTROL
  870      STMFD R13!,{R14}
  880.CLOOP
  890      SWI "OS_Mouse"
  900      CMP  R2,#4
  910      BEQ  CSTART
  920      CMP  R2,#1
  930      BEQ  CEXIT
  940      BAL  CLOOP
  950.CSTART
  960      MOV  R1,#0
  970      STR  R1,SPK_COUNT
  980      BL   FWSTART
  990      BAL  CLOOP
 1000.CEXIT
 1010      LDMFD R13!,{R14}
 1020      MOV PC,R14
 1030.FWSTART
 1040      STMFD R13!,{R14}
 1050      BL   REGEN_ALL
 1060      MOV   R0,#0
 1070      STR   R0,BURSTCNT
 1080.SPK_LOOP1
 1090      MOV  R_SCNT,#MAXSPARKS
 1100      LDR  R_SPK,ASPARKS%
 1110.SPK_LOOP2
 1120      LDR  R1,[R_SPK,#SPK_STAT]
 1130      CMP  R1,#0
 1140      BNE  TRY_1
 1150      BL   PRCESS
 1160.TRY_1
 1170      CMP  R1,#1
 1180      BNE  TRY_2
 1190      BL   KILL
 1200.TRY_2
 1210      CMP  R1,#2
 1220      BNE  TRY_3
 1230      BL   OBLIT
 1240.TRY_3
 1250      LDR  R0,DELAY
 1260.LP1  SUBS R0,R0,#1
 1270      BNE  LP1
 1280.NXT_SPK
 1290      ADD  R_SPK,R_SPK,#SPK_LEN
 1300      SUBS R_SCNT,R_SCNT,#1
 1310      BNE  SPK_LOOP2
 1320      LDR   R1,SPK_COUNT
 1330      CMP   R1,#MAXSPARKS
 1340      BLT   SPK_LOOP1
 1350.EXIT
 1360      LDMFD R13!,{R14}
 1370      MOV  PC,R14
 1380;-----------------------------------------------------------------------
 1390.PRCESS
 1400      STMFD R13!,{R1,R14}
 1410      LDR  R_THETA,[R_SPK,#SPK_THETA]
 1420      ADD  R_THETA,R_THETA,#1
 1430      STR  R_THETA,[R_SPK,#SPK_THETA]
 1440      LDR  R_SIN,ASTBL%
 1450      LDR  R_SIN,[R_SIN,R_THETA,LSL#2]
 1460      LDR  R4,[R_SPK,#SPK_Y]
 1470      MUL  R4,R_SIN,R4
 1480      MOV  R4,R4,ASR#19
 1490      ADD  R4,R4,#POT_T
 1500      MOV  R3,R_THETA
 1510      LDR  R_W1,[R_SPK,#SPK_X]
 1520      MUL  R3,R_W1,R3
 1530      MOV  R3,R3,ASR#6
 1540      ADD  R3,R3,#POT_X
 1550      BL   SHOWOLD
 1560      LDR  R_W1,[R_SPK,#SPK_MTHETA]
 1570      CMP  R_THETA,R_W1
 1580      MOVHI R0,#1
 1590      STRHI R0,[R_SPK,#SPK_STAT]
 1600      LDMFD R13!,{R1,R14}
 1610      MOV  PC,R14
 1620;-----------------------------------------------------------------------
 1630;R3 = CURRENT X, R4 = CURRENT Y
 1640.SHOWOLD
 1650      STMFD R13!,{R1-R_CNT,R14}
 1660      MOV  R_CNT,#SPK_OCNT
 1670      ADD  R_OLDS,R_SPK,#SPK_LOX               ;LAST OF OLD ENTRIES
 1680      SUB  R_CNT,R_CNT,#1
 1690      ADR  R_COLTAB,COLTAB
 1700      LDR  R2,[R_SPK,#SPK_COL]
 1710      ADD  R_COLTAB,R2,R_COLTAB
 1720.SETOLD1
 1730      LDR  R1,[R_OLDS,#0]
 1740      LDR  R2,[R_OLDS,#4]
 1750      STR  R1,[R_OLDS,#8]
 1760      STR  R2,[R_OLDS,#12]
 1770      LDRB R0,[R_CNT,R_COLTAB]
 1780      BL   PLT
 1790      SUB  R_OLDS,R_OLDS,#8
 1800      SUBS R_CNT,R_CNT,#1
 1810      BNE  SETOLD1
 1820      STR  R3,[R_SPK,#SPK_OX]
 1830      STR  R4,[R_SPK,#SPK_OY]
 1840      LDMFD R13!,{R1-R_CNT,R14}
 1850      MOV  PC,R14
 1860;-----------------------------------------------------------------------
 1870.PLT
 1880     ]R_W=3:R_H=4:R_XFAC=5:R_YFAC=6:R_PW=7
 1890     [OPT PASS
 1900;R1 = X, R2 = Y, R0 = COLOUR
 1910      STMFD R13!,{R3-R7,R_PLT,R14}
 1920      LDR  R_XFAC,SCXFAC
 1930      MOV  R1,R1,LSR R_XFAC
 1940      LDR  R_YFAC,SCYFAC
 1950      MOV  R2,R2,LSR R_YFAC
 1960      LDR  R_W,SWIDTH
 1970      CMP  R1,R_W
 1980      BHI  PLTEXIT
 1990      LDR  R_H,SHEIGHT
 2000      CMP  R2,R_H
 2010      BHI  PLTEXIT
 2020      RSB  R2,R2,R_H
 2030      LDR  R_PLT,ascreen
 2040      MUL  R_PW,R_W,R2
 2050           ADD  R_PLT,R_PLT,R_PW
 2070      STRB R0,[R_PLT,R1]!
 2080.PLTEXIT
 2090      LDMFD R13!,{R3-R7,R_PLT,R14}
 2100      MOV  PC,R14
 2110
 3280.SCXFAC  EQUD 0
 3290     .SWIDTH  EQUD 0
 3290.SCYFAC  EQUD 0
 3300     .SHEIGHT EQUD 0
 2110;-----------------------------------------------------------------------
 2120.REGEN
 2130     STMFD R13!,{R_CNT,R14}
 2140
 2150     BL   RAND
 2160     AND  R0,R0,#&FF
 2170     SUB  R0,R0,#128
 2180     STR  R0,[R_SPK,#SPK_X]
 2190
 2200     BL   RAND
 2210     ADD  R0,R0,#100
 2220     STR  R0,[R_SPK,#SPK_Y]
 2230
 2240     MOV  R0,#0
 2250     STR  R0,[R_SPK,#SPK_THETA]
 2260     STR  R0,[R_SPK,#SPK_STAT]
 2270     STR  R0,[R_SPK,#SPK_KCNT]
 2280
 2290     BL   RAND
 2300     MOV  R0,R0,ASR#1
 2310     ADD  R0,R0,#50
 2320     STR  R0,[R_SPK,#SPK_MTHETA]
 2330
 2340     BL   RAND
 2350     AND  R0,R0,#7
 2360     MOV  R0,R0,LSL#4
 2370     STR  R0,[R_SPK,#SPK_COL]
 2380
 2390     MOV  R_CNT,#SPK_OCNT
 2400     MOV  R_CNT,R_CNT,LSL#1
 2410     ADD  R1,R_SPK,#SPK_OX
 2420     MOV  R0,#0
 2430.SET_OLDS
 2440     STR  R0,[R1],#4
 2450     SUBS R_CNT,R_CNT,#1
 2460     BNE  SET_OLDS
 2470     LDMFD R13!,{R_CNT,R14}
 2480     MOV   PC,R14
 2490;-----------------------------------------------------------------------
 2500.REGEN_ALL
 2510     STMFD R13!,{R14}
 2520     LDR  R_SPK,ASPARKS%
 2530     MOV  R_SCNT,#MAXSPARKS
 2540.SPK_INIT
 2550     BL   REGEN
 2560     ADD  R_SPK,R_SPK,#SPK_LEN
 2570     SUBS R_SCNT,R_SCNT,#1
 2580     BNE  SPK_INIT
 2590     LDMFD R13!,{R14}
 2600     MOV   PC,R14
 2610;-----------------------------------------------------------------------
 2620.OBLIT
 2630     STMFD R13!,{R1,R14}
 2640     LDR   R0,[R_SPK,#SPK_KCNT]
 2650     ADD   R0,R0,#1
 2660     STR   R0,[R_SPK,#SPK_KCNT]
 2670     CMP   R0,#2
 2680     BNE   OBLITEXIT
 2690     MOV   R_CNT,#SPK_OCNT
 2700.SHOW_NXT1
 2710     MOV   R3,#0
 2720     MOV   R4,#0
 2730     BL    SHOWOLD
 2740     SUBS  R_CNT,R_CNT,#1
 2750     BNE   SHOW_NXT1
 2760     SWI "OS_Mouse"
 2770     CMP  R2,#4
 2780     BEQ  OBREGEN
 2790     LDR  R2,BURSTCNT
 2800     ADD  R2,R2,#1
 2810     STR  R2,BURSTCNT
 2820     LDR  R1,MAXBURST
 2830     CMP  R2,R1
 2840     BHI  OBCON
 2850.OBREGEN
 2860     BL   REGEN
 2870     BAL  OBLITEXIT
 2880.OBCON
 2890     LDR   R1,SPK_COUNT
 2900     ADD   R1,R1,#1
 2910     STR   R1,SPK_COUNT
 2920.OBLITEXIT
 2930     LDMFD R13!,{R1,R14}
 2940     MOV   PC,R14
 2950;-----------------------------------------------------------------------
 2960.KILL
 2970     STMFD R13!,{R1-R_CNT,R14}
 2980     MOV   R_CNT,#SPK_OCNT
 2990     MOV   R0,#2
 3000     STR   R0,[R_SPK,#SPK_STAT]         ;SET OBLITERATE STATUS
 3010     MOV   R0,#128
 3020     STR   R0,[R_SPK,#SPK_COL]
 3030     LDR   R5,[R_SPK,#SPK_OX]
 3040     LDR   R6,[R_SPK,#SPK_OY]
 3050.SHOW_NXT
 3060     BL    RAND
 3070     AND   R0,R0,#3
 3080     SUB   R0,R0,#3
 3090     ADD   R3,R5,R0
 3100     BL    RAND
 3110     AND   R0,R0,#3
 3120     SUB   R0,R0,#3
 3130     ADD   R4,R6,R0
 3140     BL    SHOWOLD
 3150     SUBS  R_CNT,R_CNT,#1
 3160     BNE   SHOW_NXT
 3170     MOV   R_CNT,#SPK_OCNT
 3180     LDMFD R13!,{R1-R_CNT,R14}
 3190     MOV   PC,R14
 3200;-----------------------------------------------------------------------
 3210.SPK_COUNT EQUD 0
 3220.BURSTCNT EQUD 0
 3230.MAXBURST EQUD 0
 3240.ASPARKS% EQUD SPARKS%
 3250.ASTBL%   EQUD TBL_SIN
 3260.DELAY    EQUD 5
 3270.ACTAB%   EQUD 0
 3280
 3300.ascreen  EQUD 148:EQUD -1
 3310.COLTAB
 3320          EQUD &0E0F1FFF                ;BLUE/RED HEAD 0
 3330          EQUD &090A0C0D
 3340          EQUD &090A0C0D
 3350          EQUD &00040508
 3360
 3370          EQUD &CBCECEFF                ;BLUE        16
 3380          EQUD &8FAAAEAF
 3390          EQUD &8FAAAEAF
 3400          EQUD &0081898B
 3410
 3420          EQUD &353637FF                ;RED         32
 3430          EQUD &15161734
 3440          EQUD &15161734
 3450          EQUD &00041014
 3460
 3470          EQUD &43606FFF                ;GREEN       48
 3480          EQUD &23404142
 3490          EQUD &23404142
 3500          EQUD &00202122
 3510
 3520          EQUD &56577FFF               ;YELLOW       64
 3530          EQUD &37373F5C
 3540          EQUD &37373F5C
 3550          EQUD &00073536
 3560
 3570          EQUD &CBCECEFF                ;BLUE        80
 3580          EQUD &8FAAAEAF
 3590          EQUD &8FAAAEAF
 3600          EQUD &0081898B
 3610
 3620          EQUD &3536BFFF                ;RED         96
 3630          EQUD &15161734
 3640          EQUD &15161734
 3650          EQUD &00041014
 3660
 3670          EQUD &43606FFF                ;GREEN       112
 3680          EQUD &23404142
 3690          EQUD &23404142
 3700          EQUD &00202122
 3710
 3720          EQUD &FF00FF00                ;EXPLODE      128
 3730          EQUD &00FF00FF
 3740          EQUD &FF00FF00
 3750          EQUD &00FF00FF
 3760
 3770;-----------------------------------------------------------------------
 3780;DUMP REGISTERS 0-12 AND 14
 3790.DUMP_REGS
 3800       STMFD  R13!,{0-12,14}
 3810       MOV  R11,#0
 3820       SWI  "OS_NewLine"
 3830       SWI  "OS_WriteS"
 3840       EQUS "R0-R7  ":EQUB 0
 3850.DREG_LOOP
 3860       LDR  R0,[R11,R13]
 3870       MOV  R2,#32
 3880       ADR  R1,DUMP_CON
 3890       SWI  "OS_ConvertHex8"
 3900       CMP  R11,#16
 3910       BNE  NTHALF1
 3920       SWI  "OS_WriteS"
 3930       EQUS " ":EQUB 0
 3940.NTHALF1
 3950       CMP  R11,#32
 3960       BNE  NTNEWL
 3970       SWI  "OS_NewLine"
 3980       SWI  "OS_WriteS"
 3990       EQUS "R8-R14 ":EQUB 0
 4000       ALIGN
 4010.NTNEWL
 4020       CMP  R11,#48
 4030       BNE  NTHALF2
 4040       SWI  "OS_WriteS"
 4050       EQUS " ":EQUB 0
 4060       ALIGN
 4070.NTHALF2
 4080       ADR  R0,DUMP_CON
 4090       MOV  R1,#8
 4100       SWI  "OS_WriteN"
 4110       SWI  "OS_WriteS"
 4120       EQUS " ":EQUB 0
 4130       ADD  R11,R11,#4
 4140       CMP  R11,#56
 4150       BNE  DREG_LOOP
 4160       SWI  "OS_NewLine"
 4170.MSLOOP
 4180       SWI "OS_Mouse"
 4190       CMP  R2,#0
 4200       BEQ  MSLOOP
 4210       CMP  R2,#1
 4220       BEQ  CRASH
 4230.MSLOOP1
 4240       SWI "OS_Mouse"
 4250       CMP  R2,#0
 4260       BNE  MSLOOP1
 4270       LDMFD R13!,{0-12,14}
 4280       MOV  PC,R14
 4290
 4300.CRASH
 4310       MOV  PC,#1
 4320
 4330.DUMP_CON
 4340      EQUS STRING$(32,CHR$(0))
 4350      EQUB 13
 4360
 4370]
 4380REM---------------------------------------------------------------------
 4390REM  GENERATE A RANDOM NUMBER (0 - 255) IN RRANDD
 4400RANDS=12:RANDX=11:RRAND=0
 4410
 4420[OPT PASS
 4430.RAND
 4440      STMFD R13!,{RANDX,RANDS,R14}
 4450      LDR RANDS,SEED
 4460      LDR RANDX,XOR
 4470      MOV RRAND,#0
 4480]
 4490
 4500      FOR BIT = 1 TO 8
 4510[OPT PASS
 4520      MOVS RANDS,RANDS,LSL #1
 4530      EORCS RANDS,RANDS,RANDX
 4540      ADC RRAND,RRAND,RRAND
 4550]
 4560      NEXT BIT
 4570[OPT PASS
 4580      STR RANDS,SEED
 4590      LDMFD R13!,{RANDX,RANDS,R14}
 4600      MOV PC,R14
 4610
 4620.SEED EQUD TIME
 4630.XOR  EQUD &1D872B41
 4640]
 4650NEXT PASS
 4660ENDPROC

�> FIREWORKS
� By Keith Atkins.

("� � � 15: � �$;" AT LINE ";�:�
2
<B� OPERATIONAL PARAMETERS(1) - (THERES MORE AFTER THE ASSEMBLY)
F
P<      MAXSPARKS  = 300       :� MAXIMUM SPARKS PER BURST
Z:      SPK_OCNT   = 16        :�  OLD ENTRIES(MIN IS 2)
d2      � 15                :� SUPPORTS 13 OR 15
n
x      �
x      � TBL_SIN 4*360
�      � I% = 0 � 360
�C       TBL_SIN!(I%*4) = �(�(I%))*2^19   :� ^19 TO RETAIN PRECIS
�      � I%
�
�#� SPARK TABLE ENTRY DEFINITION.
�
�         SPK_X      = 0
�         SPK_Y      = 4
�         SPK_LIFE   = 8
�         SPK_COL    = 12
�         SPK_THETA  = 16
�         SPK_MTHETA = 20
�         SPK_STAT   = 24
         SPK_KCNT   = 28
G         SPK_OX     = 32                  :� OLD ENTRIES START HERE
         SPK_OY     = 36
"         SPK_BLEN   = 40
,+         SPK_LEN    = SPK_OX+SPK_OCNT*8
6$         SPK_LOX    = SPK_LEN-16
@#         SPK_DELX   = SPK_LEN-8
J$         SPK_DELY   = SPK_DELX+4
T
^         POT_X   = 320
h         POT_Y   = 00
r         POT_H   = 50
|         POT_W   = 30
�"         POT_T   = POT_Y+POT_H
�
�(         � SPARKS% SPK_LEN*MAXSPARKS
�
�         �_ASM
�
�� OPERATIONAL PARAMETERS(2)
�
�A         !DELAY      = 1         :� LOOP DELAY BETWEEN SPARKS
�B         !MAXBURST   = 1000      :� NUMBER OF SPARKS PER CYCLE
�         Ȏ � �
�A          � 13:!SCXFAC=1:!SCYFAC=1:!SWIDTH=320:!SHEIGHT=256-1
�A          � 15:!SCXFAC=0:!SCYFAC=1:!SWIDTH=640:!SHEIGHT=256-1
               :
3               � 99," Mode must be 13 or 15 ":�
         �

5         ș "OS_ReadVduVariables",ascreen,ascreen
&         �
0         � 3  Ȝ 192
::         ȓ Ȑ 2*POT_X-POT_W,2*POT_Y,2*POT_W,3*POT_H/2
D         � 11 Ȝ 192
N4         ȓ Ȑ 2*POT_X-POT_W,POT_H,2*POT_W,POT_H
X         � FWSTART
b         � CONTROL
l         �
v
�        � �_ASM
�        � FW 4000
�
�� REGISTER DEFINITIONS
�
�     R_SPK    = 12
�     R_W1     = 11
�     R_PLT    = 11
�     R_COLTAB = 10
�     R_SIN    = 10
�     R_COS    = 10
�     R_CNT    = 9
�     R_THETA  = 8
     R_MTHETA = 7
     R_SCNT   = 6
     R_OLDS   = 5
 
*7� R0 - R4 ARE USED AS INSECURE LOCAL WORK REGISTERS
4
>     � PASS = 0 � 2 � 2
H     P% = FW
R     [OPT PASS
\.CONTROL
f      STMFD R13!,{R14}
p
.CLOOP
z      SWI "OS_Mouse"
�      CMP  R2,#4
�      BEQ  CSTART
�      CMP  R2,#1
�      BEQ  CEXIT
�      BAL  CLOOP
�.CSTART
�      MOV  R1,#0
�      STR  R1,SPK_COUNT
�      BL   FWSTART
�      BAL  CLOOP
�
.CEXIT
�      LDMFD R13!,{R14}
�      MOV PC,R14
.FWSTART
      STMFD R13!,{R14}
      BL   REGEN_ALL
$      MOV   R0,#0
.      STR   R0,BURSTCNT
8.SPK_LOOP1
B       MOV  R_SCNT,#MAXSPARKS
L      LDR  R_SPK,ASPARKS%
V.SPK_LOOP2
`#      LDR  R1,[R_SPK,#SPK_STAT]
j      CMP  R1,#0
t      BNE  TRY_1
~      BL   PRCESS
�
.TRY_1
�      CMP  R1,#1
�      BNE  TRY_2
�      BL   KILL
�
.TRY_2
�      CMP  R1,#2
�      BNE  TRY_3
�      BL   OBLIT
�
.TRY_3
�      LDR  R0,DELAY
�.LP1  SUBS R0,R0,#1
�      BNE  LP1
.NXT_SPK

#      ADD  R_SPK,R_SPK,#SPK_LEN
      SUBS R_SCNT,R_SCNT,#1
      BNE  SPK_LOOP2
(      LDR   R1,SPK_COUNT
2      CMP   R1,#MAXSPARKS
<      BLT   SPK_LOOP1
F	.EXIT
P      LDMFD R13!,{R14}
Z      MOV  PC,R14
dL;-----------------------------------------------------------------------
n.PRCESS
x      STMFD R13!,{R1,R14}
�)      LDR  R_THETA,[R_SPK,#SPK_THETA]
�!      ADD  R_THETA,R_THETA,#1
�)      STR  R_THETA,[R_SPK,#SPK_THETA]
�      LDR  R_SIN,ASTBL%
�*      LDR  R_SIN,[R_SIN,R_THETA,LSL#2]
�       LDR  R4,[R_SPK,#SPK_Y]
�      MUL  R4,R_SIN,R4
�      MOV  R4,R4,ASR#19
�      ADD  R4,R4,#POT_T
�      MOV  R3,R_THETA
�"      LDR  R_W1,[R_SPK,#SPK_X]
�      MUL  R3,R_W1,R3
�      MOV  R3,R3,ASR#6
      ADD  R3,R3,#POT_X
      BL   SHOWOLD
'      LDR  R_W1,[R_SPK,#SPK_MTHETA]
"      CMP  R_THETA,R_W1
,      MOVHI R0,#1
6$      STRHI R0,[R_SPK,#SPK_STAT]
@      LDMFD R13!,{R1,R14}
J      MOV  PC,R14
TL;-----------------------------------------------------------------------
^#;R3 = CURRENT X, R4 = CURRENT Y
h.SHOWOLD
r#      STMFD R13!,{R1-R_CNT,R14}
|      MOV  R_CNT,#SPK_OCNT
�E      ADD  R_OLDS,R_SPK,#SPK_LOX               ;LAST � ǘ ENTRIES
�      SUB  R_CNT,R_CNT,#1
�      ADR  R_COLTAB,COLTAB
�"      LDR  R2,[R_SPK,#SPK_COL]
�#      ADD  R_COLTAB,R2,R_COLTAB
�.SETOLD1
�      LDR  R1,[R_OLDS,#0]
�      LDR  R2,[R_OLDS,#4]
�      STR  R1,[R_OLDS,#8]
�      STR  R2,[R_OLDS,#12]
�"      LDRB R0,[R_CNT,R_COLTAB]
�      BL   PLT
�      SUB  R_OLDS,R_OLDS,#8
      SUBS R_CNT,R_CNT,#1
      BNE  SETOLD1
!      STR  R3,[R_SPK,#SPK_OX]
&!      STR  R4,[R_SPK,#SPK_OY]
0#      LDMFD R13!,{R1-R_CNT,R14}
:      MOV  PC,R14
DL;-----------------------------------------------------------------------
N.PLT
X.     ]R_W=3:R_H=4:R_XFAC=5:R_YFAC=6:R_PW=7
b     [OPT PASS
l;R1 = X, R2 = Y, R0 = �
v&      STMFD R13!,{R3-R7,R_PLT,R14}
�      LDR  R_XFAC,SCXFAC
�      MOV  R1,R1,LSR R_XFAC
�      LDR  R_YFAC,SCYFAC
�      MOV  R2,R2,LSR R_YFAC
�      LDR  R_W,SWIDTH
�      CMP  R1,R_W
�      BHI  PLTEXIT
�      LDR  R_H,SHEIGHT
�      CMP  R2,R_H
�      BHI  PLTEXIT
�      RSB  R2,R2,R_H
�      LDR  R_PLT,ascreen
�      MUL  R_PW,R_W,R2
$           ADD  R_PLT,R_PLT,R_PW
      STRB R0,[R_PLT,R1]!
 .PLTEXIT
*&      LDMFD R13!,{R3-R7,R_PLT,R14}
4      MOV  PC,R14
>
�.SCXFAC  EQUD 0
�     .SWIDTH  EQUD 0
�.SCYFAC  EQUD 0
�     .SHEIGHT EQUD 0
>L;-----------------------------------------------------------------------
H
.REGEN
R     STMFD R13!,{R_CNT,R14}
\
f     BL   RAND
p     �  R0,R0,#&FF
z     SUB  R0,R0,#128
�     STR  R0,[R_SPK,#SPK_X]
�
�     BL   RAND
�     ADD  R0,R0,#100
�     STR  R0,[R_SPK,#SPK_Y]
�
�     MOV  R0,#0
�#     STR  R0,[R_SPK,#SPK_THETA]
�"     STR  R0,[R_SPK,#SPK_STAT]
�"     STR  R0,[R_SPK,#SPK_KCNT]
�
�     BL   RAND
�     MOV  R0,R0,ASR#1
	     ADD  R0,R0,#50
	$     STR  R0,[R_SPK,#SPK_MTHETA]
	
	$     BL   RAND
	.     �  R0,R0,#7
	8     MOV  R0,R0,LSL#4
	B!     STR  R0,[R_SPK,#SPK_COL]
	L
	V     MOV  R_CNT,#SPK_OCNT
	`     MOV  R_CNT,R_CNT,LSL#1
	j     ADD  R1,R_SPK,#SPK_OX
	t     MOV  R0,#0
	~
.SET_OLDS
	�     STR  R0,[R1],#4
	�     SUBS R_CNT,R_CNT,#1
	�     BNE  SET_OLDS
	�     LDMFD R13!,{R_CNT,R14}
	�     MOV   PC,R14
	�L;-----------------------------------------------------------------------
	�.REGEN_ALL
	�     STMFD R13!,{R14}
	�     LDR  R_SPK,ASPARKS%
	�     MOV  R_SCNT,#MAXSPARKS
	�
.SPK_INIT
	�     BL   REGEN
"     ADD  R_SPK,R_SPK,#SPK_LEN

     SUBS R_SCNT,R_SCNT,#1
     BNE  SPK_INIT
     LDMFD R13!,{R14}
(     MOV   PC,R14
2L;-----------------------------------------------------------------------
<
.OBLIT
F     STMFD R13!,{R1,R14}
P#     LDR   R0,[R_SPK,#SPK_KCNT]
Z     ADD   R0,R0,#1
d#     STR   R0,[R_SPK,#SPK_KCNT]
n     CMP   R0,#2
x     BNE   OBLITEXIT
�     MOV   R_CNT,#SPK_OCNT
�.SHOW_NXT1
�     MOV   R3,#0
�     MOV   R4,#0
�     BL    SHOWOLD
�     SUBS  R_CNT,R_CNT,#1
�     BNE   SHOW_NXT1
�     SWI "OS_Mouse"
�     CMP  R2,#4
�     BEQ  OBREGEN
�     LDR  R2,BURSTCNT
�     ADD  R2,R2,#1
�     STR  R2,BURSTCNT
     LDR  R1,MAXBURST
     CMP  R2,R1
     BHI  OBCON
".OBREGEN
,     BL   REGEN
6     BAL  OBLITEXIT
@
.OBCON
J     LDR   R1,SPK_COUNT
T     ADD   R1,R1,#1
^     STR   R1,SPK_COUNT
h.OBLITEXIT
r     LDMFD R13!,{R1,R14}
|     MOV   PC,R14
�L;-----------------------------------------------------------------------
�	.KILL
�"     STMFD R13!,{R1-R_CNT,R14}
�     MOV   R_CNT,#SPK_OCNT
�     MOV   R0,#2
�B     STR   R0,[R_SPK,#SPK_STAT]         ;SET OBLITERATE STATUS
�     MOV   R0,#128
�"     STR   R0,[R_SPK,#SPK_COL]
�!     LDR   R5,[R_SPK,#SPK_OX]
�!     LDR   R6,[R_SPK,#SPK_OY]
�
.SHOW_NXT
�     BL    RAND
�     �   R0,R0,#3
     SUB   R0,R0,#3
     ADD   R3,R5,R0
     BL    RAND
&     �   R0,R0,#3
0     SUB   R0,R0,#3
:     ADD   R4,R6,R0
D     BL    SHOWOLD
N     SUBS  R_CNT,R_CNT,#1
X     BNE   SHOW_NXT
b     MOV   R_CNT,#SPK_OCNT
l"     LDMFD R13!,{R1-R_CNT,R14}
v     MOV   PC,R14
�L;-----------------------------------------------------------------------
�.SPK_COUNT EQUD 0
�.BURSTCNT EQUD 0
�.MAXBURST EQUD 0
�.ASPARKS% EQUD SPARKS%
�.ASTBL%   EQUD TBL_SIN
�.DELAY    EQUD 5
�.ACTAB%   EQUD 0
�
�.ascreen  EQUD 148:EQUD -1
�.COLTAB
�<          EQUD &0E0F1FFF                ;BLUE/RED HEAD 0

          EQUD &090A0C0D

          EQUD &090A0C0D

          EQUD &00040508

 

*;          EQUD &CBCECEFF                ;BLUE        16

4          EQUD &8FAAAEAF

>          EQUD &8FAAAEAF

H          EQUD &0081898B

R

\;          EQUD &353637FF                ;RED         32

f          EQUD &15161734

p          EQUD &15161734

z          EQUD &00041014

�

�;          EQUD &43606FFF                ;GREEN       48

�          EQUD &23404142

�          EQUD &23404142

�          EQUD &00202122

�

�;          EQUD &56577FFF               ;YELLOW       64

�          EQUD &37373F5C

�          EQUD &37373F5C

�          EQUD &00073536

�

�;          EQUD &CBCECEFF                ;BLUE        80

�          EQUD &8FAAAEAF
          EQUD &8FAAAEAF
          EQUD &0081898B

$;          EQUD &3536BFFF                ;RED         96
.          EQUD &15161734
8          EQUD &15161734
B          EQUD &00041014
L
V<          EQUD &43606FFF                ;GREEN       112
`          EQUD &23404142
j          EQUD &23404142
t          EQUD &00202122
~
�;          EQUD &FF00FF00                ;�LODE      128
�          EQUD &00FF00FF
�          EQUD &FF00FF00
�          EQUD &00FF00FF
�
�L;-----------------------------------------------------------------------
�;DUMP REGISTERS 0-12 � 14
�.DUMP_REGS
�        STMFD  R13!,{0-12,14}
�       MOV  R11,#0
�       SWI  "OS_NewLine"
�       SWI  "OS_WriteS"
        EQUS "R0-R7  ":EQUB 0

.DREG_LOOP
       LDR  R0,[R11,R13]
       MOV  R2,#32
(       ADR  R1,DUMP_CON
2        SWI  "OS_ConvertHex8"
<       CMP  R11,#16
F       BNE  NTHALF1
P       SWI  "OS_WriteS"
Z       EQUS " ":EQUB 0
d.NTHALF1
n       CMP  R11,#32
x       BNE  NTNEWL
�       SWI  "OS_NewLine"
�       SWI  "OS_WriteS"
�        EQUS "R8-R14 ":EQUB 0
�       ALIGN
�.NTNEWL
�       CMP  R11,#48
�       BNE  NTHALF2
�       SWI  "OS_WriteS"
�       EQUS " ":EQUB 0
�       ALIGN
�.NTHALF2
�       ADR  R0,DUMP_CON
�       MOV  R1,#8
       SWI  "OS_WriteN"
       SWI  "OS_WriteS"
       EQUS " ":EQUB 0
"       ADD  R11,R11,#4
,       CMP  R11,#56
6       BNE  DREG_LOOP
@       SWI  "OS_NewLine"
J.MSLOOP
T       SWI "OS_Mouse"
^       CMP  R2,#0
h       BEQ  MSLOOP
r       CMP  R2,#1
|       BEQ  CRASH
�.MSLOOP1
�       SWI "OS_Mouse"
�       CMP  R2,#0
�       BNE  MSLOOP1
�       LDMFD R13!,{0-12,14}
�       MOV  PC,R14
�
�
.CRASH
�       MOV  PC,#1
�
�
.DUMP_CON
�      EQUS �32,�(0))
�      EQUB 13

]
J�---------------------------------------------------------------------
&3�  GENERATE A RANDOM NUMBER (0 - 255) IN RRANDD
0RANDS=12:RANDX=11:RRAND=0
:
D
[OPT PASS
N	.RAND
X&      STMFD R13!,{RANDX,RANDS,R14}
b      LDR RANDS,SEED
l      LDR RANDX,XOR
v      MOV RRAND,#0
�]
�
�      � BIT = 1 � 8
�
[OPT PASS
�!      MOVS RANDS,RANDS,LSL #1
�      �CS RANDS,RANDS,RANDX
�      ADC RRAND,RRAND,RRAND
�]
�      � BIT
�
[OPT PASS
�      STR RANDS,SEED
�&      LDMFD R13!,{RANDX,RANDS,R14}
�      MOV PC,R14

.SEED EQUD �
.XOR  EQUD &1D872B41
 ]
*
� PASS
4�
�
00000000  0d 00 0a 10 f4 3e 20 46  49 52 45 57 4f 52 4b 53  |.....> FIREWORKS|
00000010  0d 00 14 16 f4 20 42 79  20 4b 65 69 74 68 20 41  |..... By Keith A|
00000020  74 6b 69 6e 73 2e 0d 00  1e 04 0d 00 28 22 ee 20  |tkins.......(". |
00000030  85 20 eb 20 31 35 3a 20  f1 20 f6 24 3b 22 20 41  |. . 15: . .$;" A|
00000040  54 20 4c 49 4e 45 20 22  3b 9e 3a e0 0d 00 32 04  |T LINE ";.:...2.|
00000050  0d 00 3c 42 f4 20 4f 50  45 52 41 54 49 4f 4e 41  |..<B. OPERATIONA|
00000060  4c 20 50 41 52 41 4d 45  54 45 52 53 28 31 29 20  |L PARAMETERS(1) |
00000070  2d 20 28 54 48 45 52 45  53 20 4d 4f 52 45 20 41  |- (THERES MORE A|
00000080  46 54 45 52 20 54 48 45  20 41 53 53 45 4d 42 4c  |FTER THE ASSEMBL|
00000090  59 29 0d 00 46 04 0d 00  50 3c 20 20 20 20 20 20  |Y)..F...P<      |
000000a0  4d 41 58 53 50 41 52 4b  53 20 20 3d 20 33 30 30  |MAXSPARKS  = 300|
000000b0  20 20 20 20 20 20 20 3a  f4 20 4d 41 58 49 4d 55  |       :. MAXIMU|
000000c0  4d 20 53 50 41 52 4b 53  20 50 45 52 20 42 55 52  |M SPARKS PER BUR|
000000d0  53 54 0d 00 5a 3a 20 20  20 20 20 20 53 50 4b 5f  |ST..Z:      SPK_|
000000e0  4f 43 4e 54 20 20 20 3d  20 31 36 20 20 20 20 20  |OCNT   = 16     |
000000f0  20 20 20 3a f4 20 20 4f  4c 44 20 45 4e 54 52 49  |   :.  OLD ENTRI|
00000100  45 53 28 4d 49 4e 20 49  53 20 32 29 0d 00 64 32  |ES(MIN IS 2)..d2|
00000110  20 20 20 20 20 20 eb 20  31 35 20 20 20 20 20 20  |      . 15      |
00000120  20 20 20 20 20 20 20 20  20 20 3a f4 20 53 55 50  |          :. SUP|
00000130  50 4f 52 54 53 20 31 33  20 4f 52 20 31 35 0d 00  |PORTS 13 OR 15..|
00000140  6e 04 0d 00 78 0b 20 20  20 20 20 20 87 0d 00 78  |n...x.      ...x|
00000150  19 20 20 20 20 20 20 de  20 54 42 4c 5f 53 49 4e  |.      . TBL_SIN|
00000160  20 34 2a 33 36 30 0d 00  82 18 20 20 20 20 20 20  | 4*360....      |
00000170  e3 20 49 25 20 3d 20 30  20 b8 20 33 36 30 0d 00  |. I% = 0 . 360..|
00000180  8c 43 20 20 20 20 20 20  20 54 42 4c 5f 53 49 4e  |.C       TBL_SIN|
00000190  21 28 49 25 2a 34 29 20  3d 20 b5 28 b2 28 49 25  |!(I%*4) = .(.(I%|
000001a0  29 29 2a 32 5e 31 39 20  20 20 3a f4 20 5e 31 39  |))*2^19   :. ^19|
000001b0  20 54 4f 20 52 45 54 41  49 4e 20 50 52 45 43 49  | TO RETAIN PRECI|
000001c0  53 0d 00 96 0e 20 20 20  20 20 20 ed 20 49 25 0d  |S....      . I%.|
000001d0  00 a0 04 0d 00 aa 23 f4  20 53 50 41 52 4b 20 54  |......#. SPARK T|
000001e0  41 42 4c 45 20 45 4e 54  52 59 20 44 45 46 49 4e  |ABLE ENTRY DEFIN|
000001f0  49 54 49 4f 4e 2e 0d 00  b4 04 0d 00 be 1b 20 20  |ITION.........  |
00000200  20 20 20 20 20 20 20 53  50 4b 5f 58 20 20 20 20  |       SPK_X    |
00000210  20 20 3d 20 30 0d 00 c8  1b 20 20 20 20 20 20 20  |  = 0....       |
00000220  20 20 53 50 4b 5f 59 20  20 20 20 20 20 3d 20 34  |  SPK_Y      = 4|
00000230  0d 00 d2 1b 20 20 20 20  20 20 20 20 20 53 50 4b  |....         SPK|
00000240  5f 4c 49 46 45 20 20 20  3d 20 38 0d 00 dc 1c 20  |_LIFE   = 8.... |
00000250  20 20 20 20 20 20 20 20  53 50 4b 5f 43 4f 4c 20  |        SPK_COL |
00000260  20 20 20 3d 20 31 32 0d  00 e6 1c 20 20 20 20 20  |   = 12....     |
00000270  20 20 20 20 53 50 4b 5f  54 48 45 54 41 20 20 3d  |    SPK_THETA  =|
00000280  20 31 36 0d 00 f0 1c 20  20 20 20 20 20 20 20 20  | 16....         |
00000290  53 50 4b 5f 4d 54 48 45  54 41 20 3d 20 32 30 0d  |SPK_MTHETA = 20.|
000002a0  00 fa 1c 20 20 20 20 20  20 20 20 20 53 50 4b 5f  |...         SPK_|
000002b0  53 54 41 54 20 20 20 3d  20 32 34 0d 01 04 1c 20  |STAT   = 24.... |
000002c0  20 20 20 20 20 20 20 20  53 50 4b 5f 4b 43 4e 54  |        SPK_KCNT|
000002d0  20 20 20 3d 20 32 38 0d  01 0e 47 20 20 20 20 20  |   = 28...G     |
000002e0  20 20 20 20 53 50 4b 5f  4f 58 20 20 20 20 20 3d  |    SPK_OX     =|
000002f0  20 33 32 20 20 20 20 20  20 20 20 20 20 20 20 20  | 32             |
00000300  20 20 20 20 20 3a f4 20  4f 4c 44 20 45 4e 54 52  |     :. OLD ENTR|
00000310  49 45 53 20 53 54 41 52  54 20 48 45 52 45 0d 01  |IES START HERE..|
00000320  18 1c 20 20 20 20 20 20  20 20 20 53 50 4b 5f 4f  |..         SPK_O|
00000330  59 20 20 20 20 20 3d 20  33 36 0d 01 22 1c 20 20  |Y     = 36..".  |
00000340  20 20 20 20 20 20 20 53  50 4b 5f 42 4c 45 4e 20  |       SPK_BLEN |
00000350  20 20 3d 20 34 30 0d 01  2c 2b 20 20 20 20 20 20  |  = 40..,+      |
00000360  20 20 20 53 50 4b 5f 4c  45 4e 20 20 20 20 3d 20  |   SPK_LEN    = |
00000370  53 50 4b 5f 4f 58 2b 53  50 4b 5f 4f 43 4e 54 2a  |SPK_OX+SPK_OCNT*|
00000380  38 0d 01 36 24 20 20 20  20 20 20 20 20 20 53 50  |8..6$         SP|
00000390  4b 5f 4c 4f 58 20 20 20  20 3d 20 53 50 4b 5f 4c  |K_LOX    = SPK_L|
000003a0  45 4e 2d 31 36 0d 01 40  23 20 20 20 20 20 20 20  |EN-16..@#       |
000003b0  20 20 53 50 4b 5f 44 45  4c 58 20 20 20 3d 20 53  |  SPK_DELX   = S|
000003c0  50 4b 5f 4c 45 4e 2d 38  0d 01 4a 24 20 20 20 20  |PK_LEN-8..J$    |
000003d0  20 20 20 20 20 53 50 4b  5f 44 45 4c 59 20 20 20  |     SPK_DELY   |
000003e0  3d 20 53 50 4b 5f 44 45  4c 58 2b 34 0d 01 54 04  |= SPK_DELX+4..T.|
000003f0  0d 01 5e 1a 20 20 20 20  20 20 20 20 20 50 4f 54  |..^.         POT|
00000400  5f 58 20 20 20 3d 20 33  32 30 0d 01 68 19 20 20  |_X   = 320..h.  |
00000410  20 20 20 20 20 20 20 50  4f 54 5f 59 20 20 20 3d  |       POT_Y   =|
00000420  20 30 30 0d 01 72 19 20  20 20 20 20 20 20 20 20  | 00..r.         |
00000430  50 4f 54 5f 48 20 20 20  3d 20 35 30 0d 01 7c 19  |POT_H   = 50..|.|
00000440  20 20 20 20 20 20 20 20  20 50 4f 54 5f 57 20 20  |         POT_W  |
00000450  20 3d 20 33 30 0d 01 86  22 20 20 20 20 20 20 20  | = 30..."       |
00000460  20 20 50 4f 54 5f 54 20  20 20 3d 20 50 4f 54 5f  |  POT_T   = POT_|
00000470  59 2b 50 4f 54 5f 48 0d  01 90 04 0d 01 9a 28 20  |Y+POT_H.......( |
00000480  20 20 20 20 20 20 20 20  de 20 53 50 41 52 4b 53  |        . SPARKS|
00000490  25 20 53 50 4b 5f 4c 45  4e 2a 4d 41 58 53 50 41  |% SPK_LEN*MAXSPA|
000004a0  52 4b 53 0d 01 a4 04 0d  01 ae 12 20 20 20 20 20  |RKS........     |
000004b0  20 20 20 20 f2 5f 41 53  4d 0d 01 b8 04 0d 01 c2  |    ._ASM.......|
000004c0  1f f4 20 4f 50 45 52 41  54 49 4f 4e 41 4c 20 50  |.. OPERATIONAL P|
000004d0  41 52 41 4d 45 54 45 52  53 28 32 29 0d 01 cc 04  |ARAMETERS(2)....|
000004e0  0d 01 d6 41 20 20 20 20  20 20 20 20 20 21 44 45  |...A         !DE|
000004f0  4c 41 59 20 20 20 20 20  20 3d 20 31 20 20 20 20  |LAY      = 1    |
00000500  20 20 20 20 20 3a f4 20  4c 4f 4f 50 20 44 45 4c  |     :. LOOP DEL|
00000510  41 59 20 42 45 54 57 45  45 4e 20 53 50 41 52 4b  |AY BETWEEN SPARK|
00000520  53 0d 01 e0 42 20 20 20  20 20 20 20 20 20 21 4d  |S...B         !M|
00000530  41 58 42 55 52 53 54 20  20 20 3d 20 31 30 30 30  |AXBURST   = 1000|
00000540  20 20 20 20 20 20 3a f4  20 4e 55 4d 42 45 52 20  |      :. NUMBER |
00000550  4f 46 20 53 50 41 52 4b  53 20 50 45 52 20 43 59  |OF SPARKS PER CY|
00000560  43 4c 45 0d 01 ea 13 20  20 20 20 20 20 20 20 20  |CLE....         |
00000570  c8 8e 20 eb 20 ca 0d 01  f4 41 20 20 20 20 20 20  |.. . ....A      |
00000580  20 20 20 20 c9 20 31 33  3a 21 53 43 58 46 41 43  |    . 13:!SCXFAC|
00000590  3d 31 3a 21 53 43 59 46  41 43 3d 31 3a 21 53 57  |=1:!SCYFAC=1:!SW|
000005a0  49 44 54 48 3d 33 32 30  3a 21 53 48 45 49 47 48  |IDTH=320:!SHEIGH|
000005b0  54 3d 32 35 36 2d 31 0d  01 fe 41 20 20 20 20 20  |T=256-1...A     |
000005c0  20 20 20 20 20 c9 20 31  35 3a 21 53 43 58 46 41  |     . 15:!SCXFA|
000005d0  43 3d 30 3a 21 53 43 59  46 41 43 3d 31 3a 21 53  |C=0:!SCYFAC=1:!S|
000005e0  57 49 44 54 48 3d 36 34  30 3a 21 53 48 45 49 47  |WIDTH=640:!SHEIG|
000005f0  48 54 3d 32 35 36 2d 31  0d 02 08 15 20 20 20 20  |HT=256-1....    |
00000600  20 20 20 20 20 20 20 20  20 20 20 7f 3a 0d 02 12  |           .:...|
00000610  33 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |3               |
00000620  85 20 39 39 2c 22 20 4d  6f 64 65 20 6d 75 73 74  |. 99," Mode must|
00000630  20 62 65 20 31 33 20 6f  72 20 31 35 20 22 3a e0  | be 13 or 15 ":.|
00000640  0d 02 08 0e 20 20 20 20  20 20 20 20 20 cb 0d 02  |....         ...|
00000650  12 04 0d 02 1c 35 20 20  20 20 20 20 20 20 20 c8  |.....5         .|
00000660  99 20 22 4f 53 5f 52 65  61 64 56 64 75 56 61 72  |. "OS_ReadVduVar|
00000670  69 61 62 6c 65 73 22 2c  61 73 63 72 65 65 6e 2c  |iables",ascreen,|
00000680  61 73 63 72 65 65 6e 0d  02 26 0e 20 20 20 20 20  |ascreen..&.     |
00000690  20 20 20 20 da 0d 02 30  18 20 20 20 20 20 20 20  |    ...0.       |
000006a0  20 20 e6 20 33 20 20 c8  9c 20 31 39 32 0d 02 3a  |  . 3  .. 192..:|
000006b0  3a 20 20 20 20 20 20 20  20 20 c8 93 20 c8 90 20  |:         .. .. |
000006c0  32 2a 50 4f 54 5f 58 2d  50 4f 54 5f 57 2c 32 2a  |2*POT_X-POT_W,2*|
000006d0  50 4f 54 5f 59 2c 32 2a  50 4f 54 5f 57 2c 33 2a  |POT_Y,2*POT_W,3*|
000006e0  50 4f 54 5f 48 2f 32 0d  02 44 18 20 20 20 20 20  |POT_H/2..D.     |
000006f0  20 20 20 20 e6 20 31 31  20 c8 9c 20 31 39 32 0d  |    . 11 .. 192.|
00000700  02 4e 34 20 20 20 20 20  20 20 20 20 c8 93 20 c8  |.N4         .. .|
00000710  90 20 32 2a 50 4f 54 5f  58 2d 50 4f 54 5f 57 2c  |. 2*POT_X-POT_W,|
00000720  50 4f 54 5f 48 2c 32 2a  50 4f 54 5f 57 2c 50 4f  |POT_H,2*POT_W,PO|
00000730  54 5f 48 0d 02 58 16 20  20 20 20 20 20 20 20 20  |T_H..X.         |
00000740  d6 20 46 57 53 54 41 52  54 0d 02 62 16 20 20 20  |. FWSTART..b.   |
00000750  20 20 20 20 20 20 d6 20  43 4f 4e 54 52 4f 4c 0d  |      . CONTROL.|
00000760  02 6c 0e 20 20 20 20 20  20 20 20 20 e0 0d 02 76  |.l.         ...v|
00000770  04 0d 02 80 13 20 20 20  20 20 20 20 20 dd 20 f2  |.....        . .|
00000780  5f 41 53 4d 0d 02 8a 15  20 20 20 20 20 20 20 20  |_ASM....        |
00000790  de 20 46 57 20 34 30 30  30 0d 02 94 04 0d 02 9e  |. FW 4000.......|
000007a0  1a f4 20 52 45 47 49 53  54 45 52 20 44 45 46 49  |.. REGISTER DEFI|
000007b0  4e 49 54 49 4f 4e 53 0d  02 a8 04 0d 02 b2 16 20  |NITIONS........ |
000007c0  20 20 20 20 52 5f 53 50  4b 20 20 20 20 3d 20 31  |    R_SPK    = 1|
000007d0  32 0d 02 bc 16 20 20 20  20 20 52 5f 57 31 20 20  |2....     R_W1  |
000007e0  20 20 20 3d 20 31 31 0d  02 c6 16 20 20 20 20 20  |   = 11....     |
000007f0  52 5f 50 4c 54 20 20 20  20 3d 20 31 31 0d 02 d0  |R_PLT    = 11...|
00000800  16 20 20 20 20 20 52 5f  43 4f 4c 54 41 42 20 3d  |.     R_COLTAB =|
00000810  20 31 30 0d 02 da 16 20  20 20 20 20 52 5f 53 49  | 10....     R_SI|
00000820  4e 20 20 20 20 3d 20 31  30 0d 02 e4 16 20 20 20  |N    = 10....   |
00000830  20 20 52 5f 43 4f 53 20  20 20 20 3d 20 31 30 0d  |  R_COS    = 10.|
00000840  02 ee 15 20 20 20 20 20  52 5f 43 4e 54 20 20 20  |...     R_CNT   |
00000850  20 3d 20 39 0d 02 f8 15  20 20 20 20 20 52 5f 54  | = 9....     R_T|
00000860  48 45 54 41 20 20 3d 20  38 0d 03 02 15 20 20 20  |HETA  = 8....   |
00000870  20 20 52 5f 4d 54 48 45  54 41 20 3d 20 37 0d 03  |  R_MTHETA = 7..|
00000880  0c 15 20 20 20 20 20 52  5f 53 43 4e 54 20 20 20  |..     R_SCNT   |
00000890  3d 20 36 0d 03 16 15 20  20 20 20 20 52 5f 4f 4c  |= 6....     R_OL|
000008a0  44 53 20 20 20 3d 20 35  0d 03 20 04 0d 03 2a 37  |DS   = 5.. ...*7|
000008b0  f4 20 52 30 20 2d 20 52  34 20 41 52 45 20 55 53  |. R0 - R4 ARE US|
000008c0  45 44 20 41 53 20 49 4e  53 45 43 55 52 45 20 4c  |ED AS INSECURE L|
000008d0  4f 43 41 4c 20 57 4f 52  4b 20 52 45 47 49 53 54  |OCAL WORK REGIST|
000008e0  45 52 53 0d 03 34 04 0d  03 3e 1b 20 20 20 20 20  |ERS..4...>.     |
000008f0  e3 20 50 41 53 53 20 3d  20 30 20 b8 20 32 20 88  |. PASS = 0 . 2 .|
00000900  20 32 0d 03 48 10 20 20  20 20 20 50 25 20 3d 20  | 2..H.     P% = |
00000910  46 57 0d 03 52 12 20 20  20 20 20 5b 4f 50 54 20  |FW..R.     [OPT |
00000920  50 41 53 53 0d 03 5c 0c  2e 43 4f 4e 54 52 4f 4c  |PASS..\..CONTROL|
00000930  0d 03 66 1a 20 20 20 20  20 20 53 54 4d 46 44 20  |..f.      STMFD |
00000940  52 31 33 21 2c 7b 52 31  34 7d 0d 03 70 0a 2e 43  |R13!,{R14}..p..C|
00000950  4c 4f 4f 50 0d 03 7a 18  20 20 20 20 20 20 53 57  |LOOP..z.      SW|
00000960  49 20 22 4f 53 5f 4d 6f  75 73 65 22 0d 03 84 14  |I "OS_Mouse"....|
00000970  20 20 20 20 20 20 43 4d  50 20 20 52 32 2c 23 34  |      CMP  R2,#4|
00000980  0d 03 8e 15 20 20 20 20  20 20 42 45 51 20 20 43  |....      BEQ  C|
00000990  53 54 41 52 54 0d 03 98  14 20 20 20 20 20 20 43  |START....      C|
000009a0  4d 50 20 20 52 32 2c 23  31 0d 03 a2 14 20 20 20  |MP  R2,#1....   |
000009b0  20 20 20 42 45 51 20 20  43 45 58 49 54 0d 03 ac  |   BEQ  CEXIT...|
000009c0  14 20 20 20 20 20 20 42  41 4c 20 20 43 4c 4f 4f  |.      BAL  CLOO|
000009d0  50 0d 03 b6 0b 2e 43 53  54 41 52 54 0d 03 c0 14  |P.....CSTART....|
000009e0  20 20 20 20 20 20 4d 4f  56 20 20 52 31 2c 23 30  |      MOV  R1,#0|
000009f0  0d 03 ca 1b 20 20 20 20  20 20 53 54 52 20 20 52  |....      STR  R|
00000a00  31 2c 53 50 4b 5f 43 4f  55 4e 54 0d 03 d4 16 20  |1,SPK_COUNT.... |
00000a10  20 20 20 20 20 42 4c 20  20 20 46 57 53 54 41 52  |     BL   FWSTAR|
00000a20  54 0d 03 de 14 20 20 20  20 20 20 42 41 4c 20 20  |T....      BAL  |
00000a30  43 4c 4f 4f 50 0d 03 e8  0a 2e 43 45 58 49 54 0d  |CLOOP.....CEXIT.|
00000a40  03 f2 1a 20 20 20 20 20  20 4c 44 4d 46 44 20 52  |...      LDMFD R|
00000a50  31 33 21 2c 7b 52 31 34  7d 0d 03 fc 14 20 20 20  |13!,{R14}....   |
00000a60  20 20 20 4d 4f 56 20 50  43 2c 52 31 34 0d 04 06  |   MOV PC,R14...|
00000a70  0c 2e 46 57 53 54 41 52  54 0d 04 10 1a 20 20 20  |..FWSTART....   |
00000a80  20 20 20 53 54 4d 46 44  20 52 31 33 21 2c 7b 52  |   STMFD R13!,{R|
00000a90  31 34 7d 0d 04 1a 18 20  20 20 20 20 20 42 4c 20  |14}....      BL |
00000aa0  20 20 52 45 47 45 4e 5f  41 4c 4c 0d 04 24 15 20  |  REGEN_ALL..$. |
00000ab0  20 20 20 20 20 4d 4f 56  20 20 20 52 30 2c 23 30  |     MOV   R0,#0|
00000ac0  0d 04 2e 1b 20 20 20 20  20 20 53 54 52 20 20 20  |....      STR   |
00000ad0  52 30 2c 42 55 52 53 54  43 4e 54 0d 04 38 0e 2e  |R0,BURSTCNT..8..|
00000ae0  53 50 4b 5f 4c 4f 4f 50  31 0d 04 42 20 20 20 20  |SPK_LOOP1..B    |
00000af0  20 20 20 4d 4f 56 20 20  52 5f 53 43 4e 54 2c 23  |   MOV  R_SCNT,#|
00000b00  4d 41 58 53 50 41 52 4b  53 0d 04 4c 1d 20 20 20  |MAXSPARKS..L.   |
00000b10  20 20 20 4c 44 52 20 20  52 5f 53 50 4b 2c 41 53  |   LDR  R_SPK,AS|
00000b20  50 41 52 4b 53 25 0d 04  56 0e 2e 53 50 4b 5f 4c  |PARKS%..V..SPK_L|
00000b30  4f 4f 50 32 0d 04 60 23  20 20 20 20 20 20 4c 44  |OOP2..`#      LD|
00000b40  52 20 20 52 31 2c 5b 52  5f 53 50 4b 2c 23 53 50  |R  R1,[R_SPK,#SP|
00000b50  4b 5f 53 54 41 54 5d 0d  04 6a 14 20 20 20 20 20  |K_STAT]..j.     |
00000b60  20 43 4d 50 20 20 52 31  2c 23 30 0d 04 74 14 20  | CMP  R1,#0..t. |
00000b70  20 20 20 20 20 42 4e 45  20 20 54 52 59 5f 31 0d  |     BNE  TRY_1.|
00000b80  04 7e 15 20 20 20 20 20  20 42 4c 20 20 20 50 52  |.~.      BL   PR|
00000b90  43 45 53 53 0d 04 88 0a  2e 54 52 59 5f 31 0d 04  |CESS.....TRY_1..|
00000ba0  92 14 20 20 20 20 20 20  43 4d 50 20 20 52 31 2c  |..      CMP  R1,|
00000bb0  23 31 0d 04 9c 14 20 20  20 20 20 20 42 4e 45 20  |#1....      BNE |
00000bc0  20 54 52 59 5f 32 0d 04  a6 13 20 20 20 20 20 20  | TRY_2....      |
00000bd0  42 4c 20 20 20 4b 49 4c  4c 0d 04 b0 0a 2e 54 52  |BL   KILL.....TR|
00000be0  59 5f 32 0d 04 ba 14 20  20 20 20 20 20 43 4d 50  |Y_2....      CMP|
00000bf0  20 20 52 31 2c 23 32 0d  04 c4 14 20 20 20 20 20  |  R1,#2....     |
00000c00  20 42 4e 45 20 20 54 52  59 5f 33 0d 04 ce 14 20  | BNE  TRY_3.... |
00000c10  20 20 20 20 20 42 4c 20  20 20 4f 42 4c 49 54 0d  |     BL   OBLIT.|
00000c20  04 d8 0a 2e 54 52 59 5f  33 0d 04 e2 17 20 20 20  |....TRY_3....   |
00000c30  20 20 20 4c 44 52 20 20  52 30 2c 44 45 4c 41 59  |   LDR  R0,DELAY|
00000c40  0d 04 ec 17 2e 4c 50 31  20 20 53 55 42 53 20 52  |.....LP1  SUBS R|
00000c50  30 2c 52 30 2c 23 31 0d  04 f6 12 20 20 20 20 20  |0,R0,#1....     |
00000c60  20 42 4e 45 20 20 4c 50  31 0d 05 00 0c 2e 4e 58  | BNE  LP1.....NX|
00000c70  54 5f 53 50 4b 0d 05 0a  23 20 20 20 20 20 20 41  |T_SPK...#      A|
00000c80  44 44 20 20 52 5f 53 50  4b 2c 52 5f 53 50 4b 2c  |DD  R_SPK,R_SPK,|
00000c90  23 53 50 4b 5f 4c 45 4e  0d 05 14 1f 20 20 20 20  |#SPK_LEN....    |
00000ca0  20 20 53 55 42 53 20 52  5f 53 43 4e 54 2c 52 5f  |  SUBS R_SCNT,R_|
00000cb0  53 43 4e 54 2c 23 31 0d  05 1e 18 20 20 20 20 20  |SCNT,#1....     |
00000cc0  20 42 4e 45 20 20 53 50  4b 5f 4c 4f 4f 50 32 0d  | BNE  SPK_LOOP2.|
00000cd0  05 28 1c 20 20 20 20 20  20 4c 44 52 20 20 20 52  |.(.      LDR   R|
00000ce0  31 2c 53 50 4b 5f 43 4f  55 4e 54 0d 05 32 1d 20  |1,SPK_COUNT..2. |
00000cf0  20 20 20 20 20 43 4d 50  20 20 20 52 31 2c 23 4d  |     CMP   R1,#M|
00000d00  41 58 53 50 41 52 4b 53  0d 05 3c 19 20 20 20 20  |AXSPARKS..<.    |
00000d10  20 20 42 4c 54 20 20 20  53 50 4b 5f 4c 4f 4f 50  |  BLT   SPK_LOOP|
00000d20  31 0d 05 46 09 2e 45 58  49 54 0d 05 50 1a 20 20  |1..F..EXIT..P.  |
00000d30  20 20 20 20 4c 44 4d 46  44 20 52 31 33 21 2c 7b  |    LDMFD R13!,{|
00000d40  52 31 34 7d 0d 05 5a 15  20 20 20 20 20 20 4d 4f  |R14}..Z.      MO|
00000d50  56 20 20 50 43 2c 52 31  34 0d 05 64 4c 3b 2d 2d  |V  PC,R14..dL;--|
00000d60  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000da0  2d 2d 2d 2d 2d 0d 05 6e  0b 2e 50 52 43 45 53 53  |-----..n..PRCESS|
00000db0  0d 05 78 1d 20 20 20 20  20 20 53 54 4d 46 44 20  |..x.      STMFD |
00000dc0  52 31 33 21 2c 7b 52 31  2c 52 31 34 7d 0d 05 82  |R13!,{R1,R14}...|
00000dd0  29 20 20 20 20 20 20 4c  44 52 20 20 52 5f 54 48  |)      LDR  R_TH|
00000de0  45 54 41 2c 5b 52 5f 53  50 4b 2c 23 53 50 4b 5f  |ETA,[R_SPK,#SPK_|
00000df0  54 48 45 54 41 5d 0d 05  8c 21 20 20 20 20 20 20  |THETA]...!      |
00000e00  41 44 44 20 20 52 5f 54  48 45 54 41 2c 52 5f 54  |ADD  R_THETA,R_T|
00000e10  48 45 54 41 2c 23 31 0d  05 96 29 20 20 20 20 20  |HETA,#1...)     |
00000e20  20 53 54 52 20 20 52 5f  54 48 45 54 41 2c 5b 52  | STR  R_THETA,[R|
00000e30  5f 53 50 4b 2c 23 53 50  4b 5f 54 48 45 54 41 5d  |_SPK,#SPK_THETA]|
00000e40  0d 05 a0 1b 20 20 20 20  20 20 4c 44 52 20 20 52  |....      LDR  R|
00000e50  5f 53 49 4e 2c 41 53 54  42 4c 25 0d 05 aa 2a 20  |_SIN,ASTBL%...* |
00000e60  20 20 20 20 20 4c 44 52  20 20 52 5f 53 49 4e 2c  |     LDR  R_SIN,|
00000e70  5b 52 5f 53 49 4e 2c 52  5f 54 48 45 54 41 2c 4c  |[R_SIN,R_THETA,L|
00000e80  53 4c 23 32 5d 0d 05 b4  20 20 20 20 20 20 20 4c  |SL#2]...       L|
00000e90  44 52 20 20 52 34 2c 5b  52 5f 53 50 4b 2c 23 53  |DR  R4,[R_SPK,#S|
00000ea0  50 4b 5f 59 5d 0d 05 be  1a 20 20 20 20 20 20 4d  |PK_Y]....      M|
00000eb0  55 4c 20 20 52 34 2c 52  5f 53 49 4e 2c 52 34 0d  |UL  R4,R_SIN,R4.|
00000ec0  05 c8 1b 20 20 20 20 20  20 4d 4f 56 20 20 52 34  |...      MOV  R4|
00000ed0  2c 52 34 2c 41 53 52 23  31 39 0d 05 d2 1b 20 20  |,R4,ASR#19....  |
00000ee0  20 20 20 20 41 44 44 20  20 52 34 2c 52 34 2c 23  |    ADD  R4,R4,#|
00000ef0  50 4f 54 5f 54 0d 05 dc  19 20 20 20 20 20 20 4d  |POT_T....      M|
00000f00  4f 56 20 20 52 33 2c 52  5f 54 48 45 54 41 0d 05  |OV  R3,R_THETA..|
00000f10  e6 22 20 20 20 20 20 20  4c 44 52 20 20 52 5f 57  |."      LDR  R_W|
00000f20  31 2c 5b 52 5f 53 50 4b  2c 23 53 50 4b 5f 58 5d  |1,[R_SPK,#SPK_X]|
00000f30  0d 05 f0 19 20 20 20 20  20 20 4d 55 4c 20 20 52  |....      MUL  R|
00000f40  33 2c 52 5f 57 31 2c 52  33 0d 05 fa 1a 20 20 20  |3,R_W1,R3....   |
00000f50  20 20 20 4d 4f 56 20 20  52 33 2c 52 33 2c 41 53  |   MOV  R3,R3,AS|
00000f60  52 23 36 0d 06 04 1b 20  20 20 20 20 20 41 44 44  |R#6....      ADD|
00000f70  20 20 52 33 2c 52 33 2c  23 50 4f 54 5f 58 0d 06  |  R3,R3,#POT_X..|
00000f80  0e 16 20 20 20 20 20 20  42 4c 20 20 20 53 48 4f  |..      BL   SHO|
00000f90  57 4f 4c 44 0d 06 18 27  20 20 20 20 20 20 4c 44  |WOLD...'      LD|
00000fa0  52 20 20 52 5f 57 31 2c  5b 52 5f 53 50 4b 2c 23  |R  R_W1,[R_SPK,#|
00000fb0  53 50 4b 5f 4d 54 48 45  54 41 5d 0d 06 22 1b 20  |SPK_MTHETA]..". |
00000fc0  20 20 20 20 20 43 4d 50  20 20 52 5f 54 48 45 54  |     CMP  R_THET|
00000fd0  41 2c 52 5f 57 31 0d 06  2c 15 20 20 20 20 20 20  |A,R_W1..,.      |
00000fe0  4d 4f 56 48 49 20 52 30  2c 23 31 0d 06 36 24 20  |MOVHI R0,#1..6$ |
00000ff0  20 20 20 20 20 53 54 52  48 49 20 52 30 2c 5b 52  |     STRHI R0,[R|
00001000  5f 53 50 4b 2c 23 53 50  4b 5f 53 54 41 54 5d 0d  |_SPK,#SPK_STAT].|
00001010  06 40 1d 20 20 20 20 20  20 4c 44 4d 46 44 20 52  |.@.      LDMFD R|
00001020  31 33 21 2c 7b 52 31 2c  52 31 34 7d 0d 06 4a 15  |13!,{R1,R14}..J.|
00001030  20 20 20 20 20 20 4d 4f  56 20 20 50 43 2c 52 31  |      MOV  PC,R1|
00001040  34 0d 06 54 4c 3b 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |4..TL;----------|
00001050  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001080  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 0d 06 5e  |-------------..^|
00001090  23 3b 52 33 20 3d 20 43  55 52 52 45 4e 54 20 58  |#;R3 = CURRENT X|
000010a0  2c 20 52 34 20 3d 20 43  55 52 52 45 4e 54 20 59  |, R4 = CURRENT Y|
000010b0  0d 06 68 0c 2e 53 48 4f  57 4f 4c 44 0d 06 72 23  |..h..SHOWOLD..r#|
000010c0  20 20 20 20 20 20 53 54  4d 46 44 20 52 31 33 21  |      STMFD R13!|
000010d0  2c 7b 52 31 2d 52 5f 43  4e 54 2c 52 31 34 7d 0d  |,{R1-R_CNT,R14}.|
000010e0  06 7c 1e 20 20 20 20 20  20 4d 4f 56 20 20 52 5f  |.|.      MOV  R_|
000010f0  43 4e 54 2c 23 53 50 4b  5f 4f 43 4e 54 0d 06 86  |CNT,#SPK_OCNT...|
00001100  45 20 20 20 20 20 20 41  44 44 20 20 52 5f 4f 4c  |E      ADD  R_OL|
00001110  44 53 2c 52 5f 53 50 4b  2c 23 53 50 4b 5f 4c 4f  |DS,R_SPK,#SPK_LO|
00001120  58 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |X               |
00001130  3b 4c 41 53 54 20 ca 20  c7 98 20 45 4e 54 52 49  |;LAST . .. ENTRI|
00001140  45 53 0d 06 90 1d 20 20  20 20 20 20 53 55 42 20  |ES....      SUB |
00001150  20 52 5f 43 4e 54 2c 52  5f 43 4e 54 2c 23 31 0d  | R_CNT,R_CNT,#1.|
00001160  06 9a 1e 20 20 20 20 20  20 41 44 52 20 20 52 5f  |...      ADR  R_|
00001170  43 4f 4c 54 41 42 2c 43  4f 4c 54 41 42 0d 06 a4  |COLTAB,COLTAB...|
00001180  22 20 20 20 20 20 20 4c  44 52 20 20 52 32 2c 5b  |"      LDR  R2,[|
00001190  52 5f 53 50 4b 2c 23 53  50 4b 5f 43 4f 4c 5d 0d  |R_SPK,#SPK_COL].|
000011a0  06 ae 23 20 20 20 20 20  20 41 44 44 20 20 52 5f  |..#      ADD  R_|
000011b0  43 4f 4c 54 41 42 2c 52  32 2c 52 5f 43 4f 4c 54  |COLTAB,R2,R_COLT|
000011c0  41 42 0d 06 b8 0c 2e 53  45 54 4f 4c 44 31 0d 06  |AB.....SETOLD1..|
000011d0  c2 1d 20 20 20 20 20 20  4c 44 52 20 20 52 31 2c  |..      LDR  R1,|
000011e0  5b 52 5f 4f 4c 44 53 2c  23 30 5d 0d 06 cc 1d 20  |[R_OLDS,#0].... |
000011f0  20 20 20 20 20 4c 44 52  20 20 52 32 2c 5b 52 5f  |     LDR  R2,[R_|
00001200  4f 4c 44 53 2c 23 34 5d  0d 06 d6 1d 20 20 20 20  |OLDS,#4]....    |
00001210  20 20 53 54 52 20 20 52  31 2c 5b 52 5f 4f 4c 44  |  STR  R1,[R_OLD|
00001220  53 2c 23 38 5d 0d 06 e0  1e 20 20 20 20 20 20 53  |S,#8]....      S|
00001230  54 52 20 20 52 32 2c 5b  52 5f 4f 4c 44 53 2c 23  |TR  R2,[R_OLDS,#|
00001240  31 32 5d 0d 06 ea 22 20  20 20 20 20 20 4c 44 52  |12]..."      LDR|
00001250  42 20 52 30 2c 5b 52 5f  43 4e 54 2c 52 5f 43 4f  |B R0,[R_CNT,R_CO|
00001260  4c 54 41 42 5d 0d 06 f4  12 20 20 20 20 20 20 42  |LTAB]....      B|
00001270  4c 20 20 20 50 4c 54 0d  06 fe 1f 20 20 20 20 20  |L   PLT....     |
00001280  20 53 55 42 20 20 52 5f  4f 4c 44 53 2c 52 5f 4f  | SUB  R_OLDS,R_O|
00001290  4c 44 53 2c 23 38 0d 07  08 1d 20 20 20 20 20 20  |LDS,#8....      |
000012a0  53 55 42 53 20 52 5f 43  4e 54 2c 52 5f 43 4e 54  |SUBS R_CNT,R_CNT|
000012b0  2c 23 31 0d 07 12 16 20  20 20 20 20 20 42 4e 45  |,#1....      BNE|
000012c0  20 20 53 45 54 4f 4c 44  31 0d 07 1c 21 20 20 20  |  SETOLD1...!   |
000012d0  20 20 20 53 54 52 20 20  52 33 2c 5b 52 5f 53 50  |   STR  R3,[R_SP|
000012e0  4b 2c 23 53 50 4b 5f 4f  58 5d 0d 07 26 21 20 20  |K,#SPK_OX]..&!  |
000012f0  20 20 20 20 53 54 52 20  20 52 34 2c 5b 52 5f 53  |    STR  R4,[R_S|
00001300  50 4b 2c 23 53 50 4b 5f  4f 59 5d 0d 07 30 23 20  |PK,#SPK_OY]..0# |
00001310  20 20 20 20 20 4c 44 4d  46 44 20 52 31 33 21 2c  |     LDMFD R13!,|
00001320  7b 52 31 2d 52 5f 43 4e  54 2c 52 31 34 7d 0d 07  |{R1-R_CNT,R14}..|
00001330  3a 15 20 20 20 20 20 20  4d 4f 56 20 20 50 43 2c  |:.      MOV  PC,|
00001340  52 31 34 0d 07 44 4c 3b  2d 2d 2d 2d 2d 2d 2d 2d  |R14..DL;--------|
00001350  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001380  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
00001390  07 4e 08 2e 50 4c 54 0d  07 58 2e 20 20 20 20 20  |.N..PLT..X.     |
000013a0  5d 52 5f 57 3d 33 3a 52  5f 48 3d 34 3a 52 5f 58  |]R_W=3:R_H=4:R_X|
000013b0  46 41 43 3d 35 3a 52 5f  59 46 41 43 3d 36 3a 52  |FAC=5:R_YFAC=6:R|
000013c0  5f 50 57 3d 37 0d 07 62  12 20 20 20 20 20 5b 4f  |_PW=7..b.     [O|
000013d0  50 54 20 50 41 53 53 0d  07 6c 1b 3b 52 31 20 3d  |PT PASS..l.;R1 =|
000013e0  20 58 2c 20 52 32 20 3d  20 59 2c 20 52 30 20 3d  | X, R2 = Y, R0 =|
000013f0  20 fb 0d 07 76 26 20 20  20 20 20 20 53 54 4d 46  | ...v&      STMF|
00001400  44 20 52 31 33 21 2c 7b  52 33 2d 52 37 2c 52 5f  |D R13!,{R3-R7,R_|
00001410  50 4c 54 2c 52 31 34 7d  0d 07 80 1c 20 20 20 20  |PLT,R14}....    |
00001420  20 20 4c 44 52 20 20 52  5f 58 46 41 43 2c 53 43  |  LDR  R_XFAC,SC|
00001430  58 46 41 43 0d 07 8a 1f  20 20 20 20 20 20 4d 4f  |XFAC....      MO|
00001440  56 20 20 52 31 2c 52 31  2c 4c 53 52 20 52 5f 58  |V  R1,R1,LSR R_X|
00001450  46 41 43 0d 07 94 1c 20  20 20 20 20 20 4c 44 52  |FAC....      LDR|
00001460  20 20 52 5f 59 46 41 43  2c 53 43 59 46 41 43 0d  |  R_YFAC,SCYFAC.|
00001470  07 9e 1f 20 20 20 20 20  20 4d 4f 56 20 20 52 32  |...      MOV  R2|
00001480  2c 52 32 2c 4c 53 52 20  52 5f 59 46 41 43 0d 07  |,R2,LSR R_YFAC..|
00001490  a8 19 20 20 20 20 20 20  4c 44 52 20 20 52 5f 57  |..      LDR  R_W|
000014a0  2c 53 57 49 44 54 48 0d  07 b2 15 20 20 20 20 20  |,SWIDTH....     |
000014b0  20 43 4d 50 20 20 52 31  2c 52 5f 57 0d 07 bc 16  | CMP  R1,R_W....|
000014c0  20 20 20 20 20 20 42 48  49 20 20 50 4c 54 45 58  |      BHI  PLTEX|
000014d0  49 54 0d 07 c6 1a 20 20  20 20 20 20 4c 44 52 20  |IT....      LDR |
000014e0  20 52 5f 48 2c 53 48 45  49 47 48 54 0d 07 d0 15  | R_H,SHEIGHT....|
000014f0  20 20 20 20 20 20 43 4d  50 20 20 52 32 2c 52 5f  |      CMP  R2,R_|
00001500  48 0d 07 da 16 20 20 20  20 20 20 42 48 49 20 20  |H....      BHI  |
00001510  50 4c 54 45 58 49 54 0d  07 e4 18 20 20 20 20 20  |PLTEXIT....     |
00001520  20 52 53 42 20 20 52 32  2c 52 32 2c 52 5f 48 0d  | RSB  R2,R2,R_H.|
00001530  07 ee 1c 20 20 20 20 20  20 4c 44 52 20 20 52 5f  |...      LDR  R_|
00001540  50 4c 54 2c 61 73 63 72  65 65 6e 0d 07 f8 1a 20  |PLT,ascreen.... |
00001550  20 20 20 20 20 4d 55 4c  20 20 52 5f 50 57 2c 52  |     MUL  R_PW,R|
00001560  5f 57 2c 52 32 0d 08 02  24 20 20 20 20 20 20 20  |_W,R2...$       |
00001570  20 20 20 20 41 44 44 20  20 52 5f 50 4c 54 2c 52  |    ADD  R_PLT,R|
00001580  5f 50 4c 54 2c 52 5f 50  57 0d 08 16 1d 20 20 20  |_PLT,R_PW....   |
00001590  20 20 20 53 54 52 42 20  52 30 2c 5b 52 5f 50 4c  |   STRB R0,[R_PL|
000015a0  54 2c 52 31 5d 21 0d 08  20 0c 2e 50 4c 54 45 58  |T,R1]!.. ..PLTEX|
000015b0  49 54 0d 08 2a 26 20 20  20 20 20 20 4c 44 4d 46  |IT..*&      LDMF|
000015c0  44 20 52 31 33 21 2c 7b  52 33 2d 52 37 2c 52 5f  |D R13!,{R3-R7,R_|
000015d0  50 4c 54 2c 52 31 34 7d  0d 08 34 15 20 20 20 20  |PLT,R14}..4.    |
000015e0  20 20 4d 4f 56 20 20 50  43 2c 52 31 34 0d 08 3e  |  MOV  PC,R14..>|
000015f0  04 0d 0c d0 13 2e 53 43  58 46 41 43 20 20 45 51  |......SCXFAC  EQ|
00001600  55 44 20 30 0d 0c da 18  20 20 20 20 20 2e 53 57  |UD 0....     .SW|
00001610  49 44 54 48 20 20 45 51  55 44 20 30 0d 0c da 13  |IDTH  EQUD 0....|
00001620  2e 53 43 59 46 41 43 20  20 45 51 55 44 20 30 0d  |.SCYFAC  EQUD 0.|
00001630  0c e4 18 20 20 20 20 20  2e 53 48 45 49 47 48 54  |...     .SHEIGHT|
00001640  20 45 51 55 44 20 30 0d  08 3e 4c 3b 2d 2d 2d 2d  | EQUD 0..>L;----|
00001650  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001690  2d 2d 2d 0d 08 48 0a 2e  52 45 47 45 4e 0d 08 52  |---..H..REGEN..R|
000016a0  1f 20 20 20 20 20 53 54  4d 46 44 20 52 31 33 21  |.     STMFD R13!|
000016b0  2c 7b 52 5f 43 4e 54 2c  52 31 34 7d 0d 08 5c 04  |,{R_CNT,R14}..\.|
000016c0  0d 08 66 12 20 20 20 20  20 42 4c 20 20 20 52 41  |..f.     BL   RA|
000016d0  4e 44 0d 08 70 16 20 20  20 20 20 80 20 20 52 30  |ND..p.     .  R0|
000016e0  2c 52 30 2c 23 26 46 46  0d 08 7a 18 20 20 20 20  |,R0,#&FF..z.    |
000016f0  20 53 55 42 20 20 52 30  2c 52 30 2c 23 31 32 38  | SUB  R0,R0,#128|
00001700  0d 08 84 1f 20 20 20 20  20 53 54 52 20 20 52 30  |....     STR  R0|
00001710  2c 5b 52 5f 53 50 4b 2c  23 53 50 4b 5f 58 5d 0d  |,[R_SPK,#SPK_X].|
00001720  08 8e 04 0d 08 98 12 20  20 20 20 20 42 4c 20 20  |.......     BL  |
00001730  20 52 41 4e 44 0d 08 a2  18 20 20 20 20 20 41 44  | RAND....     AD|
00001740  44 20 20 52 30 2c 52 30  2c 23 31 30 30 0d 08 ac  |D  R0,R0,#100...|
00001750  1f 20 20 20 20 20 53 54  52 20 20 52 30 2c 5b 52  |.     STR  R0,[R|
00001760  5f 53 50 4b 2c 23 53 50  4b 5f 59 5d 0d 08 b6 04  |_SPK,#SPK_Y]....|
00001770  0d 08 c0 13 20 20 20 20  20 4d 4f 56 20 20 52 30  |....     MOV  R0|
00001780  2c 23 30 0d 08 ca 23 20  20 20 20 20 53 54 52 20  |,#0...#     STR |
00001790  20 52 30 2c 5b 52 5f 53  50 4b 2c 23 53 50 4b 5f  | R0,[R_SPK,#SPK_|
000017a0  54 48 45 54 41 5d 0d 08  d4 22 20 20 20 20 20 53  |THETA]..."     S|
000017b0  54 52 20 20 52 30 2c 5b  52 5f 53 50 4b 2c 23 53  |TR  R0,[R_SPK,#S|
000017c0  50 4b 5f 53 54 41 54 5d  0d 08 de 22 20 20 20 20  |PK_STAT]..."    |
000017d0  20 53 54 52 20 20 52 30  2c 5b 52 5f 53 50 4b 2c  | STR  R0,[R_SPK,|
000017e0  23 53 50 4b 5f 4b 43 4e  54 5d 0d 08 e8 04 0d 08  |#SPK_KCNT]......|
000017f0  f2 12 20 20 20 20 20 42  4c 20 20 20 52 41 4e 44  |..     BL   RAND|
00001800  0d 08 fc 19 20 20 20 20  20 4d 4f 56 20 20 52 30  |....     MOV  R0|
00001810  2c 52 30 2c 41 53 52 23  31 0d 09 06 17 20 20 20  |,R0,ASR#1....   |
00001820  20 20 41 44 44 20 20 52  30 2c 52 30 2c 23 35 30  |  ADD  R0,R0,#50|
00001830  0d 09 10 24 20 20 20 20  20 53 54 52 20 20 52 30  |...$     STR  R0|
00001840  2c 5b 52 5f 53 50 4b 2c  23 53 50 4b 5f 4d 54 48  |,[R_SPK,#SPK_MTH|
00001850  45 54 41 5d 0d 09 1a 04  0d 09 24 12 20 20 20 20  |ETA]......$.    |
00001860  20 42 4c 20 20 20 52 41  4e 44 0d 09 2e 14 20 20  | BL   RAND....  |
00001870  20 20 20 80 20 20 52 30  2c 52 30 2c 23 37 0d 09  |   .  R0,R0,#7..|
00001880  38 19 20 20 20 20 20 4d  4f 56 20 20 52 30 2c 52  |8.     MOV  R0,R|
00001890  30 2c 4c 53 4c 23 34 0d  09 42 21 20 20 20 20 20  |0,LSL#4..B!     |
000018a0  53 54 52 20 20 52 30 2c  5b 52 5f 53 50 4b 2c 23  |STR  R0,[R_SPK,#|
000018b0  53 50 4b 5f 43 4f 4c 5d  0d 09 4c 04 0d 09 56 1d  |SPK_COL]..L...V.|
000018c0  20 20 20 20 20 4d 4f 56  20 20 52 5f 43 4e 54 2c  |     MOV  R_CNT,|
000018d0  23 53 50 4b 5f 4f 43 4e  54 0d 09 60 1f 20 20 20  |#SPK_OCNT..`.   |
000018e0  20 20 4d 4f 56 20 20 52  5f 43 4e 54 2c 52 5f 43  |  MOV  R_CNT,R_C|
000018f0  4e 54 2c 4c 53 4c 23 31  0d 09 6a 1e 20 20 20 20  |NT,LSL#1..j.    |
00001900  20 41 44 44 20 20 52 31  2c 52 5f 53 50 4b 2c 23  | ADD  R1,R_SPK,#|
00001910  53 50 4b 5f 4f 58 0d 09  74 13 20 20 20 20 20 4d  |SPK_OX..t.     M|
00001920  4f 56 20 20 52 30 2c 23  30 0d 09 7e 0d 2e 53 45  |OV  R0,#0..~..SE|
00001930  54 5f 4f 4c 44 53 0d 09  88 18 20 20 20 20 20 53  |T_OLDS....     S|
00001940  54 52 20 20 52 30 2c 5b  52 31 5d 2c 23 34 0d 09  |TR  R0,[R1],#4..|
00001950  92 1c 20 20 20 20 20 53  55 42 53 20 52 5f 43 4e  |..     SUBS R_CN|
00001960  54 2c 52 5f 43 4e 54 2c  23 31 0d 09 9c 16 20 20  |T,R_CNT,#1....  |
00001970  20 20 20 42 4e 45 20 20  53 45 54 5f 4f 4c 44 53  |   BNE  SET_OLDS|
00001980  0d 09 a6 1f 20 20 20 20  20 4c 44 4d 46 44 20 52  |....     LDMFD R|
00001990  31 33 21 2c 7b 52 5f 43  4e 54 2c 52 31 34 7d 0d  |13!,{R_CNT,R14}.|
000019a0  09 b0 15 20 20 20 20 20  4d 4f 56 20 20 20 50 43  |...     MOV   PC|
000019b0  2c 52 31 34 0d 09 ba 4c  3b 2d 2d 2d 2d 2d 2d 2d  |,R14...L;-------|
000019c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001a00  0d 09 c4 0e 2e 52 45 47  45 4e 5f 41 4c 4c 0d 09  |.....REGEN_ALL..|
00001a10  ce 19 20 20 20 20 20 53  54 4d 46 44 20 52 31 33  |..     STMFD R13|
00001a20  21 2c 7b 52 31 34 7d 0d  09 d8 1c 20 20 20 20 20  |!,{R14}....     |
00001a30  4c 44 52 20 20 52 5f 53  50 4b 2c 41 53 50 41 52  |LDR  R_SPK,ASPAR|
00001a40  4b 53 25 0d 09 e2 1f 20  20 20 20 20 4d 4f 56 20  |KS%....     MOV |
00001a50  20 52 5f 53 43 4e 54 2c  23 4d 41 58 53 50 41 52  | R_SCNT,#MAXSPAR|
00001a60  4b 53 0d 09 ec 0d 2e 53  50 4b 5f 49 4e 49 54 0d  |KS.....SPK_INIT.|
00001a70  09 f6 13 20 20 20 20 20  42 4c 20 20 20 52 45 47  |...     BL   REG|
00001a80  45 4e 0d 0a 00 22 20 20  20 20 20 41 44 44 20 20  |EN..."     ADD  |
00001a90  52 5f 53 50 4b 2c 52 5f  53 50 4b 2c 23 53 50 4b  |R_SPK,R_SPK,#SPK|
00001aa0  5f 4c 45 4e 0d 0a 0a 1e  20 20 20 20 20 53 55 42  |_LEN....     SUB|
00001ab0  53 20 52 5f 53 43 4e 54  2c 52 5f 53 43 4e 54 2c  |S R_SCNT,R_SCNT,|
00001ac0  23 31 0d 0a 14 16 20 20  20 20 20 42 4e 45 20 20  |#1....     BNE  |
00001ad0  53 50 4b 5f 49 4e 49 54  0d 0a 1e 19 20 20 20 20  |SPK_INIT....    |
00001ae0  20 4c 44 4d 46 44 20 52  31 33 21 2c 7b 52 31 34  | LDMFD R13!,{R14|
00001af0  7d 0d 0a 28 15 20 20 20  20 20 4d 4f 56 20 20 20  |}..(.     MOV   |
00001b00  50 43 2c 52 31 34 0d 0a  32 4c 3b 2d 2d 2d 2d 2d  |PC,R14..2L;-----|
00001b10  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001b50  2d 2d 0d 0a 3c 0a 2e 4f  42 4c 49 54 0d 0a 46 1c  |--..<..OBLIT..F.|
00001b60  20 20 20 20 20 53 54 4d  46 44 20 52 31 33 21 2c  |     STMFD R13!,|
00001b70  7b 52 31 2c 52 31 34 7d  0d 0a 50 23 20 20 20 20  |{R1,R14}..P#    |
00001b80  20 4c 44 52 20 20 20 52  30 2c 5b 52 5f 53 50 4b  | LDR   R0,[R_SPK|
00001b90  2c 23 53 50 4b 5f 4b 43  4e 54 5d 0d 0a 5a 17 20  |,#SPK_KCNT]..Z. |
00001ba0  20 20 20 20 41 44 44 20  20 20 52 30 2c 52 30 2c  |    ADD   R0,R0,|
00001bb0  23 31 0d 0a 64 23 20 20  20 20 20 53 54 52 20 20  |#1..d#     STR  |
00001bc0  20 52 30 2c 5b 52 5f 53  50 4b 2c 23 53 50 4b 5f  | R0,[R_SPK,#SPK_|
00001bd0  4b 43 4e 54 5d 0d 0a 6e  14 20 20 20 20 20 43 4d  |KCNT]..n.     CM|
00001be0  50 20 20 20 52 30 2c 23  32 0d 0a 78 18 20 20 20  |P   R0,#2..x.   |
00001bf0  20 20 42 4e 45 20 20 20  4f 42 4c 49 54 45 58 49  |  BNE   OBLITEXI|
00001c00  54 0d 0a 82 1e 20 20 20  20 20 4d 4f 56 20 20 20  |T....     MOV   |
00001c10  52 5f 43 4e 54 2c 23 53  50 4b 5f 4f 43 4e 54 0d  |R_CNT,#SPK_OCNT.|
00001c20  0a 8c 0e 2e 53 48 4f 57  5f 4e 58 54 31 0d 0a 96  |....SHOW_NXT1...|
00001c30  14 20 20 20 20 20 4d 4f  56 20 20 20 52 33 2c 23  |.     MOV   R3,#|
00001c40  30 0d 0a a0 14 20 20 20  20 20 4d 4f 56 20 20 20  |0....     MOV   |
00001c50  52 34 2c 23 30 0d 0a aa  16 20 20 20 20 20 42 4c  |R4,#0....     BL|
00001c60  20 20 20 20 53 48 4f 57  4f 4c 44 0d 0a b4 1d 20  |    SHOWOLD.... |
00001c70  20 20 20 20 53 55 42 53  20 20 52 5f 43 4e 54 2c  |    SUBS  R_CNT,|
00001c80  52 5f 43 4e 54 2c 23 31  0d 0a be 18 20 20 20 20  |R_CNT,#1....    |
00001c90  20 42 4e 45 20 20 20 53  48 4f 57 5f 4e 58 54 31  | BNE   SHOW_NXT1|
00001ca0  0d 0a c8 17 20 20 20 20  20 53 57 49 20 22 4f 53  |....     SWI "OS|
00001cb0  5f 4d 6f 75 73 65 22 0d  0a d2 13 20 20 20 20 20  |_Mouse"....     |
00001cc0  43 4d 50 20 20 52 32 2c  23 34 0d 0a dc 15 20 20  |CMP  R2,#4....  |
00001cd0  20 20 20 42 45 51 20 20  4f 42 52 45 47 45 4e 0d  |   BEQ  OBREGEN.|
00001ce0  0a e6 19 20 20 20 20 20  4c 44 52 20 20 52 32 2c  |...     LDR  R2,|
00001cf0  42 55 52 53 54 43 4e 54  0d 0a f0 16 20 20 20 20  |BURSTCNT....    |
00001d00  20 41 44 44 20 20 52 32  2c 52 32 2c 23 31 0d 0a  | ADD  R2,R2,#1..|
00001d10  fa 19 20 20 20 20 20 53  54 52 20 20 52 32 2c 42  |..     STR  R2,B|
00001d20  55 52 53 54 43 4e 54 0d  0b 04 19 20 20 20 20 20  |URSTCNT....     |
00001d30  4c 44 52 20 20 52 31 2c  4d 41 58 42 55 52 53 54  |LDR  R1,MAXBURST|
00001d40  0d 0b 0e 13 20 20 20 20  20 43 4d 50 20 20 52 32  |....     CMP  R2|
00001d50  2c 52 31 0d 0b 18 13 20  20 20 20 20 42 48 49 20  |,R1....     BHI |
00001d60  20 4f 42 43 4f 4e 0d 0b  22 0c 2e 4f 42 52 45 47  | OBCON.."..OBREG|
00001d70  45 4e 0d 0b 2c 13 20 20  20 20 20 42 4c 20 20 20  |EN..,.     BL   |
00001d80  52 45 47 45 4e 0d 0b 36  17 20 20 20 20 20 42 41  |REGEN..6.     BA|
00001d90  4c 20 20 4f 42 4c 49 54  45 58 49 54 0d 0b 40 0a  |L  OBLITEXIT..@.|
00001da0  2e 4f 42 43 4f 4e 0d 0b  4a 1b 20 20 20 20 20 4c  |.OBCON..J.     L|
00001db0  44 52 20 20 20 52 31 2c  53 50 4b 5f 43 4f 55 4e  |DR   R1,SPK_COUN|
00001dc0  54 0d 0b 54 17 20 20 20  20 20 41 44 44 20 20 20  |T..T.     ADD   |
00001dd0  52 31 2c 52 31 2c 23 31  0d 0b 5e 1b 20 20 20 20  |R1,R1,#1..^.    |
00001de0  20 53 54 52 20 20 20 52  31 2c 53 50 4b 5f 43 4f  | STR   R1,SPK_CO|
00001df0  55 4e 54 0d 0b 68 0e 2e  4f 42 4c 49 54 45 58 49  |UNT..h..OBLITEXI|
00001e00  54 0d 0b 72 1c 20 20 20  20 20 4c 44 4d 46 44 20  |T..r.     LDMFD |
00001e10  52 31 33 21 2c 7b 52 31  2c 52 31 34 7d 0d 0b 7c  |R13!,{R1,R14}..||
00001e20  15 20 20 20 20 20 4d 4f  56 20 20 20 50 43 2c 52  |.     MOV   PC,R|
00001e30  31 34 0d 0b 86 4c 3b 2d  2d 2d 2d 2d 2d 2d 2d 2d  |14...L;---------|
00001e40  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00001e70  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0d 0b  |--------------..|
00001e80  90 09 2e 4b 49 4c 4c 0d  0b 9a 22 20 20 20 20 20  |...KILL..."     |
00001e90  53 54 4d 46 44 20 52 31  33 21 2c 7b 52 31 2d 52  |STMFD R13!,{R1-R|
00001ea0  5f 43 4e 54 2c 52 31 34  7d 0d 0b a4 1e 20 20 20  |_CNT,R14}....   |
00001eb0  20 20 4d 4f 56 20 20 20  52 5f 43 4e 54 2c 23 53  |  MOV   R_CNT,#S|
00001ec0  50 4b 5f 4f 43 4e 54 0d  0b ae 14 20 20 20 20 20  |PK_OCNT....     |
00001ed0  4d 4f 56 20 20 20 52 30  2c 23 32 0d 0b b8 42 20  |MOV   R0,#2...B |
00001ee0  20 20 20 20 53 54 52 20  20 20 52 30 2c 5b 52 5f  |    STR   R0,[R_|
00001ef0  53 50 4b 2c 23 53 50 4b  5f 53 54 41 54 5d 20 20  |SPK,#SPK_STAT]  |
00001f00  20 20 20 20 20 20 20 3b  53 45 54 20 4f 42 4c 49  |       ;SET OBLI|
00001f10  54 45 52 41 54 45 20 53  54 41 54 55 53 0d 0b c2  |TERATE STATUS...|
00001f20  16 20 20 20 20 20 4d 4f  56 20 20 20 52 30 2c 23  |.     MOV   R0,#|
00001f30  31 32 38 0d 0b cc 22 20  20 20 20 20 53 54 52 20  |128..."     STR |
00001f40  20 20 52 30 2c 5b 52 5f  53 50 4b 2c 23 53 50 4b  |  R0,[R_SPK,#SPK|
00001f50  5f 43 4f 4c 5d 0d 0b d6  21 20 20 20 20 20 4c 44  |_COL]...!     LD|
00001f60  52 20 20 20 52 35 2c 5b  52 5f 53 50 4b 2c 23 53  |R   R5,[R_SPK,#S|
00001f70  50 4b 5f 4f 58 5d 0d 0b  e0 21 20 20 20 20 20 4c  |PK_OX]...!     L|
00001f80  44 52 20 20 20 52 36 2c  5b 52 5f 53 50 4b 2c 23  |DR   R6,[R_SPK,#|
00001f90  53 50 4b 5f 4f 59 5d 0d  0b ea 0d 2e 53 48 4f 57  |SPK_OY].....SHOW|
00001fa0  5f 4e 58 54 0d 0b f4 13  20 20 20 20 20 42 4c 20  |_NXT....     BL |
00001fb0  20 20 20 52 41 4e 44 0d  0b fe 15 20 20 20 20 20  |   RAND....     |
00001fc0  80 20 20 20 52 30 2c 52  30 2c 23 33 0d 0c 08 17  |.   R0,R0,#3....|
00001fd0  20 20 20 20 20 53 55 42  20 20 20 52 30 2c 52 30  |     SUB   R0,R0|
00001fe0  2c 23 33 0d 0c 12 17 20  20 20 20 20 41 44 44 20  |,#3....     ADD |
00001ff0  20 20 52 33 2c 52 35 2c  52 30 0d 0c 1c 13 20 20  |  R3,R5,R0....  |
00002000  20 20 20 42 4c 20 20 20  20 52 41 4e 44 0d 0c 26  |   BL    RAND..&|
00002010  15 20 20 20 20 20 80 20  20 20 52 30 2c 52 30 2c  |.     .   R0,R0,|
00002020  23 33 0d 0c 30 17 20 20  20 20 20 53 55 42 20 20  |#3..0.     SUB  |
00002030  20 52 30 2c 52 30 2c 23  33 0d 0c 3a 17 20 20 20  | R0,R0,#3..:.   |
00002040  20 20 41 44 44 20 20 20  52 34 2c 52 36 2c 52 30  |  ADD   R4,R6,R0|
00002050  0d 0c 44 16 20 20 20 20  20 42 4c 20 20 20 20 53  |..D.     BL    S|
00002060  48 4f 57 4f 4c 44 0d 0c  4e 1d 20 20 20 20 20 53  |HOWOLD..N.     S|
00002070  55 42 53 20 20 52 5f 43  4e 54 2c 52 5f 43 4e 54  |UBS  R_CNT,R_CNT|
00002080  2c 23 31 0d 0c 58 17 20  20 20 20 20 42 4e 45 20  |,#1..X.     BNE |
00002090  20 20 53 48 4f 57 5f 4e  58 54 0d 0c 62 1e 20 20  |  SHOW_NXT..b.  |
000020a0  20 20 20 4d 4f 56 20 20  20 52 5f 43 4e 54 2c 23  |   MOV   R_CNT,#|
000020b0  53 50 4b 5f 4f 43 4e 54  0d 0c 6c 22 20 20 20 20  |SPK_OCNT..l"    |
000020c0  20 4c 44 4d 46 44 20 52  31 33 21 2c 7b 52 31 2d  | LDMFD R13!,{R1-|
000020d0  52 5f 43 4e 54 2c 52 31  34 7d 0d 0c 76 15 20 20  |R_CNT,R14}..v.  |
000020e0  20 20 20 4d 4f 56 20 20  20 50 43 2c 52 31 34 0d  |   MOV   PC,R14.|
000020f0  0c 80 4c 3b 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |..L;------------|
00002100  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002130  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0d 0c 8a 15 2e  |-----------.....|
00002140  53 50 4b 5f 43 4f 55 4e  54 20 45 51 55 44 20 30  |SPK_COUNT EQUD 0|
00002150  0d 0c 94 14 2e 42 55 52  53 54 43 4e 54 20 45 51  |.....BURSTCNT EQ|
00002160  55 44 20 30 0d 0c 9e 14  2e 4d 41 58 42 55 52 53  |UD 0.....MAXBURS|
00002170  54 20 45 51 55 44 20 30  0d 0c a8 1a 2e 41 53 50  |T EQUD 0.....ASP|
00002180  41 52 4b 53 25 20 45 51  55 44 20 53 50 41 52 4b  |ARKS% EQUD SPARK|
00002190  53 25 0d 0c b2 1a 2e 41  53 54 42 4c 25 20 20 20  |S%.....ASTBL%   |
000021a0  45 51 55 44 20 54 42 4c  5f 53 49 4e 0d 0c bc 14  |EQUD TBL_SIN....|
000021b0  2e 44 45 4c 41 59 20 20  20 20 45 51 55 44 20 35  |.DELAY    EQUD 5|
000021c0  0d 0c c6 14 2e 41 43 54  41 42 25 20 20 20 45 51  |.....ACTAB%   EQ|
000021d0  55 44 20 30 0d 0c d0 04  0d 0c e4 1e 2e 61 73 63  |UD 0.........asc|
000021e0  72 65 65 6e 20 20 45 51  55 44 20 31 34 38 3a 45  |reen  EQUD 148:E|
000021f0  51 55 44 20 2d 31 0d 0c  ee 0b 2e 43 4f 4c 54 41  |QUD -1.....COLTA|
00002200  42 0d 0c f8 3c 20 20 20  20 20 20 20 20 20 20 45  |B...<          E|
00002210  51 55 44 20 26 30 45 30  46 31 46 46 46 20 20 20  |QUD &0E0F1FFF   |
00002220  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 42 4c  |             ;BL|
00002230  55 45 2f 52 45 44 20 48  45 41 44 20 30 0d 0d 02  |UE/RED HEAD 0...|
00002240  1c 20 20 20 20 20 20 20  20 20 20 45 51 55 44 20  |.          EQUD |
00002250  26 30 39 30 41 30 43 30  44 0d 0d 0c 1c 20 20 20  |&090A0C0D....   |
00002260  20 20 20 20 20 20 20 45  51 55 44 20 26 30 39 30  |       EQUD &090|
00002270  41 30 43 30 44 0d 0d 16  1c 20 20 20 20 20 20 20  |A0C0D....       |
00002280  20 20 20 45 51 55 44 20  26 30 30 30 34 30 35 30  |   EQUD &0004050|
00002290  38 0d 0d 20 04 0d 0d 2a  3b 20 20 20 20 20 20 20  |8.. ...*;       |
000022a0  20 20 20 45 51 55 44 20  26 43 42 43 45 43 45 46  |   EQUD &CBCECEF|
000022b0  46 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |F               |
000022c0  20 3b 42 4c 55 45 20 20  20 20 20 20 20 20 31 36  | ;BLUE        16|
000022d0  0d 0d 34 1c 20 20 20 20  20 20 20 20 20 20 45 51  |..4.          EQ|
000022e0  55 44 20 26 38 46 41 41  41 45 41 46 0d 0d 3e 1c  |UD &8FAAAEAF..>.|
000022f0  20 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |          EQUD &|
00002300  38 46 41 41 41 45 41 46  0d 0d 48 1c 20 20 20 20  |8FAAAEAF..H.    |
00002310  20 20 20 20 20 20 45 51  55 44 20 26 30 30 38 31  |      EQUD &0081|
00002320  38 39 38 42 0d 0d 52 04  0d 0d 5c 3b 20 20 20 20  |898B..R...\;    |
00002330  20 20 20 20 20 20 45 51  55 44 20 26 33 35 33 36  |      EQUD &3536|
00002340  33 37 46 46 20 20 20 20  20 20 20 20 20 20 20 20  |37FF            |
00002350  20 20 20 20 3b 52 45 44  20 20 20 20 20 20 20 20  |    ;RED        |
00002360  20 33 32 0d 0d 66 1c 20  20 20 20 20 20 20 20 20  | 32..f.         |
00002370  20 45 51 55 44 20 26 31  35 31 36 31 37 33 34 0d  | EQUD &15161734.|
00002380  0d 70 1c 20 20 20 20 20  20 20 20 20 20 45 51 55  |.p.          EQU|
00002390  44 20 26 31 35 31 36 31  37 33 34 0d 0d 7a 1c 20  |D &15161734..z. |
000023a0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
000023b0  30 30 34 31 30 31 34 0d  0d 84 04 0d 0d 8e 3b 20  |0041014.......; |
000023c0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 34  |         EQUD &4|
000023d0  33 36 30 36 46 46 46 20  20 20 20 20 20 20 20 20  |3606FFF         |
000023e0  20 20 20 20 20 20 20 3b  47 52 45 45 4e 20 20 20  |       ;GREEN   |
000023f0  20 20 20 20 34 38 0d 0d  98 1c 20 20 20 20 20 20  |    48....      |
00002400  20 20 20 20 45 51 55 44  20 26 32 33 34 30 34 31  |    EQUD &234041|
00002410  34 32 0d 0d a2 1c 20 20  20 20 20 20 20 20 20 20  |42....          |
00002420  45 51 55 44 20 26 32 33  34 30 34 31 34 32 0d 0d  |EQUD &23404142..|
00002430  ac 1c 20 20 20 20 20 20  20 20 20 20 45 51 55 44  |..          EQUD|
00002440  20 26 30 30 32 30 32 31  32 32 0d 0d b6 04 0d 0d  | &00202122......|
00002450  c0 3b 20 20 20 20 20 20  20 20 20 20 45 51 55 44  |.;          EQUD|
00002460  20 26 35 36 35 37 37 46  46 46 20 20 20 20 20 20  | &56577FFF      |
00002470  20 20 20 20 20 20 20 20  20 3b 59 45 4c 4c 4f 57  |         ;YELLOW|
00002480  20 20 20 20 20 20 20 36  34 0d 0d ca 1c 20 20 20  |       64....   |
00002490  20 20 20 20 20 20 20 45  51 55 44 20 26 33 37 33  |       EQUD &373|
000024a0  37 33 46 35 43 0d 0d d4  1c 20 20 20 20 20 20 20  |73F5C....       |
000024b0  20 20 20 45 51 55 44 20  26 33 37 33 37 33 46 35  |   EQUD &37373F5|
000024c0  43 0d 0d de 1c 20 20 20  20 20 20 20 20 20 20 45  |C....          E|
000024d0  51 55 44 20 26 30 30 30  37 33 35 33 36 0d 0d e8  |QUD &00073536...|
000024e0  04 0d 0d f2 3b 20 20 20  20 20 20 20 20 20 20 45  |....;          E|
000024f0  51 55 44 20 26 43 42 43  45 43 45 46 46 20 20 20  |QUD &CBCECEFF   |
00002500  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 42 4c  |             ;BL|
00002510  55 45 20 20 20 20 20 20  20 20 38 30 0d 0d fc 1c  |UE        80....|
00002520  20 20 20 20 20 20 20 20  20 20 45 51 55 44 20 26  |          EQUD &|
00002530  38 46 41 41 41 45 41 46  0d 0e 06 1c 20 20 20 20  |8FAAAEAF....    |
00002540  20 20 20 20 20 20 45 51  55 44 20 26 38 46 41 41  |      EQUD &8FAA|
00002550  41 45 41 46 0d 0e 10 1c  20 20 20 20 20 20 20 20  |AEAF....        |
00002560  20 20 45 51 55 44 20 26  30 30 38 31 38 39 38 42  |  EQUD &0081898B|
00002570  0d 0e 1a 04 0d 0e 24 3b  20 20 20 20 20 20 20 20  |......$;        |
00002580  20 20 45 51 55 44 20 26  33 35 33 36 42 46 46 46  |  EQUD &3536BFFF|
00002590  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000025a0  3b 52 45 44 20 20 20 20  20 20 20 20 20 39 36 0d  |;RED         96.|
000025b0  0e 2e 1c 20 20 20 20 20  20 20 20 20 20 45 51 55  |...          EQU|
000025c0  44 20 26 31 35 31 36 31  37 33 34 0d 0e 38 1c 20  |D &15161734..8. |
000025d0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 31  |         EQUD &1|
000025e0  35 31 36 31 37 33 34 0d  0e 42 1c 20 20 20 20 20  |5161734..B.     |
000025f0  20 20 20 20 20 45 51 55  44 20 26 30 30 30 34 31  |     EQUD &00041|
00002600  30 31 34 0d 0e 4c 04 0d  0e 56 3c 20 20 20 20 20  |014..L...V<     |
00002610  20 20 20 20 20 45 51 55  44 20 26 34 33 36 30 36  |     EQUD &43606|
00002620  46 46 46 20 20 20 20 20  20 20 20 20 20 20 20 20  |FFF             |
00002630  20 20 20 3b 47 52 45 45  4e 20 20 20 20 20 20 20  |   ;GREEN       |
00002640  31 31 32 0d 0e 60 1c 20  20 20 20 20 20 20 20 20  |112..`.         |
00002650  20 45 51 55 44 20 26 32  33 34 30 34 31 34 32 0d  | EQUD &23404142.|
00002660  0e 6a 1c 20 20 20 20 20  20 20 20 20 20 45 51 55  |.j.          EQU|
00002670  44 20 26 32 33 34 30 34  31 34 32 0d 0e 74 1c 20  |D &23404142..t. |
00002680  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 30  |         EQUD &0|
00002690  30 32 30 32 31 32 32 0d  0e 7e 04 0d 0e 88 3b 20  |0202122..~....; |
000026a0  20 20 20 20 20 20 20 20  20 45 51 55 44 20 26 46  |         EQUD &F|
000026b0  46 30 30 46 46 30 30 20  20 20 20 20 20 20 20 20  |F00FF00         |
000026c0  20 20 20 20 20 20 20 3b  a1 4c 4f 44 45 20 20 20  |       ;.LODE   |
000026d0  20 20 20 31 32 38 0d 0e  92 1c 20 20 20 20 20 20  |   128....      |
000026e0  20 20 20 20 45 51 55 44  20 26 30 30 46 46 30 30  |    EQUD &00FF00|
000026f0  46 46 0d 0e 9c 1c 20 20  20 20 20 20 20 20 20 20  |FF....          |
00002700  45 51 55 44 20 26 46 46  30 30 46 46 30 30 0d 0e  |EQUD &FF00FF00..|
00002710  a6 1c 20 20 20 20 20 20  20 20 20 20 45 51 55 44  |..          EQUD|
00002720  20 26 30 30 46 46 30 30  46 46 0d 0e b0 04 0d 0e  | &00FF00FF......|
00002730  ba 4c 3b 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |.L;-------------|
00002740  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002770  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 0d 0e c4 1d 3b 44  |----------....;D|
00002780  55 4d 50 20 52 45 47 49  53 54 45 52 53 20 30 2d  |UMP REGISTERS 0-|
00002790  31 32 20 80 20 31 34 0d  0e ce 0e 2e 44 55 4d 50  |12 . 14.....DUMP|
000027a0  5f 52 45 47 53 0d 0e d8  20 20 20 20 20 20 20 20  |_REGS...        |
000027b0  53 54 4d 46 44 20 20 52  31 33 21 2c 7b 30 2d 31  |STMFD  R13!,{0-1|
000027c0  32 2c 31 34 7d 0d 0e e2  16 20 20 20 20 20 20 20  |2,14}....       |
000027d0  4d 4f 56 20 20 52 31 31  2c 23 30 0d 0e ec 1c 20  |MOV  R11,#0.... |
000027e0  20 20 20 20 20 20 53 57  49 20 20 22 4f 53 5f 4e  |      SWI  "OS_N|
000027f0  65 77 4c 69 6e 65 22 0d  0e f6 1b 20 20 20 20 20  |ewLine"....     |
00002800  20 20 53 57 49 20 20 22  4f 53 5f 57 72 69 74 65  |  SWI  "OS_Write|
00002810  53 22 0d 0f 00 20 20 20  20 20 20 20 20 45 51 55  |S"...        EQU|
00002820  53 20 22 52 30 2d 52 37  20 20 22 3a 45 51 55 42  |S "R0-R7  ":EQUB|
00002830  20 30 0d 0f 0a 0e 2e 44  52 45 47 5f 4c 4f 4f 50  | 0.....DREG_LOOP|
00002840  0d 0f 14 1c 20 20 20 20  20 20 20 4c 44 52 20 20  |....       LDR  |
00002850  52 30 2c 5b 52 31 31 2c  52 31 33 5d 0d 0f 1e 16  |R0,[R11,R13]....|
00002860  20 20 20 20 20 20 20 4d  4f 56 20 20 52 32 2c 23  |       MOV  R2,#|
00002870  33 32 0d 0f 28 1b 20 20  20 20 20 20 20 41 44 52  |32..(.       ADR|
00002880  20 20 52 31 2c 44 55 4d  50 5f 43 4f 4e 0d 0f 32  |  R1,DUMP_CON..2|
00002890  20 20 20 20 20 20 20 20  53 57 49 20 20 22 4f 53  |        SWI  "OS|
000028a0  5f 43 6f 6e 76 65 72 74  48 65 78 38 22 0d 0f 3c  |_ConvertHex8"..<|
000028b0  17 20 20 20 20 20 20 20  43 4d 50 20 20 52 31 31  |.       CMP  R11|
000028c0  2c 23 31 36 0d 0f 46 17  20 20 20 20 20 20 20 42  |,#16..F.       B|
000028d0  4e 45 20 20 4e 54 48 41  4c 46 31 0d 0f 50 1b 20  |NE  NTHALF1..P. |
000028e0  20 20 20 20 20 20 53 57  49 20 20 22 4f 53 5f 57  |      SWI  "OS_W|
000028f0  72 69 74 65 53 22 0d 0f  5a 1a 20 20 20 20 20 20  |riteS"..Z.      |
00002900  20 45 51 55 53 20 22 20  22 3a 45 51 55 42 20 30  | EQUS " ":EQUB 0|
00002910  0d 0f 64 0c 2e 4e 54 48  41 4c 46 31 0d 0f 6e 17  |..d..NTHALF1..n.|
00002920  20 20 20 20 20 20 20 43  4d 50 20 20 52 31 31 2c  |       CMP  R11,|
00002930  23 33 32 0d 0f 78 16 20  20 20 20 20 20 20 42 4e  |#32..x.       BN|
00002940  45 20 20 4e 54 4e 45 57  4c 0d 0f 82 1c 20 20 20  |E  NTNEWL....   |
00002950  20 20 20 20 53 57 49 20  20 22 4f 53 5f 4e 65 77  |    SWI  "OS_New|
00002960  4c 69 6e 65 22 0d 0f 8c  1b 20 20 20 20 20 20 20  |Line"....       |
00002970  53 57 49 20 20 22 4f 53  5f 57 72 69 74 65 53 22  |SWI  "OS_WriteS"|
00002980  0d 0f 96 20 20 20 20 20  20 20 20 45 51 55 53 20  |...        EQUS |
00002990  22 52 38 2d 52 31 34 20  22 3a 45 51 55 42 20 30  |"R8-R14 ":EQUB 0|
000029a0  0d 0f a0 10 20 20 20 20  20 20 20 41 4c 49 47 4e  |....       ALIGN|
000029b0  0d 0f aa 0b 2e 4e 54 4e  45 57 4c 0d 0f b4 17 20  |.....NTNEWL.... |
000029c0  20 20 20 20 20 20 43 4d  50 20 20 52 31 31 2c 23  |      CMP  R11,#|
000029d0  34 38 0d 0f be 17 20 20  20 20 20 20 20 42 4e 45  |48....       BNE|
000029e0  20 20 4e 54 48 41 4c 46  32 0d 0f c8 1b 20 20 20  |  NTHALF2....   |
000029f0  20 20 20 20 53 57 49 20  20 22 4f 53 5f 57 72 69  |    SWI  "OS_Wri|
00002a00  74 65 53 22 0d 0f d2 1a  20 20 20 20 20 20 20 45  |teS"....       E|
00002a10  51 55 53 20 22 20 22 3a  45 51 55 42 20 30 0d 0f  |QUS " ":EQUB 0..|
00002a20  dc 10 20 20 20 20 20 20  20 41 4c 49 47 4e 0d 0f  |..       ALIGN..|
00002a30  e6 0c 2e 4e 54 48 41 4c  46 32 0d 0f f0 1b 20 20  |...NTHALF2....  |
00002a40  20 20 20 20 20 41 44 52  20 20 52 30 2c 44 55 4d  |     ADR  R0,DUM|
00002a50  50 5f 43 4f 4e 0d 0f fa  15 20 20 20 20 20 20 20  |P_CON....       |
00002a60  4d 4f 56 20 20 52 31 2c  23 38 0d 10 04 1b 20 20  |MOV  R1,#8....  |
00002a70  20 20 20 20 20 53 57 49  20 20 22 4f 53 5f 57 72  |     SWI  "OS_Wr|
00002a80  69 74 65 4e 22 0d 10 0e  1b 20 20 20 20 20 20 20  |iteN"....       |
00002a90  53 57 49 20 20 22 4f 53  5f 57 72 69 74 65 53 22  |SWI  "OS_WriteS"|
00002aa0  0d 10 18 1a 20 20 20 20  20 20 20 45 51 55 53 20  |....       EQUS |
00002ab0  22 20 22 3a 45 51 55 42  20 30 0d 10 22 1a 20 20  |" ":EQUB 0..".  |
00002ac0  20 20 20 20 20 41 44 44  20 20 52 31 31 2c 52 31  |     ADD  R11,R1|
00002ad0  31 2c 23 34 0d 10 2c 17  20 20 20 20 20 20 20 43  |1,#4..,.       C|
00002ae0  4d 50 20 20 52 31 31 2c  23 35 36 0d 10 36 19 20  |MP  R11,#56..6. |
00002af0  20 20 20 20 20 20 42 4e  45 20 20 44 52 45 47 5f  |      BNE  DREG_|
00002b00  4c 4f 4f 50 0d 10 40 1c  20 20 20 20 20 20 20 53  |LOOP..@.       S|
00002b10  57 49 20 20 22 4f 53 5f  4e 65 77 4c 69 6e 65 22  |WI  "OS_NewLine"|
00002b20  0d 10 4a 0b 2e 4d 53 4c  4f 4f 50 0d 10 54 19 20  |..J..MSLOOP..T. |
00002b30  20 20 20 20 20 20 53 57  49 20 22 4f 53 5f 4d 6f  |      SWI "OS_Mo|
00002b40  75 73 65 22 0d 10 5e 15  20 20 20 20 20 20 20 43  |use"..^.       C|
00002b50  4d 50 20 20 52 32 2c 23  30 0d 10 68 16 20 20 20  |MP  R2,#0..h.   |
00002b60  20 20 20 20 42 45 51 20  20 4d 53 4c 4f 4f 50 0d  |    BEQ  MSLOOP.|
00002b70  10 72 15 20 20 20 20 20  20 20 43 4d 50 20 20 52  |.r.       CMP  R|
00002b80  32 2c 23 31 0d 10 7c 15  20 20 20 20 20 20 20 42  |2,#1..|.       B|
00002b90  45 51 20 20 43 52 41 53  48 0d 10 86 0c 2e 4d 53  |EQ  CRASH.....MS|
00002ba0  4c 4f 4f 50 31 0d 10 90  19 20 20 20 20 20 20 20  |LOOP1....       |
00002bb0  53 57 49 20 22 4f 53 5f  4d 6f 75 73 65 22 0d 10  |SWI "OS_Mouse"..|
00002bc0  9a 15 20 20 20 20 20 20  20 43 4d 50 20 20 52 32  |..       CMP  R2|
00002bd0  2c 23 30 0d 10 a4 17 20  20 20 20 20 20 20 42 4e  |,#0....       BN|
00002be0  45 20 20 4d 53 4c 4f 4f  50 31 0d 10 ae 1f 20 20  |E  MSLOOP1....  |
00002bf0  20 20 20 20 20 4c 44 4d  46 44 20 52 31 33 21 2c  |     LDMFD R13!,|
00002c00  7b 30 2d 31 32 2c 31 34  7d 0d 10 b8 16 20 20 20  |{0-12,14}....   |
00002c10  20 20 20 20 4d 4f 56 20  20 50 43 2c 52 31 34 0d  |    MOV  PC,R14.|
00002c20  10 c2 04 0d 10 cc 0a 2e  43 52 41 53 48 0d 10 d6  |........CRASH...|
00002c30  15 20 20 20 20 20 20 20  4d 4f 56 20 20 50 43 2c  |.       MOV  PC,|
00002c40  23 31 0d 10 e0 04 0d 10  ea 0d 2e 44 55 4d 50 5f  |#1.........DUMP_|
00002c50  43 4f 4e 0d 10 f4 18 20  20 20 20 20 20 45 51 55  |CON....      EQU|
00002c60  53 20 c4 33 32 2c bd 28  30 29 29 0d 10 fe 11 20  |S .32,.(0)).... |
00002c70  20 20 20 20 20 45 51 55  42 20 31 33 0d 11 08 04  |     EQUB 13....|
00002c80  0d 11 12 05 5d 0d 11 1c  4a f4 2d 2d 2d 2d 2d 2d  |....]...J.------|
00002c90  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00002cc0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0d  |---------------.|
00002cd0  11 26 33 f4 20 20 47 45  4e 45 52 41 54 45 20 41  |.&3.  GENERATE A|
00002ce0  20 52 41 4e 44 4f 4d 20  4e 55 4d 42 45 52 20 28  | RANDOM NUMBER (|
00002cf0  30 20 2d 20 32 35 35 29  20 49 4e 20 52 52 41 4e  |0 - 255) IN RRAN|
00002d00  44 44 0d 11 30 1d 52 41  4e 44 53 3d 31 32 3a 52  |DD..0.RANDS=12:R|
00002d10  41 4e 44 58 3d 31 31 3a  52 52 41 4e 44 3d 30 0d  |ANDX=11:RRAND=0.|
00002d20  11 3a 04 0d 11 44 0d 5b  4f 50 54 20 50 41 53 53  |.:...D.[OPT PASS|
00002d30  0d 11 4e 09 2e 52 41 4e  44 0d 11 58 26 20 20 20  |..N..RAND..X&   |
00002d40  20 20 20 53 54 4d 46 44  20 52 31 33 21 2c 7b 52  |   STMFD R13!,{R|
00002d50  41 4e 44 58 2c 52 41 4e  44 53 2c 52 31 34 7d 0d  |ANDX,RANDS,R14}.|
00002d60  11 62 18 20 20 20 20 20  20 4c 44 52 20 52 41 4e  |.b.      LDR RAN|
00002d70  44 53 2c 53 45 45 44 0d  11 6c 17 20 20 20 20 20  |DS,SEED..l.     |
00002d80  20 4c 44 52 20 52 41 4e  44 58 2c 58 4f 52 0d 11  | LDR RANDX,XOR..|
00002d90  76 16 20 20 20 20 20 20  4d 4f 56 20 52 52 41 4e  |v.      MOV RRAN|
00002da0  44 2c 23 30 0d 11 80 05  5d 0d 11 8a 04 0d 11 94  |D,#0....].......|
00002db0  17 20 20 20 20 20 20 e3  20 42 49 54 20 3d 20 31  |.      . BIT = 1|
00002dc0  20 b8 20 38 0d 11 9e 0d  5b 4f 50 54 20 50 41 53  | . 8....[OPT PAS|
00002dd0  53 0d 11 a8 21 20 20 20  20 20 20 4d 4f 56 53 20  |S...!      MOVS |
00002de0  52 41 4e 44 53 2c 52 41  4e 44 53 2c 4c 53 4c 20  |RANDS,RANDS,LSL |
00002df0  23 31 0d 11 b2 1f 20 20  20 20 20 20 82 43 53 20  |#1....      .CS |
00002e00  52 41 4e 44 53 2c 52 41  4e 44 53 2c 52 41 4e 44  |RANDS,RANDS,RAND|
00002e10  58 0d 11 bc 1f 20 20 20  20 20 20 41 44 43 20 52  |X....      ADC R|
00002e20  52 41 4e 44 2c 52 52 41  4e 44 2c 52 52 41 4e 44  |RAND,RRAND,RRAND|
00002e30  0d 11 c6 05 5d 0d 11 d0  0f 20 20 20 20 20 20 ed  |....]....      .|
00002e40  20 42 49 54 0d 11 da 0d  5b 4f 50 54 20 50 41 53  | BIT....[OPT PAS|
00002e50  53 0d 11 e4 18 20 20 20  20 20 20 53 54 52 20 52  |S....      STR R|
00002e60  41 4e 44 53 2c 53 45 45  44 0d 11 ee 26 20 20 20  |ANDS,SEED...&   |
00002e70  20 20 20 4c 44 4d 46 44  20 52 31 33 21 2c 7b 52  |   LDMFD R13!,{R|
00002e80  41 4e 44 58 2c 52 41 4e  44 53 2c 52 31 34 7d 0d  |ANDX,RANDS,R14}.|
00002e90  11 f8 14 20 20 20 20 20  20 4d 4f 56 20 50 43 2c  |...      MOV PC,|
00002ea0  52 31 34 0d 12 02 04 0d  12 0c 10 2e 53 45 45 44  |R14.........SEED|
00002eb0  20 45 51 55 44 20 91 0d  12 16 18 2e 58 4f 52 20  | EQUD ......XOR |
00002ec0  20 45 51 55 44 20 26 31  44 38 37 32 42 34 31 0d  | EQUD &1D872B41.|
00002ed0  12 20 05 5d 0d 12 2a 0a  ed 20 50 41 53 53 0d 12  |. .]..*.. PASS..|
00002ee0  34 05 e1 0d ff                                    |4....|
00002ee5