Home » Archimedes archive » Acorn User » AU 1994-08.adf » !StarInfo_StarInfo » BurrowsH/!TextAway/!RunImage

BurrowsH/!TextAway/!RunImage

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 » Archimedes archive » Acorn User » AU 1994-08.adf » !StarInfo_StarInfo
Filename: BurrowsH/!TextAway/!RunImage
Read OK:
File size: 23E6 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM > <TextAway$Dir>.!RunImage
   20
   30REM FNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFN
   40REM FN TextAway - by Henry                                             FN
   50REM FN Scroll lines of text away into the depths of interstellar space FN
   60REM FN Version 1.0 - 21-03-94                                          FN
   70REM FNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFNFN
   80
   90MODE 15
  100MODE 13:OFF
  110
  120speed%=2:REM Speed of the text (2)
  130bx%=149: REM X width at base (149)
  140tx%=20:  REM X width at top   (20)
  150ty%=180: REM Y of top        (180)
  160PROCcompile
  170
  180REM Set up colour bytes
  190RESTORE 200:DIM col%(15):FORc%=0TO15:READcol%(c%):NEXT
  200DATA &00,&01,&02,&03,&2C,&2D,&2E,&2F,&D0,&D1,&D2,&D3,&FC,&FD,&FE,&FF
  210
  220REM Set up data tables
  230xw=bx%:xsc=(bx%-tx%)/ty%:yinr=0
  240FOR y%=0 TO ty%
  250 scale%!(y%*4)=(xw/bx%)*(1<<13)
  260 yatw%!(y%*4)=yinr
  270 ycol%?y%=col%(15-yinr/30)
  280 yinr+=bx%/xw
  290 xw-=xsc
  300NEXT
  310
  320ON ERROR PROCerr
  330
  340CALL runloop%
  350
  360SYS 6,112,1:SYS 6,113,1
  370END
  380
  390DEFPROCerr
  400SYS 6,112,1:SYS 6,113,1
  410IF ERR<>17 THEN
  420 REPORT
  430 IF ERR<>1 PRINT " at ";ERL
  440ENDIF
  450END
  460
  470DEFPROCcompile
  480
  490REM Calculate the number of lines of text
  500file%=OPENIN("<TextAway$Dir>.Text")
  510IF file%=0 ERROR 1, "Text file missing"
  520rlines=0
  530line$=""
  540WHILE NOT EOF#file%
  550 line$=GET$#file%
  560 rlines+=1
  570ENDWHILE
  580CLOSE#file%
  590repeat%=(line$="*")
  600IF repeat% rlines-=1
  610IF rlines=0 ERROR 1, "Nothing in text file"
  620
  630stars=64 :REM Number of stars in space
  640DIM code 32*1024
  650FOR p%=0 TO 2 STEP 2
  660P%=code
  670[OPTp%
  680
  690.size% OPT FNspace(96,p%)
  700.buff% OPT FNspace((127-32)*128,p%)
  710.s_a%  OPT FNspace(stars*4,p%)
  720
  730.plotstars
  740MOV R0,#stars-1
  750ADR R1,s_a%
  760LDR R5,truescrad%
  770MOV R4,#&D0
  780.loop%
  790 LDR    R2,[R1,R0,LSL#2]
  800 LDRB   R3,[R2,R5]
  810 MOVS   R3,R3
  820 STREQB R4,[R2,R5]
  830 SUBS   R0,R0,#1
  840BPL loop%
  850MOV PC,R14
  860
  870.swapscrads%
  880        STR R14,[R13,#-4]!
  890        LDR R4,scrf%
  900        MOV R0,#113:MOV R1,R4:SWI "OS_Byte" ; Show last screen
  910        EOR R4,R4,#3
  920        STR R4,scrf%
  930        ADR R0,scrad%
  940        SUB R4,R4,#1
  950        LDR R0,[R0,R4,LSL#2] ; R0=screen address 1 or 2
  960        BL  storescrad2%
  970        LDR R1,scrof%
  980        SUB R0,R0,R1 ; Reset to top
  990        STR R0,truescrad%
 1000        LDR PC,[R13],#4
 1010
 1020.scrf%  EQUD 1 ; Screen flag
 1030.scrof% EQUD 255*320
 1040.scrad% EQUD 148:EQUD -1
 1050
 1060.setup% STR R14,[R13,#-4]!
 1070        ADR R0,scrad%:ADR R1,scrad%:SWI "OS_ReadVduVariables"
 1080        LDR R0,scrad%:STR R0,truescrad%
 1090        LDR R1,scrof%:ADD R0,R0,R1:STR R0,scrad%
 1100        BL  storescrad2%
 1110        ADD R0,R0,#&14000:STR R0,scrad%+4
 1120        BL  claim%
 1130        MOV R0,#14:MOV R1,#4:SWI "OS_Byte"
 1140        LDR PC,[R13],#4
 1150
 1160.closedown%
 1170        STR R14,[R13,#-4]!
 1180        MOV R0,#13:MOV R1,#4:SWI "OS_Byte"
 1190        BL  release%
 1200        LDR PC,[R13],#4
 1210
 1220.truescrad%
 1230        EQUD 0
 1240
 1250.cls13a
 1260        EQUD 0
 1270
 1280.cls13b
 1290        EQUD 0:EQUD 0:EQUD 0:EQUD 0
 1300        EQUD 0:EQUD 0:EQUD 0:EQUD 0
 1310        EQUD 0:EQUD 0:EQUD 0:EQUD 0
 1320        EQUD 0
 1330
 1340.cls13 ; Clear the MODE 13 screen
 1350        STMFD R13!,{R0-R12,R14}
 1360        STR   R13,cls13a
 1370        ADR   R13,cls13b
 1380        LDMIA R13!,{R0-R12}
 1390        MOV   R13,#157
 1400        LDR   R14,truescrad%
 1410.cls13c
 1420]
 1430FOR cls13d=1 TO 10
 1440 [OPTp%
 1450        STMIA R14!,{R0-R12}
 1460 ]
 1470NEXT
 1480[OPTp%
 1490        SUBS  R13,R13,#1
 1500        BNE   cls13c
 1510        STMIA R14!,{R0-R12}
 1520        STMIA R14!,{R0-R12}
 1530        STMIA R14!,{R0-R12}
 1540        STMIA R14!,{R0-R12}
 1550        STMIA R14!,{R0-R12}
 1560        STMIA R14!,{R0-R4}
 1570        LDR   R13,cls13a
 1580        LDMFD R13!,{R0-R12,PC}
 1590
 1600.scale% OPT FNspace(ty%*4+4,p%)     ; Scale at this point
 1610.yatw%  OPT FNspace(ty%*4+4,p%)     ; Y coordinate scaled
 1620.ycol%  OPT FNspace(ty%+1,p%):ALIGN ; Colour scaled
 1630
 1640.text%  OPT FNspace(32*rlines,p%)   ; Lines of 32 chrs each
 1650.twid%  OPT FNspace(4 *rlines,p%)   ; Width of each line, scaled up
 1660
 1670.storescrad2%
 1680        STR R0,scrad2%
 1690        MOV PC,R14
 1700
 1710.mbx%      EQUD bx%<<12
 1720.scrad2%   EQUD 0
 1730.lines%    EQUD rlines
 1740.yatwadr%  EQUD yatw%
 1750.twidadr%  EQUD twid%
 1760.ycoladr%  EQUD ycol%
 1770.textadr%  EQUD text%
 1780.buffadr%  EQUD buff%
 1790.scaleadr% EQUD scale%
 1800.sizeadr%  EQUD size%
 1810
 1820.drawscr ; Draw text in sloped position, all lines top to base
 1830STR R14,[R13,#-4]!
 1840MOV R14,#ty% ; Loop from ty down to 0
 1850.loop%
 1860 LDR  R8,yatwadr%
 1870 LDR  R8,[R8,R14,LSL#2]               ; R8 = Y coordinate of this line
 1880 LDR  R1,pos%
 1890 SUBS R8,R8,R1                        ; Subtract text position
 1900 BGT  next%                           ; Off the top
 1910 RSB  R10,R8,#0                       ; Flip over to right way up
 1920 MOV  R10,R10,LSR#5                   ; R10 = Line of text here
 1930 AND  R8,R8,#31                       ; R8 = Offset within text line (Y)
 1940 LDR  R1,lines%                       ; R1 = Number of lines in total
 1950 CMP  R10,R1:BGE next%                ; Off the bottom
 1960 LDR  R6,twidadr%
 1970 LDR  R12,[R6,R10,LSL#2]              ; R12 = Width of this line
 1980 MOVS R12,R12:BEQ next%               ; A blank line
 1990 LDR  R6,ycoladr%
 2000 LDRB R6,[R6,R14]                     ; R6 = Colour at this depth
 2010 LDR  R4,textadr%
 2020 ADD  R4,R4,R10,LSL#5                 ; R4 = Address of the line of text
 2030 LDRB R1,[R4],#1                      ; R1 = Length of line in chrs
 2040 RSB  R10,R8,#31                      ; Position with letter reversed
 2050 LDR  R8,buffadr%
 2060 ADD  R10,R8,R10,LSL#2                ; Offset to within font data
 2070 LDR  R7,scaleadr%
 2080 LDR  R5,[R7,R14,LSL#2]               ; R5 = Scale factor
 2090 MUL  R11,R12,R5
 2100 MOV  R7,R11,LSR#1                    ; R7 = Width scaled to the row
 2110 RSB  R7,R7,#160<<13                  ; Find starting point on left (sx)
 2120 LDR  R2,scrad2%                      ; R2 = Address of bottom left
 2130 SUB  R2,R2,R14,LSL#6
 2140 SUB  R2,R2,R14,LSL#8                 ; Subtract sy*320
 2150 LDR  R0,sizeadr%
 2160 MOV  R11,#1
 2170 .loop2%
 2180  LDRB R3,[R4],#1                     ; R3 = Chr from text data
 2190  LDRB R12,[R0,R3]                    ; R12 = Width of this chr
 2200  ADD  R8,R10,R3,LSL#7                ; R8  = Position within font data
 2210  LDRB R9,[R8],#1                     ; R9  = Font byte
 2220  MOV  R3,#7                          ; R3  = Bit to check
 2230  .loop1%
 2240   ADD  R7,R7,R5                      ; Move along
 2250   TST  R11,R9,LSR R3                 ; Examine bit R3 of R9
 2260   BEQ  nopix%                        ; No pixel here matey
 2270   CMP  R7,#320<<13                   ; Check not off either edge
 2280   STRCCB R6,[R2,R7,LSR#13]           ; Plot pixel.
 2290   .nopix%
 2300   SUBS   R3,R3,#1                    ; Next bit
 2310   MOVMI  R3,#7                       ; Gone off byte, so reset bit
 2320   LDRMIB R9,[R8],#1                  ; Get next byte
 2330   SUBS   R12,R12,#1
 2340  BPL   loop1%                        ; Loop for the width
 2350  ADD   R7,R7,R5                      ; Gap at end
 2360  SUBS  R1,R1,#1                      ; One less chr to do
 2370 BNE loop2%                           ; There are more!
 2380 .next%
 2390 SUBS R14,R14,#1
 2400BPL  loop%                            ; Go and do the next line now
 2410LDR  PC,[R13],#4
 2420
 2430.pos% EQUD 0
 2440
 2450.runloop%
 2460STR  R14,[R13,#-4]!
 2470BL   setup%
 2480MOV  R0,#113:MOV R1,#2:SWI "OS_Byte"
 2490LDR  R0,scrcnt%:STR R0,lastcnt%
 2500
 2510.repeat_point%
 2520MOV  R0,#0
 2530STR  R0,pos%
 2540
 2550.loop%
 2560
 2570 BL  cls13     ; Clear the screen
 2580 BL  drawscr   ; Draw the text
 2590 BL  plotstars ; Plot the stars
 2600
 2610 ; Count screen refreshes
 2620 LDR R1,lastcnt%
 2630 .loop1%
 2640  LDR R0,scrcnt%
 2650  SUB R2,R0,R1
 2660  CMP R2,#speed%
 2670 BLT loop1%
 2680 LDR R0,scrcnt%
 2690 .loop1%
 2700  LDR R1,scrcnt%
 2710  TEQ R0,R1
 2720 BEQ loop1%
 2730 STR R1,lastcnt%
 2740
 2750 BL  swapscrads%
 2760
 2770 LDR R0,pos%
 2780 ADD R0,R0,#2
 2790 STR R0,pos%
 2800 SWI "OS_ReadEscapeState" ; Check if Esc has been pressed
 2810 BCS finito%
 2820 LDR R1,textend%
 2830 CMP R0,R1
 2840BLT loop%
 2850
 2860]
 2870IF repeat% THEN
 2880 [ OPT p%
 2890   B repeat_point%
 2900 ]
 2910ENDIF
 2920[ OPT p%
 2930
 2940.finito%
 2950BL  closedown%
 2960LDR PC,[R13],#4
 2970
 2980.textend% EQUD 0
 2990
 3000.lastcnt% EQUD 0
 3010.claim%   MOV R0,#&10:ADR R1,scrint%:MOV R2,#0:SWI "OS_Claim":MOV PC,R14
 3020.release% MOV R0,#&10:ADR R1,scrint%:MOV R2,#0:SWI "OS_Release":MOV PC,R14
 3030.scrcnt%  EQUD 0
 3040
 3050.scrint% ; Called every screen interrupt
 3060 CMP   R0,#4:MOVNE PC,R14
 3070 STMFD R13!,{R0,R14}
 3080 LDR   R0,scrcnt%
 3090 ADD   R0,R0,#1
 3100 STR   R0,scrcnt%
 3110 LDMFD R13!,{R0,PC}
 3120
 3130]
 3140NEXT
 3150SYS "OS_File", &FF, "<TextAway$Dir>.FontData", size%, 0
 3160?size%=8:REM Width of a space
 3170
 3180file%=OPENIN("<TextAway$Dir>.Text")
 3190FOR l%=0 TO rlines-1
 3200 line$=GET$#file%
 3210 e%=text%+l%*32
 3220 ?e%=LEN line$
 3230 e%+=1
 3240 ww%=0
 3250 FOR t%=1 TO LEN line$
 3260  ?e%=ASC(MID$(line$,t%,1))-32
 3270  ww%+=size%?(?e%)+2
 3280  e%+=1
 3290 NEXT
 3300 ww%-=1
 3310 IF LEN line$=0 ww%=0
 3320 twid%!(l%*4)=ww%
 3330NEXT
 3340CLOSE#file%
 3350
 3360!textend%=32*rlines+12*32
 3370s%=RND(-1)
 3380FOR s%=0 TO stars-1
 3390 x%=RND(320)-1
 3400 y%=RND(256)-1
 3410 s_a%!(s%*4)=x%+y%*320
 3420NEXT
 3430ENDPROC
 3440
 3450DEFFNspace(space%, p%)
 3460P%+=space%
 3470=p%

 � > <TextAway$Dir>.!RunImage

I� �������������������������������������������������������������������
(I� � TextAway - by Henry                                             �
2I� � Scroll lines of text away into the depths of interstellar space �
<I� � Version 1.0 - 21-03-94                                          �
FI� �������������������������������������������������������������������
P
Z� 15
d
� 13:�
n
x$speed%=2:� Speed of the text (2)
�$bx%=149: � X width at base (149)
�$tx%=20:  � X width at top   (20)
�$ty%=180: � Y of top        (180)
��compile
�
�� Set up colour bytes
�*� �dH@:� col%(15):�c%=0�15:�col%(c%):�
�E� &00,&01,&02,&03,&2C,&2D,&2E,&2F,&D0,&D1,&D2,&D3,&FC,&FD,&FE,&FF
�
�� Set up data tables
�#xw=bx%:xsc=(bx%-tx%)/ty%:yinr=0
�� y%=0 � ty%
�# scale%!(y%*4)=(xw/bx%)*(1<<13)
 yatw%!(y%*4)=yinr
 ycol%?y%=col%(15-yinr/30)
 yinr+=bx%/xw
" xw-=xsc
,�
6
@� � �err
J
T� runloop%
^
hș 6,112,1:ș 6,113,1
r�
|
�	��err
�ș 6,112,1:ș 6,113,1
�
� �<>17 �
� �
� � �<>1 � " at ";�
��
��
�
�
��compile
�
�+� Calculate the number of lines of text
�"file%=�("<TextAway$Dir>.Text")
�&� file%=0 � 1, "Text file missing"
rlines=0
line$=""
ȕ � �#file%
& line$=�#file%
0 rlines+=1
:�
D�#file%
Nrepeat%=(line$="*")
X� repeat% rlines-=1
b*� rlines=0 � 1, "Nothing in text file"
l
v(stars=64 :� Number of stars in space
�� code 32*1024
�� p%=0 � 2 � 2
�P%=code
�
[OPTp%
�
�.size% OPT �space(96,p%)
�&.buff% OPT �space((127-32)*128,p%)
�!.s_a%  OPT �space(stars*4,p%)
�
�.plotstars
�MOV R0,#stars-1
�ADR R1,s_a%
�LDR R5,truescrad%
MOV R4,#&D0

.loop%
 LDR    R2,[R1,R0,LSL#2]
  LDRB   R3,[R2,R5]
* MOVS   R3,R3
4 STREQB R4,[R2,R5]
> SUBS   R0,R0,#1
H
BPL loop%
RMOV PC,R14
\
f.swapscrads%
p        STR R14,[R13,#-4]!
z        LDR R4,scrf%
�B        MOV R0,#113:MOV R1,R4:SWI "OS_Byte" ; Show last screen
�        � R4,R4,#3
�        STR R4,scrf%
�        ADR R0,scrad%
�        SUB R4,R4,#1
�;        LDR R0,[R0,R4,LSL#2] ; R0=screen address 1 or 2
�        BL  storescrad2%
�        LDR R1,scrof%
�'        SUB R0,R0,R1 ; Reset to top
�        STR R0,truescrad%
�        LDR PC,[R13],#4
�
� .scrf%  EQUD 1 ; Screen flag
.scrof% EQUD 255*320
.scrad% EQUD 148:EQUD -1

$.setup% STR R14,[R13,#-4]!
.A        ADR R0,scrad%:ADR R1,scrad%:SWI "OS_ReadVduVariables"
8+        LDR R0,scrad%:STR R0,truescrad%
B4        LDR R1,scrof%:ADD R0,R0,R1:STR R0,scrad%
L        BL  storescrad2%
V-        ADD R0,R0,#&14000:STR R0,scrad%+4
`        BL  claim%
j.        MOV R0,#14:MOV R1,#4:SWI "OS_Byte"
t        LDR PC,[R13],#4
~
�.closedown%
�        STR R14,[R13,#-4]!
�.        MOV R0,#13:MOV R1,#4:SWI "OS_Byte"
�        BL  release%
�        LDR PC,[R13],#4
�
�.truescrad%
�        EQUD 0
�
�.cls13a
�        EQUD 0
�
.cls13b

'        EQUD 0:EQUD 0:EQUD 0:EQUD 0
'        EQUD 0:EQUD 0:EQUD 0:EQUD 0
'        EQUD 0:EQUD 0:EQUD 0:EQUD 0
(        EQUD 0
2
<".cls13 ; Clear the � 13 screen
F#        STMFD R13!,{R0-R12,R14}
P        STR   R13,cls13a
Z        ADR   R13,cls13b
d        LDMIA R13!,{R0-R12}
n        MOV   R13,#157
x         LDR   R14,truescrad%
�.cls13c
�]
�� cls13d=1 � 10
� [OPTp%
�        STMIA R14!,{R0-R12}
� ]
��
�
[OPTp%
�        SUBS  R13,R13,#1
�        BNE   cls13c
�        STMIA R14!,{R0-R12}
�        STMIA R14!,{R0-R12}
�        STMIA R14!,{R0-R12}
        STMIA R14!,{R0-R12}
        STMIA R14!,{R0-R12}
        STMIA R14!,{R0-R4}
"        LDR   R13,cls13a
,"        LDMFD R13!,{R0-R12,PC}
6
@<.scale% OPT �space(ty%*4+4,p%)     ; Scale at this point
J<.yatw%  OPT �space(ty%*4+4,p%)     ; Y coordinate scaled
T6.ycol%  OPT �space(ty%+1,p%):ALIGN ; Colour scaled
^
h>.text%  OPT �space(32*rlines,p%)   ; Lines of 32 chrs each
rF.twid%  OPT �space(4 *rlines,p%)   ; Width of each line, scaled up
|
�.storescrad2%
�        STR R0,scrad2%
�        MOV PC,R14
�
�.mbx%      EQUD bx%<<12
�.scrad2%   EQUD 0
�.lines%    EQUD rlines
�.yatwadr%  EQUD yatw%
�.twidadr%  EQUD twid%
�.ycoladr%  EQUD ycol%
�.textadr%  EQUD text%
�.buffadr%  EQUD buff%
�.scaleadr% EQUD scale%
.sizeadr%  EQUD size%

B.drawscr ; Draw text in sloped position, all lines top to base
&STR R14,[R13,#-4]!
0)MOV R14,#ty% ; Loop from ty down to 0
:
.loop%
D LDR  R8,yatwadr%
NJ LDR  R8,[R8,R14,LSL#2]               ; R8 = Y coordinate of this line
X LDR  R1,pos%
bB SUBS R8,R8,R1                        ; Subtract text position
l7 BGT  next%                           ; Off the top
vE RSB  R10,R8,#0                       ; Flip over to right way up
�C MOV  R10,R10,LSR#5                   ; R10 = Line of text here
�J �  R8,R8,#31                       ; R8 = Offset within text line (Y)
�I LDR  R1,lines%                       ; R1 = Number of lines in total
�: CMP  R10,R1:BGE next%                ; Off the bottom
� LDR  R6,twidadr%
�D LDR  R12,[R6,R10,LSL#2]              ; R12 = Width of this line
�8 MOVS R12,R12:BEQ next%               ; A blank line
� LDR  R6,ycoladr%
�E LDRB R6,[R6,R14]                     ; R6 = Colour at this depth
� LDR  R4,textadr%
�L ADD  R4,R4,R10,LSL#5                 ; R4 = Address of the line of text
�G LDRB R1,[R4],#1                      ; R1 = Length of line in chrs
�I RSB  R10,R8,#31                      ; Position with letter reversed
 LDR  R8,buffadr%
F ADD  R10,R8,R10,LSL#2                ; Offset to within font data
 LDR  R7,scaleadr%
 = LDR  R5,[R7,R14,LSL#2]               ; R5 = Scale factor
* MUL  R11,R12,R5
4H MOV  R7,R11,LSR#1                    ; R7 = Width scaled to the row
>L RSB  R7,R7,#160<<13                  ; Find starting point on left (sx)
HG LDR  R2,scrad2%                      ; R2 = Address of bottom left
R SUB  R2,R2,R14,LSL#6
\; SUB  R2,R2,R14,LSL#8                 ; Subtract sy*320
f LDR  R0,sizeadr%
p MOV  R11,#1
z .loop2%
�C  LDRB R3,[R4],#1                     ; R3 = Chr from text data
�C  LDRB R12,[R0,R3]                    ; R12 = Width of this chr
�K  ADD  R8,R10,R3,LSL#7                ; R8  = Position within font data
�;  LDRB R9,[R8],#1                     ; R9  = Font byte
�>  MOV  R3,#7                          ; R3  = Bit to check
�
  .loop1%
�6   ADD  R7,R7,R5                      ; Move along
�@   TST  R11,R9,LSR R3                 ; Examine bit R3 of R9
�?   BEQ  nopix%                        ; No pixel here matey
�E   CMP  R7,#320<<13                   ; Check not off either edge
�7   STRCCB R6,[R2,R7,LSR#13]           ; Plot pixel.
�   .nopix%
�4   SUBS   R3,R3,#1                    ; Next bit
	G   MOVMI  R3,#7                       ; Gone off byte, so reset bit
	9   LDRMIB R9,[R8],#1                  ; Get next byte
	   SUBS   R12,R12,#1
	$>  BPL   loop1%                        ; Loop for the width
	.6  ADD   R7,R7,R5                      ; Gap at end
	8>  SUBS  R1,R1,#1                      ; One less chr to do
	B; BNE loop2%                           ; There are more!
	L .next%
	V SUBS R14,R14,#1
	`GBPL  loop%                            ; Go and do the next line now
	jLDR  PC,[R13],#4
	t
	~.pos% EQUD 0
	�
	�
.runloop%
	�STR  R14,[R13,#-4]!
	�BL   setup%
	�(MOV  R0,#113:MOV R1,#2:SWI "OS_Byte"
	�#LDR  R0,scrcnt%:STR R0,lastcnt%
	�
	�.repeat_point%
	�MOV  R0,#0
	�STR  R0,pos%
	�
	�
.loop%


% BL  cls13     ; Clear the screen
" BL  drawscr   ; Draw the text
# BL  plotstars ; Plot the stars
(
2 ; Count screen refreshes
< LDR R1,lastcnt%
F .loop1%
P  LDR R0,scrcnt%
Z  SUB R2,R0,R1
d  CMP R2,#speed%
n BLT loop1%
x LDR R0,scrcnt%
� .loop1%
�  LDR R1,scrcnt%
�  TEQ R0,R1
� BEQ loop1%
� STR R1,lastcnt%
�
� BL  swapscrads%
�
� LDR R0,pos%
� ADD R0,R0,#2
� STR R0,pos%
�= SWI "OS_ReadEscapeState" ; Check if Esc has been pressed
� BCS finito%
 LDR R1,textend%
 CMP R0,R1

BLT loop%
"
,]
6� repeat% �
@
 [ OPT p%
J   B repeat_point%
T ]
^�
h[ OPT p%
r
|.finito%
�BL  closedown%
�LDR PC,[R13],#4
�
�.textend% EQUD 0
�
�.lastcnt% EQUD 0
�L.claim%   MOV R0,#&10:ADR R1,scrint%:MOV R2,#0:SWI "OS_Claim":MOV PC,R14
�N.release% MOV R0,#&10:ADR R1,scrint%:MOV R2,#0:SWI "OS_Release":MOV PC,R14
�.scrcnt%  EQUD 0
�
�,.scrint% ; Called every screen interrupt
� CMP   R0,#4:MOVNE PC,R14
� STMFD R13!,{R0,R14}
 LDR   R0,scrcnt%
 ADD   R0,R0,#1
 STR   R0,scrcnt%
& LDMFD R13!,{R0,PC}
0
:]
D�
N:ș "OS_File", &FF, "<TextAway$Dir>.FontData", size%, 0
X?size%=8:� Width of a space
b
l"file%=�("<TextAway$Dir>.Text")
v� l%=0 � rlines-1
� line$=�#file%
� e%=text%+l%*32
� ?e%=� line$
�
 e%+=1
�
 ww%=0
� � t%=1 � � line$
�  ?e%=�(�line$,t%,1))-32
�  ww%+=size%?(?e%)+2
�  e%+=1
� �
� ww%-=1
� � � line$=0 ww%=0
� twid%!(l%*4)=ww%

�

�#file%



 !textend%=32*rlines+12*32

*s%=�(-1)

4� s%=0 � stars-1

> x%=�(320)-1

H y%=�(256)-1

R s_a%!(s%*4)=x%+y%*320

\�

f�

p

zݤspace(space%, p%)

�P%+=space%

�=p%
�
00000000  0d 00 0a 20 f4 20 3e 20  3c 54 65 78 74 41 77 61  |... . > <TextAwa|
00000010  79 24 44 69 72 3e 2e 21  52 75 6e 49 6d 61 67 65  |y$Dir>.!RunImage|
00000020  0d 00 14 04 0d 00 1e 49  f4 20 a4 a4 a4 a4 a4 a4  |.......I. ......|
00000030  a4 a4 a4 a4 a4 a4 a4 a4  a4 a4 a4 a4 a4 a4 a4 a4  |................|
*
00000060  a4 a4 a4 a4 a4 a4 a4 a4  a4 a4 a4 a4 a4 0d 00 28  |...............(|
00000070  49 f4 20 a4 20 54 65 78  74 41 77 61 79 20 2d 20  |I. . TextAway - |
00000080  62 79 20 48 65 6e 72 79  20 20 20 20 20 20 20 20  |by Henry        |
00000090  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000000b0  20 20 20 20 20 a4 0d 00  32 49 f4 20 a4 20 53 63  |     ...2I. . Sc|
000000c0  72 6f 6c 6c 20 6c 69 6e  65 73 20 6f 66 20 74 65  |roll lines of te|
000000d0  78 74 20 61 77 61 79 20  69 6e 74 6f 20 74 68 65  |xt away into the|
000000e0  20 64 65 70 74 68 73 20  6f 66 20 69 6e 74 65 72  | depths of inter|
000000f0  73 74 65 6c 6c 61 72 20  73 70 61 63 65 20 a4 0d  |stellar space ..|
00000100  00 3c 49 f4 20 a4 20 56  65 72 73 69 6f 6e 20 31  |.<I. . Version 1|
00000110  2e 30 20 2d 20 32 31 2d  30 33 2d 39 34 20 20 20  |.0 - 21-03-94   |
00000120  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
00000140  20 20 20 20 20 20 20 a4  0d 00 46 49 f4 20 a4 a4  |       ...FI. ..|
00000150  a4 a4 a4 a4 a4 a4 a4 a4  a4 a4 a4 a4 a4 a4 a4 a4  |................|
*
00000190  a4 0d 00 50 04 0d 00 5a  08 eb 20 31 35 0d 00 64  |...P...Z.. 15..d|
000001a0  0a eb 20 31 33 3a 87 0d  00 6e 04 0d 00 78 24 73  |.. 13:...n...x$s|
000001b0  70 65 65 64 25 3d 32 3a  f4 20 53 70 65 65 64 20  |peed%=2:. Speed |
000001c0  6f 66 20 74 68 65 20 74  65 78 74 20 28 32 29 0d  |of the text (2).|
000001d0  00 82 24 62 78 25 3d 31  34 39 3a 20 f4 20 58 20  |..$bx%=149: . X |
000001e0  77 69 64 74 68 20 61 74  20 62 61 73 65 20 28 31  |width at base (1|
000001f0  34 39 29 0d 00 8c 24 74  78 25 3d 32 30 3a 20 20  |49)...$tx%=20:  |
00000200  f4 20 58 20 77 69 64 74  68 20 61 74 20 74 6f 70  |. X width at top|
00000210  20 20 20 28 32 30 29 0d  00 96 24 74 79 25 3d 31  |   (20)...$ty%=1|
00000220  38 30 3a 20 f4 20 59 20  6f 66 20 74 6f 70 20 20  |80: . Y of top  |
00000230  20 20 20 20 20 20 28 31  38 30 29 0d 00 a0 0c f2  |      (180).....|
00000240  63 6f 6d 70 69 6c 65 0d  00 aa 04 0d 00 b4 19 f4  |compile.........|
00000250  20 53 65 74 20 75 70 20  63 6f 6c 6f 75 72 20 62  | Set up colour b|
00000260  79 74 65 73 0d 00 be 2a  f7 20 8d 64 48 40 3a de  |ytes...*. .dH@:.|
00000270  20 63 6f 6c 25 28 31 35  29 3a e3 63 25 3d 30 b8  | col%(15):.c%=0.|
00000280  31 35 3a f3 63 6f 6c 25  28 63 25 29 3a ed 0d 00  |15:.col%(c%):...|
00000290  c8 45 dc 20 26 30 30 2c  26 30 31 2c 26 30 32 2c  |.E. &00,&01,&02,|
000002a0  26 30 33 2c 26 32 43 2c  26 32 44 2c 26 32 45 2c  |&03,&2C,&2D,&2E,|
000002b0  26 32 46 2c 26 44 30 2c  26 44 31 2c 26 44 32 2c  |&2F,&D0,&D1,&D2,|
000002c0  26 44 33 2c 26 46 43 2c  26 46 44 2c 26 46 45 2c  |&D3,&FC,&FD,&FE,|
000002d0  26 46 46 0d 00 d2 04 0d  00 dc 18 f4 20 53 65 74  |&FF......... Set|
000002e0  20 75 70 20 64 61 74 61  20 74 61 62 6c 65 73 0d  | up data tables.|
000002f0  00 e6 23 78 77 3d 62 78  25 3a 78 73 63 3d 28 62  |..#xw=bx%:xsc=(b|
00000300  78 25 2d 74 78 25 29 2f  74 79 25 3a 79 69 6e 72  |x%-tx%)/ty%:yinr|
00000310  3d 30 0d 00 f0 10 e3 20  79 25 3d 30 20 b8 20 74  |=0..... y%=0 . t|
00000320  79 25 0d 00 fa 23 20 73  63 61 6c 65 25 21 28 79  |y%...# scale%!(y|
00000330  25 2a 34 29 3d 28 78 77  2f 62 78 25 29 2a 28 31  |%*4)=(xw/bx%)*(1|
00000340  3c 3c 31 33 29 0d 01 04  16 20 79 61 74 77 25 21  |<<13).... yatw%!|
00000350  28 79 25 2a 34 29 3d 79  69 6e 72 0d 01 0e 1e 20  |(y%*4)=yinr.... |
00000360  79 63 6f 6c 25 3f 79 25  3d 63 6f 6c 25 28 31 35  |ycol%?y%=col%(15|
00000370  2d 79 69 6e 72 2f 33 30  29 0d 01 18 11 20 79 69  |-yinr/30).... yi|
00000380  6e 72 2b 3d 62 78 25 2f  78 77 0d 01 22 0c 20 78  |nr+=bx%/xw..". x|
00000390  77 2d 3d 78 73 63 0d 01  2c 05 ed 0d 01 36 04 0d  |w-=xsc..,....6..|
000003a0  01 40 0c ee 20 85 20 f2  65 72 72 0d 01 4a 04 0d  |.@.. . .err..J..|
000003b0  01 54 0e d6 20 72 75 6e  6c 6f 6f 70 25 0d 01 5e  |.T.. runloop%..^|
000003c0  04 0d 01 68 19 c8 99 20  36 2c 31 31 32 2c 31 3a  |...h... 6,112,1:|
000003d0  c8 99 20 36 2c 31 31 33  2c 31 0d 01 72 05 e0 0d  |.. 6,113,1..r...|
000003e0  01 7c 04 0d 01 86 09 dd  f2 65 72 72 0d 01 90 19  |.|.......err....|
000003f0  c8 99 20 36 2c 31 31 32  2c 31 3a c8 99 20 36 2c  |.. 6,112,1:.. 6,|
00000400  31 31 33 2c 31 0d 01 9a  0d e7 20 9f 3c 3e 31 37  |113,1..... .<>17|
00000410  20 8c 0d 01 a4 06 20 f6  0d 01 ae 16 20 e7 20 9f  | ..... ..... . .|
00000420  3c 3e 31 20 f1 20 22 20  61 74 20 22 3b 9e 0d 01  |<>1 . " at ";...|
00000430  b8 05 cd 0d 01 c2 05 e0  0d 01 cc 04 0d 01 d6 0d  |................|
00000440  dd f2 63 6f 6d 70 69 6c  65 0d 01 e0 04 0d 01 ea  |..compile.......|
00000450  2b f4 20 43 61 6c 63 75  6c 61 74 65 20 74 68 65  |+. Calculate the|
00000460  20 6e 75 6d 62 65 72 20  6f 66 20 6c 69 6e 65 73  | number of lines|
00000470  20 6f 66 20 74 65 78 74  0d 01 f4 22 66 69 6c 65  | of text..."file|
00000480  25 3d 8e 28 22 3c 54 65  78 74 41 77 61 79 24 44  |%=.("<TextAway$D|
00000490  69 72 3e 2e 54 65 78 74  22 29 0d 01 fe 26 e7 20  |ir>.Text")...&. |
000004a0  66 69 6c 65 25 3d 30 20  85 20 31 2c 20 22 54 65  |file%=0 . 1, "Te|
000004b0  78 74 20 66 69 6c 65 20  6d 69 73 73 69 6e 67 22  |xt file missing"|
000004c0  0d 02 08 0c 72 6c 69 6e  65 73 3d 30 0d 02 12 0c  |....rlines=0....|
000004d0  6c 69 6e 65 24 3d 22 22  0d 02 1c 10 c8 95 20 ac  |line$=""...... .|
000004e0  20 c5 23 66 69 6c 65 25  0d 02 26 12 20 6c 69 6e  | .#file%..&. lin|
000004f0  65 24 3d be 23 66 69 6c  65 25 0d 02 30 0e 20 72  |e$=.#file%..0. r|
00000500  6c 69 6e 65 73 2b 3d 31  0d 02 3a 05 ce 0d 02 44  |lines+=1..:....D|
00000510  0b d9 23 66 69 6c 65 25  0d 02 4e 17 72 65 70 65  |..#file%..N.repe|
00000520  61 74 25 3d 28 6c 69 6e  65 24 3d 22 2a 22 29 0d  |at%=(line$="*").|
00000530  02 58 17 e7 20 72 65 70  65 61 74 25 20 72 6c 69  |.X.. repeat% rli|
00000540  6e 65 73 2d 3d 31 0d 02  62 2a e7 20 72 6c 69 6e  |nes-=1..b*. rlin|
00000550  65 73 3d 30 20 85 20 31  2c 20 22 4e 6f 74 68 69  |es=0 . 1, "Nothi|
00000560  6e 67 20 69 6e 20 74 65  78 74 20 66 69 6c 65 22  |ng in text file"|
00000570  0d 02 6c 04 0d 02 76 28  73 74 61 72 73 3d 36 34  |..l...v(stars=64|
00000580  20 3a f4 20 4e 75 6d 62  65 72 20 6f 66 20 73 74  | :. Number of st|
00000590  61 72 73 20 69 6e 20 73  70 61 63 65 0d 02 80 12  |ars in space....|
000005a0  de 20 63 6f 64 65 20 33  32 2a 31 30 32 34 0d 02  |. code 32*1024..|
000005b0  8a 12 e3 20 70 25 3d 30  20 b8 20 32 20 88 20 32  |... p%=0 . 2 . 2|
000005c0  0d 02 94 0b 50 25 3d 63  6f 64 65 0d 02 9e 0a 5b  |....P%=code....[|
000005d0  4f 50 54 70 25 0d 02 a8  04 0d 02 b2 1c 2e 73 69  |OPTp%.........si|
000005e0  7a 65 25 20 4f 50 54 20  a4 73 70 61 63 65 28 39  |ze% OPT .space(9|
000005f0  36 2c 70 25 29 0d 02 bc  26 2e 62 75 66 66 25 20  |6,p%)...&.buff% |
00000600  4f 50 54 20 a4 73 70 61  63 65 28 28 31 32 37 2d  |OPT .space((127-|
00000610  33 32 29 2a 31 32 38 2c  70 25 29 0d 02 c6 21 2e  |32)*128,p%)...!.|
00000620  73 5f 61 25 20 20 4f 50  54 20 a4 73 70 61 63 65  |s_a%  OPT .space|
00000630  28 73 74 61 72 73 2a 34  2c 70 25 29 0d 02 d0 04  |(stars*4,p%)....|
00000640  0d 02 da 0e 2e 70 6c 6f  74 73 74 61 72 73 0d 02  |.....plotstars..|
00000650  e4 13 4d 4f 56 20 52 30  2c 23 73 74 61 72 73 2d  |..MOV R0,#stars-|
00000660  31 0d 02 ee 0f 41 44 52  20 52 31 2c 73 5f 61 25  |1....ADR R1,s_a%|
00000670  0d 02 f8 15 4c 44 52 20  52 35 2c 74 72 75 65 73  |....LDR R5,trues|
00000680  63 72 61 64 25 0d 03 02  0f 4d 4f 56 20 52 34 2c  |crad%....MOV R4,|
00000690  23 26 44 30 0d 03 0c 0a  2e 6c 6f 6f 70 25 0d 03  |#&D0.....loop%..|
000006a0  16 1c 20 4c 44 52 20 20  20 20 52 32 2c 5b 52 31  |.. LDR    R2,[R1|
000006b0  2c 52 30 2c 4c 53 4c 23  32 5d 0d 03 20 16 20 4c  |,R0,LSL#2].. . L|
000006c0  44 52 42 20 20 20 52 33  2c 5b 52 32 2c 52 35 5d  |DRB   R3,[R2,R5]|
000006d0  0d 03 2a 11 20 4d 4f 56  53 20 20 20 52 33 2c 52  |..*. MOVS   R3,R|
000006e0  33 0d 03 34 16 20 53 54  52 45 51 42 20 52 34 2c  |3..4. STREQB R4,|
000006f0  5b 52 32 2c 52 35 5d 0d  03 3e 14 20 53 55 42 53  |[R2,R5]..>. SUBS|
00000700  20 20 20 52 30 2c 52 30  2c 23 31 0d 03 48 0d 42  |   R0,R0,#1..H.B|
00000710  50 4c 20 6c 6f 6f 70 25  0d 03 52 0e 4d 4f 56 20  |PL loop%..R.MOV |
00000720  50 43 2c 52 31 34 0d 03  5c 04 0d 03 66 10 2e 73  |PC,R14..\...f..s|
00000730  77 61 70 73 63 72 61 64  73 25 0d 03 70 1e 20 20  |wapscrads%..p.  |
00000740  20 20 20 20 20 20 53 54  52 20 52 31 34 2c 5b 52  |      STR R14,[R|
00000750  31 33 2c 23 2d 34 5d 21  0d 03 7a 18 20 20 20 20  |13,#-4]!..z.    |
00000760  20 20 20 20 4c 44 52 20  52 34 2c 73 63 72 66 25  |    LDR R4,scrf%|
00000770  0d 03 84 42 20 20 20 20  20 20 20 20 4d 4f 56 20  |...B        MOV |
00000780  52 30 2c 23 31 31 33 3a  4d 4f 56 20 52 31 2c 52  |R0,#113:MOV R1,R|
00000790  34 3a 53 57 49 20 22 4f  53 5f 42 79 74 65 22 20  |4:SWI "OS_Byte" |
000007a0  3b 20 53 68 6f 77 20 6c  61 73 74 20 73 63 72 65  |; Show last scre|
000007b0  65 6e 0d 03 8e 16 20 20  20 20 20 20 20 20 82 20  |en....        . |
000007c0  52 34 2c 52 34 2c 23 33  0d 03 98 18 20 20 20 20  |R4,R4,#3....    |
000007d0  20 20 20 20 53 54 52 20  52 34 2c 73 63 72 66 25  |    STR R4,scrf%|
000007e0  0d 03 a2 19 20 20 20 20  20 20 20 20 41 44 52 20  |....        ADR |
000007f0  52 30 2c 73 63 72 61 64  25 0d 03 ac 18 20 20 20  |R0,scrad%....   |
00000800  20 20 20 20 20 53 55 42  20 52 34 2c 52 34 2c 23  |     SUB R4,R4,#|
00000810  31 0d 03 b6 3b 20 20 20  20 20 20 20 20 4c 44 52  |1...;        LDR|
00000820  20 52 30 2c 5b 52 30 2c  52 34 2c 4c 53 4c 23 32  | R0,[R0,R4,LSL#2|
00000830  5d 20 3b 20 52 30 3d 73  63 72 65 65 6e 20 61 64  |] ; R0=screen ad|
00000840  64 72 65 73 73 20 31 20  6f 72 20 32 0d 03 c0 1c  |dress 1 or 2....|
00000850  20 20 20 20 20 20 20 20  42 4c 20 20 73 74 6f 72  |        BL  stor|
00000860  65 73 63 72 61 64 32 25  0d 03 ca 19 20 20 20 20  |escrad2%....    |
00000870  20 20 20 20 4c 44 52 20  52 31 2c 73 63 72 6f 66  |    LDR R1,scrof|
00000880  25 0d 03 d4 27 20 20 20  20 20 20 20 20 53 55 42  |%...'        SUB|
00000890  20 52 30 2c 52 30 2c 52  31 20 3b 20 52 65 73 65  | R0,R0,R1 ; Rese|
000008a0  74 20 74 6f 20 74 6f 70  0d 03 de 1d 20 20 20 20  |t to top....    |
000008b0  20 20 20 20 53 54 52 20  52 30 2c 74 72 75 65 73  |    STR R0,trues|
000008c0  63 72 61 64 25 0d 03 e8  1b 20 20 20 20 20 20 20  |crad%....       |
000008d0  20 4c 44 52 20 50 43 2c  5b 52 31 33 5d 2c 23 34  | LDR PC,[R13],#4|
000008e0  0d 03 f2 04 0d 03 fc 20  2e 73 63 72 66 25 20 20  |....... .scrf%  |
000008f0  45 51 55 44 20 31 20 3b  20 53 63 72 65 65 6e 20  |EQUD 1 ; Screen |
00000900  66 6c 61 67 0d 04 06 18  2e 73 63 72 6f 66 25 20  |flag.....scrof% |
00000910  45 51 55 44 20 32 35 35  2a 33 32 30 0d 04 10 1c  |EQUD 255*320....|
00000920  2e 73 63 72 61 64 25 20  45 51 55 44 20 31 34 38  |.scrad% EQUD 148|
00000930  3a 45 51 55 44 20 2d 31  0d 04 1a 04 0d 04 24 1e  |:EQUD -1......$.|
00000940  2e 73 65 74 75 70 25 20  53 54 52 20 52 31 34 2c  |.setup% STR R14,|
00000950  5b 52 31 33 2c 23 2d 34  5d 21 0d 04 2e 41 20 20  |[R13,#-4]!...A  |
00000960  20 20 20 20 20 20 41 44  52 20 52 30 2c 73 63 72  |      ADR R0,scr|
00000970  61 64 25 3a 41 44 52 20  52 31 2c 73 63 72 61 64  |ad%:ADR R1,scrad|
00000980  25 3a 53 57 49 20 22 4f  53 5f 52 65 61 64 56 64  |%:SWI "OS_ReadVd|
00000990  75 56 61 72 69 61 62 6c  65 73 22 0d 04 38 2b 20  |uVariables"..8+ |
000009a0  20 20 20 20 20 20 20 4c  44 52 20 52 30 2c 73 63  |       LDR R0,sc|
000009b0  72 61 64 25 3a 53 54 52  20 52 30 2c 74 72 75 65  |rad%:STR R0,true|
000009c0  73 63 72 61 64 25 0d 04  42 34 20 20 20 20 20 20  |scrad%..B4      |
000009d0  20 20 4c 44 52 20 52 31  2c 73 63 72 6f 66 25 3a  |  LDR R1,scrof%:|
000009e0  41 44 44 20 52 30 2c 52  30 2c 52 31 3a 53 54 52  |ADD R0,R0,R1:STR|
000009f0  20 52 30 2c 73 63 72 61  64 25 0d 04 4c 1c 20 20  | R0,scrad%..L.  |
00000a00  20 20 20 20 20 20 42 4c  20 20 73 74 6f 72 65 73  |      BL  stores|
00000a10  63 72 61 64 32 25 0d 04  56 2d 20 20 20 20 20 20  |crad2%..V-      |
00000a20  20 20 41 44 44 20 52 30  2c 52 30 2c 23 26 31 34  |  ADD R0,R0,#&14|
00000a30  30 30 30 3a 53 54 52 20  52 30 2c 73 63 72 61 64  |000:STR R0,scrad|
00000a40  25 2b 34 0d 04 60 16 20  20 20 20 20 20 20 20 42  |%+4..`.        B|
00000a50  4c 20 20 63 6c 61 69 6d  25 0d 04 6a 2e 20 20 20  |L  claim%..j.   |
00000a60  20 20 20 20 20 4d 4f 56  20 52 30 2c 23 31 34 3a  |     MOV R0,#14:|
00000a70  4d 4f 56 20 52 31 2c 23  34 3a 53 57 49 20 22 4f  |MOV R1,#4:SWI "O|
00000a80  53 5f 42 79 74 65 22 0d  04 74 1b 20 20 20 20 20  |S_Byte"..t.     |
00000a90  20 20 20 4c 44 52 20 50  43 2c 5b 52 31 33 5d 2c  |   LDR PC,[R13],|
00000aa0  23 34 0d 04 7e 04 0d 04  88 0f 2e 63 6c 6f 73 65  |#4..~......close|
00000ab0  64 6f 77 6e 25 0d 04 92  1e 20 20 20 20 20 20 20  |down%....       |
00000ac0  20 53 54 52 20 52 31 34  2c 5b 52 31 33 2c 23 2d  | STR R14,[R13,#-|
00000ad0  34 5d 21 0d 04 9c 2e 20  20 20 20 20 20 20 20 4d  |4]!....        M|
00000ae0  4f 56 20 52 30 2c 23 31  33 3a 4d 4f 56 20 52 31  |OV R0,#13:MOV R1|
00000af0  2c 23 34 3a 53 57 49 20  22 4f 53 5f 42 79 74 65  |,#4:SWI "OS_Byte|
00000b00  22 0d 04 a6 18 20 20 20  20 20 20 20 20 42 4c 20  |"....        BL |
00000b10  20 72 65 6c 65 61 73 65  25 0d 04 b0 1b 20 20 20  | release%....   |
00000b20  20 20 20 20 20 4c 44 52  20 50 43 2c 5b 52 31 33  |     LDR PC,[R13|
00000b30  5d 2c 23 34 0d 04 ba 04  0d 04 c4 0f 2e 74 72 75  |],#4.........tru|
00000b40  65 73 63 72 61 64 25 0d  04 ce 12 20 20 20 20 20  |escrad%....     |
00000b50  20 20 20 45 51 55 44 20  30 0d 04 d8 04 0d 04 e2  |   EQUD 0.......|
00000b60  0b 2e 63 6c 73 31 33 61  0d 04 ec 12 20 20 20 20  |..cls13a....    |
00000b70  20 20 20 20 45 51 55 44  20 30 0d 04 f6 04 0d 05  |    EQUD 0......|
00000b80  00 0b 2e 63 6c 73 31 33  62 0d 05 0a 27 20 20 20  |...cls13b...'   |
00000b90  20 20 20 20 20 45 51 55  44 20 30 3a 45 51 55 44  |     EQUD 0:EQUD|
00000ba0  20 30 3a 45 51 55 44 20  30 3a 45 51 55 44 20 30  | 0:EQUD 0:EQUD 0|
00000bb0  0d 05 14 27 20 20 20 20  20 20 20 20 45 51 55 44  |...'        EQUD|
00000bc0  20 30 3a 45 51 55 44 20  30 3a 45 51 55 44 20 30  | 0:EQUD 0:EQUD 0|
00000bd0  3a 45 51 55 44 20 30 0d  05 1e 27 20 20 20 20 20  |:EQUD 0...'     |
00000be0  20 20 20 45 51 55 44 20  30 3a 45 51 55 44 20 30  |   EQUD 0:EQUD 0|
00000bf0  3a 45 51 55 44 20 30 3a  45 51 55 44 20 30 0d 05  |:EQUD 0:EQUD 0..|
00000c00  28 12 20 20 20 20 20 20  20 20 45 51 55 44 20 30  |(.        EQUD 0|
00000c10  0d 05 32 04 0d 05 3c 22  2e 63 6c 73 31 33 20 3b  |..2...<".cls13 ;|
00000c20  20 43 6c 65 61 72 20 74  68 65 20 eb 20 31 33 20  | Clear the . 13 |
00000c30  73 63 72 65 65 6e 0d 05  46 23 20 20 20 20 20 20  |screen..F#      |
00000c40  20 20 53 54 4d 46 44 20  52 31 33 21 2c 7b 52 30  |  STMFD R13!,{R0|
00000c50  2d 52 31 32 2c 52 31 34  7d 0d 05 50 1c 20 20 20  |-R12,R14}..P.   |
00000c60  20 20 20 20 20 53 54 52  20 20 20 52 31 33 2c 63  |     STR   R13,c|
00000c70  6c 73 31 33 61 0d 05 5a  1c 20 20 20 20 20 20 20  |ls13a..Z.       |
00000c80  20 41 44 52 20 20 20 52  31 33 2c 63 6c 73 31 33  | ADR   R13,cls13|
00000c90  62 0d 05 64 1f 20 20 20  20 20 20 20 20 4c 44 4d  |b..d.        LDM|
00000ca0  49 41 20 52 31 33 21 2c  7b 52 30 2d 52 31 32 7d  |IA R13!,{R0-R12}|
00000cb0  0d 05 6e 1a 20 20 20 20  20 20 20 20 4d 4f 56 20  |..n.        MOV |
00000cc0  20 20 52 31 33 2c 23 31  35 37 0d 05 78 20 20 20  |  R13,#157..x   |
00000cd0  20 20 20 20 20 20 4c 44  52 20 20 20 52 31 34 2c  |      LDR   R14,|
00000ce0  74 72 75 65 73 63 72 61  64 25 0d 05 82 0b 2e 63  |truescrad%.....c|
00000cf0  6c 73 31 33 63 0d 05 8c  05 5d 0d 05 96 13 e3 20  |ls13c....]..... |
00000d00  63 6c 73 31 33 64 3d 31  20 b8 20 31 30 0d 05 a0  |cls13d=1 . 10...|
00000d10  0b 20 5b 4f 50 54 70 25  0d 05 aa 1f 20 20 20 20  |. [OPTp%....    |
00000d20  20 20 20 20 53 54 4d 49  41 20 52 31 34 21 2c 7b  |    STMIA R14!,{|
00000d30  52 30 2d 52 31 32 7d 0d  05 b4 06 20 5d 0d 05 be  |R0-R12}.... ]...|
00000d40  05 ed 0d 05 c8 0a 5b 4f  50 54 70 25 0d 05 d2 1c  |......[OPTp%....|
00000d50  20 20 20 20 20 20 20 20  53 55 42 53 20 20 52 31  |        SUBS  R1|
00000d60  33 2c 52 31 33 2c 23 31  0d 05 dc 18 20 20 20 20  |3,R13,#1....    |
00000d70  20 20 20 20 42 4e 45 20  20 20 63 6c 73 31 33 63  |    BNE   cls13c|
00000d80  0d 05 e6 1f 20 20 20 20  20 20 20 20 53 54 4d 49  |....        STMI|
00000d90  41 20 52 31 34 21 2c 7b  52 30 2d 52 31 32 7d 0d  |A R14!,{R0-R12}.|
00000da0  05 f0 1f 20 20 20 20 20  20 20 20 53 54 4d 49 41  |...        STMIA|
00000db0  20 52 31 34 21 2c 7b 52  30 2d 52 31 32 7d 0d 05  | R14!,{R0-R12}..|
00000dc0  fa 1f 20 20 20 20 20 20  20 20 53 54 4d 49 41 20  |..        STMIA |
00000dd0  52 31 34 21 2c 7b 52 30  2d 52 31 32 7d 0d 06 04  |R14!,{R0-R12}...|
00000de0  1f 20 20 20 20 20 20 20  20 53 54 4d 49 41 20 52  |.        STMIA R|
00000df0  31 34 21 2c 7b 52 30 2d  52 31 32 7d 0d 06 0e 1f  |14!,{R0-R12}....|
00000e00  20 20 20 20 20 20 20 20  53 54 4d 49 41 20 52 31  |        STMIA R1|
00000e10  34 21 2c 7b 52 30 2d 52  31 32 7d 0d 06 18 1e 20  |4!,{R0-R12}.... |
00000e20  20 20 20 20 20 20 20 53  54 4d 49 41 20 52 31 34  |       STMIA R14|
00000e30  21 2c 7b 52 30 2d 52 34  7d 0d 06 22 1c 20 20 20  |!,{R0-R4}..".   |
00000e40  20 20 20 20 20 4c 44 52  20 20 20 52 31 33 2c 63  |     LDR   R13,c|
00000e50  6c 73 31 33 61 0d 06 2c  22 20 20 20 20 20 20 20  |ls13a..,"       |
00000e60  20 4c 44 4d 46 44 20 52  31 33 21 2c 7b 52 30 2d  | LDMFD R13!,{R0-|
00000e70  52 31 32 2c 50 43 7d 0d  06 36 04 0d 06 40 3c 2e  |R12,PC}..6...@<.|
00000e80  73 63 61 6c 65 25 20 4f  50 54 20 a4 73 70 61 63  |scale% OPT .spac|
00000e90  65 28 74 79 25 2a 34 2b  34 2c 70 25 29 20 20 20  |e(ty%*4+4,p%)   |
00000ea0  20 20 3b 20 53 63 61 6c  65 20 61 74 20 74 68 69  |  ; Scale at thi|
00000eb0  73 20 70 6f 69 6e 74 0d  06 4a 3c 2e 79 61 74 77  |s point..J<.yatw|
00000ec0  25 20 20 4f 50 54 20 a4  73 70 61 63 65 28 74 79  |%  OPT .space(ty|
00000ed0  25 2a 34 2b 34 2c 70 25  29 20 20 20 20 20 3b 20  |%*4+4,p%)     ; |
00000ee0  59 20 63 6f 6f 72 64 69  6e 61 74 65 20 73 63 61  |Y coordinate sca|
00000ef0  6c 65 64 0d 06 54 36 2e  79 63 6f 6c 25 20 20 4f  |led..T6.ycol%  O|
00000f00  50 54 20 a4 73 70 61 63  65 28 74 79 25 2b 31 2c  |PT .space(ty%+1,|
00000f10  70 25 29 3a 41 4c 49 47  4e 20 3b 20 43 6f 6c 6f  |p%):ALIGN ; Colo|
00000f20  75 72 20 73 63 61 6c 65  64 0d 06 5e 04 0d 06 68  |ur scaled..^...h|
00000f30  3e 2e 74 65 78 74 25 20  20 4f 50 54 20 a4 73 70  |>.text%  OPT .sp|
00000f40  61 63 65 28 33 32 2a 72  6c 69 6e 65 73 2c 70 25  |ace(32*rlines,p%|
00000f50  29 20 20 20 3b 20 4c 69  6e 65 73 20 6f 66 20 33  |)   ; Lines of 3|
00000f60  32 20 63 68 72 73 20 65  61 63 68 0d 06 72 46 2e  |2 chrs each..rF.|
00000f70  74 77 69 64 25 20 20 4f  50 54 20 a4 73 70 61 63  |twid%  OPT .spac|
00000f80  65 28 34 20 2a 72 6c 69  6e 65 73 2c 70 25 29 20  |e(4 *rlines,p%) |
00000f90  20 20 3b 20 57 69 64 74  68 20 6f 66 20 65 61 63  |  ; Width of eac|
00000fa0  68 20 6c 69 6e 65 2c 20  73 63 61 6c 65 64 20 75  |h line, scaled u|
00000fb0  70 0d 06 7c 04 0d 06 86  11 2e 73 74 6f 72 65 73  |p..|......stores|
00000fc0  63 72 61 64 32 25 0d 06  90 1a 20 20 20 20 20 20  |crad2%....      |
00000fd0  20 20 53 54 52 20 52 30  2c 73 63 72 61 64 32 25  |  STR R0,scrad2%|
00000fe0  0d 06 9a 16 20 20 20 20  20 20 20 20 4d 4f 56 20  |....        MOV |
00000ff0  50 43 2c 52 31 34 0d 06  a4 04 0d 06 ae 1b 2e 6d  |PC,R14.........m|
00001000  62 78 25 20 20 20 20 20  20 45 51 55 44 20 62 78  |bx%      EQUD bx|
00001010  25 3c 3c 31 32 0d 06 b8  15 2e 73 63 72 61 64 32  |%<<12.....scrad2|
00001020  25 20 20 20 45 51 55 44  20 30 0d 06 c2 1a 2e 6c  |%   EQUD 0.....l|
00001030  69 6e 65 73 25 20 20 20  20 45 51 55 44 20 72 6c  |ines%    EQUD rl|
00001040  69 6e 65 73 0d 06 cc 19  2e 79 61 74 77 61 64 72  |ines.....yatwadr|
00001050  25 20 20 45 51 55 44 20  79 61 74 77 25 0d 06 d6  |%  EQUD yatw%...|
00001060  19 2e 74 77 69 64 61 64  72 25 20 20 45 51 55 44  |..twidadr%  EQUD|
00001070  20 74 77 69 64 25 0d 06  e0 19 2e 79 63 6f 6c 61  | twid%.....ycola|
00001080  64 72 25 20 20 45 51 55  44 20 79 63 6f 6c 25 0d  |dr%  EQUD ycol%.|
00001090  06 ea 19 2e 74 65 78 74  61 64 72 25 20 20 45 51  |....textadr%  EQ|
000010a0  55 44 20 74 65 78 74 25  0d 06 f4 19 2e 62 75 66  |UD text%.....buf|
000010b0  66 61 64 72 25 20 20 45  51 55 44 20 62 75 66 66  |fadr%  EQUD buff|
000010c0  25 0d 06 fe 1a 2e 73 63  61 6c 65 61 64 72 25 20  |%.....scaleadr% |
000010d0  45 51 55 44 20 73 63 61  6c 65 25 0d 07 08 19 2e  |EQUD scale%.....|
000010e0  73 69 7a 65 61 64 72 25  20 20 45 51 55 44 20 73  |sizeadr%  EQUD s|
000010f0  69 7a 65 25 0d 07 12 04  0d 07 1c 42 2e 64 72 61  |ize%.......B.dra|
00001100  77 73 63 72 20 3b 20 44  72 61 77 20 74 65 78 74  |wscr ; Draw text|
00001110  20 69 6e 20 73 6c 6f 70  65 64 20 70 6f 73 69 74  | in sloped posit|
00001120  69 6f 6e 2c 20 61 6c 6c  20 6c 69 6e 65 73 20 74  |ion, all lines t|
00001130  6f 70 20 74 6f 20 62 61  73 65 0d 07 26 16 53 54  |op to base..&.ST|
00001140  52 20 52 31 34 2c 5b 52  31 33 2c 23 2d 34 5d 21  |R R14,[R13,#-4]!|
00001150  0d 07 30 29 4d 4f 56 20  52 31 34 2c 23 74 79 25  |..0)MOV R14,#ty%|
00001160  20 3b 20 4c 6f 6f 70 20  66 72 6f 6d 20 74 79 20  | ; Loop from ty |
00001170  64 6f 77 6e 20 74 6f 20  30 0d 07 3a 0a 2e 6c 6f  |down to 0..:..lo|
00001180  6f 70 25 0d 07 44 15 20  4c 44 52 20 20 52 38 2c  |op%..D. LDR  R8,|
00001190  79 61 74 77 61 64 72 25  0d 07 4e 4a 20 4c 44 52  |yatwadr%..NJ LDR|
000011a0  20 20 52 38 2c 5b 52 38  2c 52 31 34 2c 4c 53 4c  |  R8,[R8,R14,LSL|
000011b0  23 32 5d 20 20 20 20 20  20 20 20 20 20 20 20 20  |#2]             |
000011c0  20 20 3b 20 52 38 20 3d  20 59 20 63 6f 6f 72 64  |  ; R8 = Y coord|
000011d0  69 6e 61 74 65 20 6f 66  20 74 68 69 73 20 6c 69  |inate of this li|
000011e0  6e 65 0d 07 58 11 20 4c  44 52 20 20 52 31 2c 70  |ne..X. LDR  R1,p|
000011f0  6f 73 25 0d 07 62 42 20  53 55 42 53 20 52 38 2c  |os%..bB SUBS R8,|
00001200  52 38 2c 52 31 20 20 20  20 20 20 20 20 20 20 20  |R8,R1           |
00001210  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 53  |             ; S|
00001220  75 62 74 72 61 63 74 20  74 65 78 74 20 70 6f 73  |ubtract text pos|
00001230  69 74 69 6f 6e 0d 07 6c  37 20 42 47 54 20 20 6e  |ition..l7 BGT  n|
00001240  65 78 74 25 20 20 20 20  20 20 20 20 20 20 20 20  |ext%            |
00001250  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001260  20 4f 66 66 20 74 68 65  20 74 6f 70 0d 07 76 45  | Off the top..vE|
00001270  20 52 53 42 20 20 52 31  30 2c 52 38 2c 23 30 20  | RSB  R10,R8,#0 |
00001280  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001290  20 20 20 20 20 20 3b 20  46 6c 69 70 20 6f 76 65  |      ; Flip ove|
000012a0  72 20 74 6f 20 72 69 67  68 74 20 77 61 79 20 75  |r to right way u|
000012b0  70 0d 07 80 43 20 4d 4f  56 20 20 52 31 30 2c 52  |p...C MOV  R10,R|
000012c0  31 30 2c 4c 53 52 23 35  20 20 20 20 20 20 20 20  |10,LSR#5        |
000012d0  20 20 20 20 20 20 20 20  20 20 20 3b 20 52 31 30  |           ; R10|
000012e0  20 3d 20 4c 69 6e 65 20  6f 66 20 74 65 78 74 20  | = Line of text |
000012f0  68 65 72 65 0d 07 8a 4a  20 80 20 20 52 38 2c 52  |here...J .  R8,R|
00001300  38 2c 23 33 31 20 20 20  20 20 20 20 20 20 20 20  |8,#31           |
00001310  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 52 38  |            ; R8|
00001320  20 3d 20 4f 66 66 73 65  74 20 77 69 74 68 69 6e  | = Offset within|
00001330  20 74 65 78 74 20 6c 69  6e 65 20 28 59 29 0d 07  | text line (Y)..|
00001340  94 49 20 4c 44 52 20 20  52 31 2c 6c 69 6e 65 73  |.I LDR  R1,lines|
00001350  25 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |%               |
00001360  20 20 20 20 20 20 20 20  3b 20 52 31 20 3d 20 4e  |        ; R1 = N|
00001370  75 6d 62 65 72 20 6f 66  20 6c 69 6e 65 73 20 69  |umber of lines i|
00001380  6e 20 74 6f 74 61 6c 0d  07 9e 3a 20 43 4d 50 20  |n total...: CMP |
00001390  20 52 31 30 2c 52 31 3a  42 47 45 20 6e 65 78 74  | R10,R1:BGE next|
000013a0  25 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |%               |
000013b0  20 3b 20 4f 66 66 20 74  68 65 20 62 6f 74 74 6f  | ; Off the botto|
000013c0  6d 0d 07 a8 15 20 4c 44  52 20 20 52 36 2c 74 77  |m.... LDR  R6,tw|
000013d0  69 64 61 64 72 25 0d 07  b2 44 20 4c 44 52 20 20  |idadr%...D LDR  |
000013e0  52 31 32 2c 5b 52 36 2c  52 31 30 2c 4c 53 4c 23  |R12,[R6,R10,LSL#|
000013f0  32 5d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |2]              |
00001400  3b 20 52 31 32 20 3d 20  57 69 64 74 68 20 6f 66  |; R12 = Width of|
00001410  20 74 68 69 73 20 6c 69  6e 65 0d 07 bc 38 20 4d  | this line...8 M|
00001420  4f 56 53 20 52 31 32 2c  52 31 32 3a 42 45 51 20  |OVS R12,R12:BEQ |
00001430  6e 65 78 74 25 20 20 20  20 20 20 20 20 20 20 20  |next%           |
00001440  20 20 20 20 3b 20 41 20  62 6c 61 6e 6b 20 6c 69  |    ; A blank li|
00001450  6e 65 0d 07 c6 15 20 4c  44 52 20 20 52 36 2c 79  |ne.... LDR  R6,y|
00001460  63 6f 6c 61 64 72 25 0d  07 d0 45 20 4c 44 52 42  |coladr%...E LDRB|
00001470  20 52 36 2c 5b 52 36 2c  52 31 34 5d 20 20 20 20  | R6,[R6,R14]    |
00001480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001490  20 3b 20 52 36 20 3d 20  43 6f 6c 6f 75 72 20 61  | ; R6 = Colour a|
000014a0  74 20 74 68 69 73 20 64  65 70 74 68 0d 07 da 15  |t this depth....|
000014b0  20 4c 44 52 20 20 52 34  2c 74 65 78 74 61 64 72  | LDR  R4,textadr|
000014c0  25 0d 07 e4 4c 20 41 44  44 20 20 52 34 2c 52 34  |%...L ADD  R4,R4|
000014d0  2c 52 31 30 2c 4c 53 4c  23 35 20 20 20 20 20 20  |,R10,LSL#5      |
000014e0  20 20 20 20 20 20 20 20  20 20 20 3b 20 52 34 20  |           ; R4 |
000014f0  3d 20 41 64 64 72 65 73  73 20 6f 66 20 74 68 65  |= Address of the|
00001500  20 6c 69 6e 65 20 6f 66  20 74 65 78 74 0d 07 ee  | line of text...|
00001510  47 20 4c 44 52 42 20 52  31 2c 5b 52 34 5d 2c 23  |G LDRB R1,[R4],#|
00001520  31 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |1               |
00001530  20 20 20 20 20 20 20 3b  20 52 31 20 3d 20 4c 65  |       ; R1 = Le|
00001540  6e 67 74 68 20 6f 66 20  6c 69 6e 65 20 69 6e 20  |ngth of line in |
00001550  63 68 72 73 0d 07 f8 49  20 52 53 42 20 20 52 31  |chrs...I RSB  R1|
00001560  30 2c 52 38 2c 23 33 31  20 20 20 20 20 20 20 20  |0,R8,#31        |
00001570  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 20  |              ; |
00001580  50 6f 73 69 74 69 6f 6e  20 77 69 74 68 20 6c 65  |Position with le|
00001590  74 74 65 72 20 72 65 76  65 72 73 65 64 0d 08 02  |tter reversed...|
000015a0  15 20 4c 44 52 20 20 52  38 2c 62 75 66 66 61 64  |. LDR  R8,buffad|
000015b0  72 25 0d 08 0c 46 20 41  44 44 20 20 52 31 30 2c  |r%...F ADD  R10,|
000015c0  52 38 2c 52 31 30 2c 4c  53 4c 23 32 20 20 20 20  |R8,R10,LSL#2    |
000015d0  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 4f 66  |            ; Of|
000015e0  66 73 65 74 20 74 6f 20  77 69 74 68 69 6e 20 66  |fset to within f|
000015f0  6f 6e 74 20 64 61 74 61  0d 08 16 16 20 4c 44 52  |ont data.... LDR|
00001600  20 20 52 37 2c 73 63 61  6c 65 61 64 72 25 0d 08  |  R7,scaleadr%..|
00001610  20 3d 20 4c 44 52 20 20  52 35 2c 5b 52 37 2c 52  | = LDR  R5,[R7,R|
00001620  31 34 2c 4c 53 4c 23 32  5d 20 20 20 20 20 20 20  |14,LSL#2]       |
00001630  20 20 20 20 20 20 20 20  3b 20 52 35 20 3d 20 53  |        ; R5 = S|
00001640  63 61 6c 65 20 66 61 63  74 6f 72 0d 08 2a 14 20  |cale factor..*. |
00001650  4d 55 4c 20 20 52 31 31  2c 52 31 32 2c 52 35 0d  |MUL  R11,R12,R5.|
00001660  08 34 48 20 4d 4f 56 20  20 52 37 2c 52 31 31 2c  |.4H MOV  R7,R11,|
00001670  4c 53 52 23 31 20 20 20  20 20 20 20 20 20 20 20  |LSR#1           |
00001680  20 20 20 20 20 20 20 20  20 3b 20 52 37 20 3d 20  |         ; R7 = |
00001690  57 69 64 74 68 20 73 63  61 6c 65 64 20 74 6f 20  |Width scaled to |
000016a0  74 68 65 20 72 6f 77 0d  08 3e 4c 20 52 53 42 20  |the row..>L RSB |
000016b0  20 52 37 2c 52 37 2c 23  31 36 30 3c 3c 31 33 20  | R7,R7,#160<<13 |
000016c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000016d0  20 3b 20 46 69 6e 64 20  73 74 61 72 74 69 6e 67  | ; Find starting|
000016e0  20 70 6f 69 6e 74 20 6f  6e 20 6c 65 66 74 20 28  | point on left (|
000016f0  73 78 29 0d 08 48 47 20  4c 44 52 20 20 52 32 2c  |sx)..HG LDR  R2,|
00001700  73 63 72 61 64 32 25 20  20 20 20 20 20 20 20 20  |scrad2%         |
00001710  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 52  |             ; R|
00001720  32 20 3d 20 41 64 64 72  65 73 73 20 6f 66 20 62  |2 = Address of b|
00001730  6f 74 74 6f 6d 20 6c 65  66 74 0d 08 52 19 20 53  |ottom left..R. S|
00001740  55 42 20 20 52 32 2c 52  32 2c 52 31 34 2c 4c 53  |UB  R2,R2,R14,LS|
00001750  4c 23 36 0d 08 5c 3b 20  53 55 42 20 20 52 32 2c  |L#6..\; SUB  R2,|
00001760  52 32 2c 52 31 34 2c 4c  53 4c 23 38 20 20 20 20  |R2,R14,LSL#8    |
00001770  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 53  |             ; S|
00001780  75 62 74 72 61 63 74 20  73 79 2a 33 32 30 0d 08  |ubtract sy*320..|
00001790  66 15 20 4c 44 52 20 20  52 30 2c 73 69 7a 65 61  |f. LDR  R0,sizea|
000017a0  64 72 25 0d 08 70 10 20  4d 4f 56 20 20 52 31 31  |dr%..p. MOV  R11|
000017b0  2c 23 31 0d 08 7a 0c 20  2e 6c 6f 6f 70 32 25 0d  |,#1..z. .loop2%.|
000017c0  08 84 43 20 20 4c 44 52  42 20 52 33 2c 5b 52 34  |..C  LDRB R3,[R4|
000017d0  5d 2c 23 31 20 20 20 20  20 20 20 20 20 20 20 20  |],#1            |
000017e0  20 20 20 20 20 20 20 20  20 3b 20 52 33 20 3d 20  |         ; R3 = |
000017f0  43 68 72 20 66 72 6f 6d  20 74 65 78 74 20 64 61  |Chr from text da|
00001800  74 61 0d 08 8e 43 20 20  4c 44 52 42 20 52 31 32  |ta...C  LDRB R12|
00001810  2c 5b 52 30 2c 52 33 5d  20 20 20 20 20 20 20 20  |,[R0,R3]        |
00001820  20 20 20 20 20 20 20 20  20 20 20 20 3b 20 52 31  |            ; R1|
00001830  32 20 3d 20 57 69 64 74  68 20 6f 66 20 74 68 69  |2 = Width of thi|
00001840  73 20 63 68 72 0d 08 98  4b 20 20 41 44 44 20 20  |s chr...K  ADD  |
00001850  52 38 2c 52 31 30 2c 52  33 2c 4c 53 4c 23 37 20  |R8,R10,R3,LSL#7 |
00001860  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001870  20 52 38 20 20 3d 20 50  6f 73 69 74 69 6f 6e 20  | R8  = Position |
00001880  77 69 74 68 69 6e 20 66  6f 6e 74 20 64 61 74 61  |within font data|
00001890  0d 08 a2 3b 20 20 4c 44  52 42 20 52 39 2c 5b 52  |...;  LDRB R9,[R|
000018a0  38 5d 2c 23 31 20 20 20  20 20 20 20 20 20 20 20  |8],#1           |
000018b0  20 20 20 20 20 20 20 20  20 20 3b 20 52 39 20 20  |          ; R9  |
000018c0  3d 20 46 6f 6e 74 20 62  79 74 65 0d 08 ac 3e 20  |= Font byte...> |
000018d0  20 4d 4f 56 20 20 52 33  2c 23 37 20 20 20 20 20  | MOV  R3,#7     |
000018e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000018f0  20 20 20 20 20 3b 20 52  33 20 20 3d 20 42 69 74  |     ; R3  = Bit|
00001900  20 74 6f 20 63 68 65 63  6b 0d 08 b6 0d 20 20 2e  | to check....  .|
00001910  6c 6f 6f 70 31 25 0d 08  c0 36 20 20 20 41 44 44  |loop1%...6   ADD|
00001920  20 20 52 37 2c 52 37 2c  52 35 20 20 20 20 20 20  |  R7,R7,R5      |
00001930  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001940  3b 20 4d 6f 76 65 20 61  6c 6f 6e 67 0d 08 ca 40  |; Move along...@|
00001950  20 20 20 54 53 54 20 20  52 31 31 2c 52 39 2c 4c  |   TST  R11,R9,L|
00001960  53 52 20 52 33 20 20 20  20 20 20 20 20 20 20 20  |SR R3           |
00001970  20 20 20 20 20 20 3b 20  45 78 61 6d 69 6e 65 20  |      ; Examine |
00001980  62 69 74 20 52 33 20 6f  66 20 52 39 0d 08 d4 3f  |bit R3 of R9...?|
00001990  20 20 20 42 45 51 20 20  6e 6f 70 69 78 25 20 20  |   BEQ  nopix%  |
000019a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000019b0  20 20 20 20 20 20 3b 20  4e 6f 20 70 69 78 65 6c  |      ; No pixel|
000019c0  20 68 65 72 65 20 6d 61  74 65 79 0d 08 de 45 20  | here matey...E |
000019d0  20 20 43 4d 50 20 20 52  37 2c 23 33 32 30 3c 3c  |  CMP  R7,#320<<|
000019e0  31 33 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |13              |
000019f0  20 20 20 20 20 3b 20 43  68 65 63 6b 20 6e 6f 74  |     ; Check not|
00001a00  20 6f 66 66 20 65 69 74  68 65 72 20 65 64 67 65  | off either edge|
00001a10  0d 08 e8 37 20 20 20 53  54 52 43 43 42 20 52 36  |...7   STRCCB R6|
00001a20  2c 5b 52 32 2c 52 37 2c  4c 53 52 23 31 33 5d 20  |,[R2,R7,LSR#13] |
00001a30  20 20 20 20 20 20 20 20  20 20 3b 20 50 6c 6f 74  |          ; Plot|
00001a40  20 70 69 78 65 6c 2e 0d  08 f2 0e 20 20 20 2e 6e  | pixel.....   .n|
00001a50  6f 70 69 78 25 0d 08 fc  34 20 20 20 53 55 42 53  |opix%...4   SUBS|
00001a60  20 20 20 52 33 2c 52 33  2c 23 31 20 20 20 20 20  |   R3,R3,#1     |
00001a70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001a80  20 4e 65 78 74 20 62 69  74 0d 09 06 47 20 20 20  | Next bit...G   |
00001a90  4d 4f 56 4d 49 20 20 52  33 2c 23 37 20 20 20 20  |MOVMI  R3,#7    |
00001aa0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001ab0  20 20 20 3b 20 47 6f 6e  65 20 6f 66 66 20 62 79  |   ; Gone off by|
00001ac0  74 65 2c 20 73 6f 20 72  65 73 65 74 20 62 69 74  |te, so reset bit|
00001ad0  0d 09 10 39 20 20 20 4c  44 52 4d 49 42 20 52 39  |...9   LDRMIB R9|
00001ae0  2c 5b 52 38 5d 2c 23 31  20 20 20 20 20 20 20 20  |,[R8],#1        |
00001af0  20 20 20 20 20 20 20 20  20 20 3b 20 47 65 74 20  |          ; Get |
00001b00  6e 65 78 74 20 62 79 74  65 0d 09 1a 18 20 20 20  |next byte....   |
00001b10  53 55 42 53 20 20 20 52  31 32 2c 52 31 32 2c 23  |SUBS   R12,R12,#|
00001b20  31 0d 09 24 3e 20 20 42  50 4c 20 20 20 6c 6f 6f  |1..$>  BPL   loo|
00001b30  70 31 25 20 20 20 20 20  20 20 20 20 20 20 20 20  |p1%             |
00001b40  20 20 20 20 20 20 20 20  20 20 20 3b 20 4c 6f 6f  |           ; Loo|
00001b50  70 20 66 6f 72 20 74 68  65 20 77 69 64 74 68 0d  |p for the width.|
00001b60  09 2e 36 20 20 41 44 44  20 20 20 52 37 2c 52 37  |..6  ADD   R7,R7|
00001b70  2c 52 35 20 20 20 20 20  20 20 20 20 20 20 20 20  |,R5             |
00001b80  20 20 20 20 20 20 20 20  20 3b 20 47 61 70 20 61  |         ; Gap a|
00001b90  74 20 65 6e 64 0d 09 38  3e 20 20 53 55 42 53 20  |t end..8>  SUBS |
00001ba0  20 52 31 2c 52 31 2c 23  31 20 20 20 20 20 20 20  | R1,R1,#1       |
00001bb0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001bc0  20 4f 6e 65 20 6c 65 73  73 20 63 68 72 20 74 6f  | One less chr to|
00001bd0  20 64 6f 0d 09 42 3b 20  42 4e 45 20 6c 6f 6f 70  | do..B; BNE loop|
00001be0  32 25 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |2%              |
00001bf0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 54  |             ; T|
00001c00  68 65 72 65 20 61 72 65  20 6d 6f 72 65 21 0d 09  |here are more!..|
00001c10  4c 0b 20 2e 6e 65 78 74  25 0d 09 56 14 20 53 55  |L. .next%..V. SU|
00001c20  42 53 20 52 31 34 2c 52  31 34 2c 23 31 0d 09 60  |BS R14,R14,#1..`|
00001c30  47 42 50 4c 20 20 6c 6f  6f 70 25 20 20 20 20 20  |GBPL  loop%     |
00001c40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001c50  20 20 20 20 20 20 20 3b  20 47 6f 20 61 6e 64 20  |       ; Go and |
00001c60  64 6f 20 74 68 65 20 6e  65 78 74 20 6c 69 6e 65  |do the next line|
00001c70  20 6e 6f 77 0d 09 6a 14  4c 44 52 20 20 50 43 2c  | now..j.LDR  PC,|
00001c80  5b 52 31 33 5d 2c 23 34  0d 09 74 04 0d 09 7e 10  |[R13],#4..t...~.|
00001c90  2e 70 6f 73 25 20 45 51  55 44 20 30 0d 09 88 04  |.pos% EQUD 0....|
00001ca0  0d 09 92 0d 2e 72 75 6e  6c 6f 6f 70 25 0d 09 9c  |.....runloop%...|
00001cb0  17 53 54 52 20 20 52 31  34 2c 5b 52 31 33 2c 23  |.STR  R14,[R13,#|
00001cc0  2d 34 5d 21 0d 09 a6 0f  42 4c 20 20 20 73 65 74  |-4]!....BL   set|
00001cd0  75 70 25 0d 09 b0 28 4d  4f 56 20 20 52 30 2c 23  |up%...(MOV  R0,#|
00001ce0  31 31 33 3a 4d 4f 56 20  52 31 2c 23 32 3a 53 57  |113:MOV R1,#2:SW|
00001cf0  49 20 22 4f 53 5f 42 79  74 65 22 0d 09 ba 23 4c  |I "OS_Byte"...#L|
00001d00  44 52 20 20 52 30 2c 73  63 72 63 6e 74 25 3a 53  |DR  R0,scrcnt%:S|
00001d10  54 52 20 52 30 2c 6c 61  73 74 63 6e 74 25 0d 09  |TR R0,lastcnt%..|
00001d20  c4 04 0d 09 ce 12 2e 72  65 70 65 61 74 5f 70 6f  |.......repeat_po|
00001d30  69 6e 74 25 0d 09 d8 0e  4d 4f 56 20 20 52 30 2c  |int%....MOV  R0,|
00001d40  23 30 0d 09 e2 10 53 54  52 20 20 52 30 2c 70 6f  |#0....STR  R0,po|
00001d50  73 25 0d 09 ec 04 0d 09  f6 0a 2e 6c 6f 6f 70 25  |s%.........loop%|
00001d60  0d 0a 00 04 0d 0a 0a 25  20 42 4c 20 20 63 6c 73  |.......% BL  cls|
00001d70  31 33 20 20 20 20 20 3b  20 43 6c 65 61 72 20 74  |13     ; Clear t|
00001d80  68 65 20 73 63 72 65 65  6e 0d 0a 14 22 20 42 4c  |he screen..." BL|
00001d90  20 20 64 72 61 77 73 63  72 20 20 20 3b 20 44 72  |  drawscr   ; Dr|
00001da0  61 77 20 74 68 65 20 74  65 78 74 0d 0a 1e 23 20  |aw the text...# |
00001db0  42 4c 20 20 70 6c 6f 74  73 74 61 72 73 20 3b 20  |BL  plotstars ; |
00001dc0  50 6c 6f 74 20 74 68 65  20 73 74 61 72 73 0d 0a  |Plot the stars..|
00001dd0  28 04 0d 0a 32 1d 20 3b  20 43 6f 75 6e 74 20 73  |(...2. ; Count s|
00001de0  63 72 65 65 6e 20 72 65  66 72 65 73 68 65 73 0d  |creen refreshes.|
00001df0  0a 3c 14 20 4c 44 52 20  52 31 2c 6c 61 73 74 63  |.<. LDR R1,lastc|
00001e00  6e 74 25 0d 0a 46 0c 20  2e 6c 6f 6f 70 31 25 0d  |nt%..F. .loop1%.|
00001e10  0a 50 14 20 20 4c 44 52  20 52 30 2c 73 63 72 63  |.P.  LDR R0,scrc|
00001e20  6e 74 25 0d 0a 5a 12 20  20 53 55 42 20 52 32 2c  |nt%..Z.  SUB R2,|
00001e30  52 30 2c 52 31 0d 0a 64  14 20 20 43 4d 50 20 52  |R0,R1..d.  CMP R|
00001e40  32 2c 23 73 70 65 65 64  25 0d 0a 6e 0f 20 42 4c  |2,#speed%..n. BL|
00001e50  54 20 6c 6f 6f 70 31 25  0d 0a 78 13 20 4c 44 52  |T loop1%..x. LDR|
00001e60  20 52 30 2c 73 63 72 63  6e 74 25 0d 0a 82 0c 20  | R0,scrcnt%.... |
00001e70  2e 6c 6f 6f 70 31 25 0d  0a 8c 14 20 20 4c 44 52  |.loop1%....  LDR|
00001e80  20 52 31 2c 73 63 72 63  6e 74 25 0d 0a 96 0f 20  | R1,scrcnt%.... |
00001e90  20 54 45 51 20 52 30 2c  52 31 0d 0a a0 0f 20 42  | TEQ R0,R1.... B|
00001ea0  45 51 20 6c 6f 6f 70 31  25 0d 0a aa 14 20 53 54  |EQ loop1%.... ST|
00001eb0  52 20 52 31 2c 6c 61 73  74 63 6e 74 25 0d 0a b4  |R R1,lastcnt%...|
00001ec0  04 0d 0a be 14 20 42 4c  20 20 73 77 61 70 73 63  |..... BL  swapsc|
00001ed0  72 61 64 73 25 0d 0a c8  04 0d 0a d2 10 20 4c 44  |rads%........ LD|
00001ee0  52 20 52 30 2c 70 6f 73  25 0d 0a dc 11 20 41 44  |R R0,pos%.... AD|
00001ef0  44 20 52 30 2c 52 30 2c  23 32 0d 0a e6 10 20 53  |D R0,R0,#2.... S|
00001f00  54 52 20 52 30 2c 70 6f  73 25 0d 0a f0 3d 20 53  |TR R0,pos%...= S|
00001f10  57 49 20 22 4f 53 5f 52  65 61 64 45 73 63 61 70  |WI "OS_ReadEscap|
00001f20  65 53 74 61 74 65 22 20  3b 20 43 68 65 63 6b 20  |eState" ; Check |
00001f30  69 66 20 45 73 63 20 68  61 73 20 62 65 65 6e 20  |if Esc has been |
00001f40  70 72 65 73 73 65 64 0d  0a fa 10 20 42 43 53 20  |pressed.... BCS |
00001f50  66 69 6e 69 74 6f 25 0d  0b 04 14 20 4c 44 52 20  |finito%.... LDR |
00001f60  52 31 2c 74 65 78 74 65  6e 64 25 0d 0b 0e 0e 20  |R1,textend%.... |
00001f70  43 4d 50 20 52 30 2c 52  31 0d 0b 18 0d 42 4c 54  |CMP R0,R1....BLT|
00001f80  20 6c 6f 6f 70 25 0d 0b  22 04 0d 0b 2c 05 5d 0d  | loop%.."...,.].|
00001f90  0b 36 0f e7 20 72 65 70  65 61 74 25 20 8c 0d 0b  |.6.. repeat% ...|
00001fa0  40 0d 20 5b 20 4f 50 54  20 70 25 0d 0b 4a 16 20  |@. [ OPT p%..J. |
00001fb0  20 20 42 20 72 65 70 65  61 74 5f 70 6f 69 6e 74  |  B repeat_point|
00001fc0  25 0d 0b 54 06 20 5d 0d  0b 5e 05 cd 0d 0b 68 0c  |%..T. ]..^....h.|
00001fd0  5b 20 4f 50 54 20 70 25  0d 0b 72 04 0d 0b 7c 0c  |[ OPT p%..r...|.|
00001fe0  2e 66 69 6e 69 74 6f 25  0d 0b 86 12 42 4c 20 20  |.finito%....BL  |
00001ff0  63 6c 6f 73 65 64 6f 77  6e 25 0d 0b 90 13 4c 44  |closedown%....LD|
00002000  52 20 50 43 2c 5b 52 31  33 5d 2c 23 34 0d 0b 9a  |R PC,[R13],#4...|
00002010  04 0d 0b a4 14 2e 74 65  78 74 65 6e 64 25 20 45  |......textend% E|
00002020  51 55 44 20 30 0d 0b ae  04 0d 0b b8 14 2e 6c 61  |QUD 0.........la|
00002030  73 74 63 6e 74 25 20 45  51 55 44 20 30 0d 0b c2  |stcnt% EQUD 0...|
00002040  4c 2e 63 6c 61 69 6d 25  20 20 20 4d 4f 56 20 52  |L.claim%   MOV R|
00002050  30 2c 23 26 31 30 3a 41  44 52 20 52 31 2c 73 63  |0,#&10:ADR R1,sc|
00002060  72 69 6e 74 25 3a 4d 4f  56 20 52 32 2c 23 30 3a  |rint%:MOV R2,#0:|
00002070  53 57 49 20 22 4f 53 5f  43 6c 61 69 6d 22 3a 4d  |SWI "OS_Claim":M|
00002080  4f 56 20 50 43 2c 52 31  34 0d 0b cc 4e 2e 72 65  |OV PC,R14...N.re|
00002090  6c 65 61 73 65 25 20 4d  4f 56 20 52 30 2c 23 26  |lease% MOV R0,#&|
000020a0  31 30 3a 41 44 52 20 52  31 2c 73 63 72 69 6e 74  |10:ADR R1,scrint|
000020b0  25 3a 4d 4f 56 20 52 32  2c 23 30 3a 53 57 49 20  |%:MOV R2,#0:SWI |
000020c0  22 4f 53 5f 52 65 6c 65  61 73 65 22 3a 4d 4f 56  |"OS_Release":MOV|
000020d0  20 50 43 2c 52 31 34 0d  0b d6 14 2e 73 63 72 63  | PC,R14.....scrc|
000020e0  6e 74 25 20 20 45 51 55  44 20 30 0d 0b e0 04 0d  |nt%  EQUD 0.....|
000020f0  0b ea 2c 2e 73 63 72 69  6e 74 25 20 3b 20 43 61  |..,.scrint% ; Ca|
00002100  6c 6c 65 64 20 65 76 65  72 79 20 73 63 72 65 65  |lled every scree|
00002110  6e 20 69 6e 74 65 72 72  75 70 74 0d 0b f4 1d 20  |n interrupt.... |
00002120  43 4d 50 20 20 20 52 30  2c 23 34 3a 4d 4f 56 4e  |CMP   R0,#4:MOVN|
00002130  45 20 50 43 2c 52 31 34  0d 0b fe 18 20 53 54 4d  |E PC,R14.... STM|
00002140  46 44 20 52 31 33 21 2c  7b 52 30 2c 52 31 34 7d  |FD R13!,{R0,R14}|
00002150  0d 0c 08 15 20 4c 44 52  20 20 20 52 30 2c 73 63  |.... LDR   R0,sc|
00002160  72 63 6e 74 25 0d 0c 12  13 20 41 44 44 20 20 20  |rcnt%.... ADD   |
00002170  52 30 2c 52 30 2c 23 31  0d 0c 1c 15 20 53 54 52  |R0,R0,#1.... STR|
00002180  20 20 20 52 30 2c 73 63  72 63 6e 74 25 0d 0c 26  |   R0,scrcnt%..&|
00002190  17 20 4c 44 4d 46 44 20  52 31 33 21 2c 7b 52 30  |. LDMFD R13!,{R0|
000021a0  2c 50 43 7d 0d 0c 30 04  0d 0c 3a 05 5d 0d 0c 44  |,PC}..0...:.]..D|
000021b0  05 ed 0d 0c 4e 3a c8 99  20 22 4f 53 5f 46 69 6c  |....N:.. "OS_Fil|
000021c0  65 22 2c 20 26 46 46 2c  20 22 3c 54 65 78 74 41  |e", &FF, "<TextA|
000021d0  77 61 79 24 44 69 72 3e  2e 46 6f 6e 74 44 61 74  |way$Dir>.FontDat|
000021e0  61 22 2c 20 73 69 7a 65  25 2c 20 30 0d 0c 58 1f  |a", size%, 0..X.|
000021f0  3f 73 69 7a 65 25 3d 38  3a f4 20 57 69 64 74 68  |?size%=8:. Width|
00002200  20 6f 66 20 61 20 73 70  61 63 65 0d 0c 62 04 0d  | of a space..b..|
00002210  0c 6c 22 66 69 6c 65 25  3d 8e 28 22 3c 54 65 78  |.l"file%=.("<Tex|
00002220  74 41 77 61 79 24 44 69  72 3e 2e 54 65 78 74 22  |tAway$Dir>.Text"|
00002230  29 0d 0c 76 15 e3 20 6c  25 3d 30 20 b8 20 72 6c  |)..v.. l%=0 . rl|
00002240  69 6e 65 73 2d 31 0d 0c  80 12 20 6c 69 6e 65 24  |ines-1.... line$|
00002250  3d be 23 66 69 6c 65 25  0d 0c 8a 13 20 65 25 3d  |=.#file%.... e%=|
00002260  74 65 78 74 25 2b 6c 25  2a 33 32 0d 0c 94 10 20  |text%+l%*32.... |
00002270  3f 65 25 3d a9 20 6c 69  6e 65 24 0d 0c 9e 0a 20  |?e%=. line$.... |
00002280  65 25 2b 3d 31 0d 0c a8  0a 20 77 77 25 3d 30 0d  |e%+=1.... ww%=0.|
00002290  0c b2 15 20 e3 20 74 25  3d 31 20 b8 20 a9 20 6c  |... . t%=1 . . l|
000022a0  69 6e 65 24 0d 0c bc 1c  20 20 3f 65 25 3d 97 28  |ine$....  ?e%=.(|
000022b0  c1 6c 69 6e 65 24 2c 74  25 2c 31 29 29 2d 33 32  |.line$,t%,1))-32|
000022c0  0d 0c c6 18 20 20 77 77  25 2b 3d 73 69 7a 65 25  |....  ww%+=size%|
000022d0  3f 28 3f 65 25 29 2b 32  0d 0c d0 0b 20 20 65 25  |?(?e%)+2....  e%|
000022e0  2b 3d 31 0d 0c da 06 20  ed 0d 0c e4 0b 20 77 77  |+=1.... ..... ww|
000022f0  25 2d 3d 31 0d 0c ee 16  20 e7 20 a9 20 6c 69 6e  |%-=1.... . . lin|
00002300  65 24 3d 30 20 77 77 25  3d 30 0d 0c f8 15 20 74  |e$=0 ww%=0.... t|
00002310  77 69 64 25 21 28 6c 25  2a 34 29 3d 77 77 25 0d  |wid%!(l%*4)=ww%.|
00002320  0d 02 05 ed 0d 0d 0c 0b  d9 23 66 69 6c 65 25 0d  |.........#file%.|
00002330  0d 16 04 0d 0d 20 1d 21  74 65 78 74 65 6e 64 25  |..... .!textend%|
00002340  3d 33 32 2a 72 6c 69 6e  65 73 2b 31 32 2a 33 32  |=32*rlines+12*32|
00002350  0d 0d 2a 0c 73 25 3d b3  28 2d 31 29 0d 0d 34 14  |..*.s%=.(-1)..4.|
00002360  e3 20 73 25 3d 30 20 b8  20 73 74 61 72 73 2d 31  |. s%=0 . stars-1|
00002370  0d 0d 3e 10 20 78 25 3d  b3 28 33 32 30 29 2d 31  |..>. x%=.(320)-1|
00002380  0d 0d 48 10 20 79 25 3d  b3 28 32 35 36 29 2d 31  |..H. y%=.(256)-1|
00002390  0d 0d 52 1a 20 73 5f 61  25 21 28 73 25 2a 34 29  |..R. s_a%!(s%*4)|
000023a0  3d 78 25 2b 79 25 2a 33  32 30 0d 0d 5c 05 ed 0d  |=x%+y%*320..\...|
000023b0  0d 66 05 e1 0d 0d 70 04  0d 0d 7a 17 dd a4 73 70  |.f....p...z...sp|
000023c0  61 63 65 28 73 70 61 63  65 25 2c 20 70 25 29 0d  |ace(space%, p%).|
000023d0  0d 84 0e 50 25 2b 3d 73  70 61 63 65 25 0d 0d 8e  |...P%+=space%...|
000023e0  07 3d 70 25 0d ff                                 |.=p%..|
000023e6