Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199610.adf » Regulars » StarInfo/Wood/Smudge/!Smudge

StarInfo/Wood/Smudge/!Smudge

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_199610.adf » Regulars
Filename: StarInfo/Wood/Smudge/!Smudge
Read OK:
File size: 1650 bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >>> !Smudge - full screen pixel softening demo
   20REM     By Keith T Wood, 1996
   30REM     Mouse buttons:  LEFT   - draw
   40REM                     MIDDLE - change brush
   50REM                     RIGHT  - pause softening rountine
   60
   70ON ERROR: MODEMODE: REPORT: PRINT " at line " ERL/10: END
   80
   90MODE9: OFF
  100
  110PROCkick_code
  120PROCcheck_mode
  130
  140brush%=0
  150ang%=0
  160change%=0
  170
  180REPEAT
  190 MOUSE x%, y%, b%
  200 IF (b%AND1)=0 THEN CALL soft
  210 IF b%AND4 THEN PROCbrushes
  220 IF b%AND2 THEN IF TIME>change%+20 THEN change%=TIME: brush%=(brush%+1)AND3
  230 IF (b%AND4)=0 THEN GCOL 15: DRAW x%, y%
  240UNTIL FALSE
  250END
  260
  270DEFPROCcheck_mode
  280LOCAL J%, w%, h%, c%
  290SYS "OS_ReadModeVariable", -1, 3 TO ,, c%
  300SYS "OS_ReadModeVariable", -1, 6 TO ,, w%
  310SYS "OS_ReadModeVariable", -1, 12 TO ,, h%
  320!v_count_extra=(((h%+1)>>1)-2)<<16
  330!v_count=((w%>>4)-1)<<16
  340!v_width=w%
  350!h_count_extra=((w%>>5)-2)<<16
  360!h_count=(h%-1)<<16
  370SYS "OS_ReadVduVariables", vdin, v_screen
  380SYS "OS_ReadVduVariables", vdin, h_screen
  390FOR J%=0 TO 15
  400 COLOUR J%, 17*J%, 17*J%, 17*J%
  410NEXT
  420ENDPROC
  430
  440DEFPROCbrushes
  450CASE brush% OF
  460 WHEN 0: PROCsmoke
  470 WHEN 1: GCOL15: CIRCLEFILL x%, y%, 60
  480 WHEN 2: GCOL15: CIRCLE x%, y%, 100
  490 WHEN 3: PROCspiral
  500ENDCASE
  510MOVE x%, y%
  520ENDPROC
  530
  540DEFPROCsmoke
  550LOCAL J%, nx%, ny%, g%
  560FOR J%=0 TO 49
  570 nx%=x%+RND(100)-50: ny%=y%+RND(100)-50
  580 g%=((RND(6)+1)<<2)-1
  590 GCOLg%
  600 POINT nx%, ny%
  610 GCOLg%-RND(3)-1
  620 POINT nx%, ny%+4: POINT nx%, ny%-4: POINT nx%-4, ny%: POINT nx%+4, ny%
  630NEXT
  640ENDPROC
  650
  660DEFPROCspiral
  670LOCAL J%, inc
  680inc=2*PI/31
  690FOR J%=0 TO 31
  700 GCOL J%AND15
  710 MOVE x%, y%
  720 DRAW x%+200*SIN(inc*(J%+ang%)+ang%/2), y%+200*COS(inc*(J%+ang%)+ang%/2)
  730NEXT
  740ang%=(ang%+1)AND31
  750ENDPROC
  760
  770DEFPROCkick_code
  780 LOCAL pass%
  790 DIM code% 40000
  800 FOR pass%=0 TO 2 STEP 2
  810  P%=code%
  820  PROCverticle_code
  830 NEXT
  840ENDPROC
  850
  860DEFPROCverticle_code
  870
  880Cnt = 9: Mask=10
  890Wide=11: End =11
  900Scrn=12: Tmp1=13: Tmp2=14
  910
  920[OPT    pass%
  930 
  940 .vdin           EQUD 148:       EQUD -1
  950 .h_stack        EQUD 0:         EQUD 0
  960 .h_count        EQUD 0
  970 .h_mask         EQUD &0F0F0F0F
  980 .h_screen       EQUD 0
  990 .h_count_extra  EQUD 0
 1000
 1010 .out
 1020 ADR    r0, h_stack
 1030 LDMIA  r0, {r13, r14}
 1040 MOV    PC, r14
 1050
 1060 .soft
 1070 ADR    r0, h_stack
 1080 STMIA  r0, {r13, r14}
 1090 ADR    r0, h_count
 1100 LDMIA  r0, {Cnt, Mask, Scrn}
 1110 
 1120 .h_count_out
 1130 LDR    Tmp1, h_count_extra
 1140 ORR    Cnt, Tmp1, Cnt, LSR #16
 1150 MOV    End, #0
 1160 
 1170 .h_count_in
 1180 LDMIA  Scrn, {r0-r8}
 1190 FNhorizontal_average
 1200 STMIA  (Scrn)!, {r0-r7}
 1210 SUBS   Cnt, Cnt, #&10000
 1220 BPL    h_count_in
 1230 LDMIA  Scrn, {r0-r7}
 1240 MOV    r8, #0
 1250 FNhorizontal_average
 1260 STMIA  (Scrn)!, {r0-r7}
 1270 ADD    Cnt, Cnt, #&10000
 1280 MOV    Cnt, Cnt, LSL #16
 1290 SUBS   Cnt, Cnt, #&10000
 1300 BPL    h_count_out
 1310 ADR    r0, v_count
 1320 LDMIA  r0, {Cnt, Wide}
 1330 
 1340 .down_loop_out
 1350 ADR    Tmp1, v_screen
 1360 LDMIA  Tmp1, {Scrn, Tmp1}
 1370 ADD    Scrn, Scrn, Cnt, LSR #16-4
 1380 ORR    Cnt, Tmp1, Cnt, LSR #16
 1390 LDMIA  Scrn, {r0-r3}
 1400 ADD    Scrn, Scrn, Wide
 1410 LDMIA  Scrn, {r4-r7}
 1420 
 1430 .down_loop_in
 1440 FNverticle_average( 0, 4 )
 1450 STMIA  Scrn, {r0-r3}
 1460 ADD    Scrn, Scrn, Wide
 1470 LDMIA  Scrn, {r0-r3}
 1480 FNverticle_average( 4, 0 )
 1490 STMIA  Scrn, {r4-r7}
 1500 ADD    Scrn, Scrn, Wide
 1510 LDMIA  Scrn, {r4-r7}
 1520 SUBS   Cnt, Cnt, #&10000
 1530 BPL    down_loop_in
 1540 FNverticle_average( 0, 4 )
 1550 STMIA  Scrn, {r0-r3}
 1560 ADD    Cnt, Cnt, #&10000
 1570 MOV    Cnt, Cnt, LSL #16
 1580 SUBS   Cnt, Cnt, #&10000
 1590 BPL    down_loop_out
 1600 B      up
 1610 
 1620 .v_count        EQUD 0
 1630 .v_width        EQUD 0
 1640 .v_screen       EQUD 0
 1650 .v_count_extra  EQUD 0
 1660 
 1670 .up
 1680 LDR    Cnt, v_count
 1690 
 1700 .up_loop_out
 1710 ADR    Tmp1, v_screen
 1720 LDMIA  Tmp1, {Scrn, Tmp1}
 1730 ADD    Scrn, Scrn, Cnt, LSR #16-4
 1740 ORR    Cnt, Tmp1, Cnt, LSR #16
 1750 FNzero_macro( 0, 3 )
 1760 ADD    Scrn, Scrn, Wide
 1770 LDMIA  Scrn, {r4-r7}
 1780 
 1790 .up_loop_in
 1800 FNverticle_average( 0, 4 )
 1810 SUB    Scrn, Scrn, Wide
 1820 STMIA  Scrn, {r0-r3}
 1830 ADD    Scrn, Scrn, Wide, LSL #1
 1840 LDMIA  Scrn, {r0-r3}
 1850 FNverticle_average( 4, 0 )
 1860 SUB    Scrn, Scrn, Wide
 1870 STMIA  Scrn, {r4-r7}
 1880 ADD    Scrn, Scrn, Wide, LSL #1
 1890 LDMIA  Scrn, {r4-r7}
 1900 SUBS   Cnt, Cnt, #&10000
 1910 BPL    up_loop_in
 1920 FNverticle_average( 0, 4 )
 1930 SUB    Scrn, Scrn, Wide
 1940 STMIA  Scrn, {r0-r3}
 1950 FNzero_macro( 4, 7 )
 1960 ADD    Scrn, Scrn, Wide
 1970 STMIA  Scrn, {r4-r7}
 1980 ADD    Cnt, Cnt, #&10000
 1990 MOV    Cnt, Cnt, LSL #16
 2000 SUBS   Cnt, Cnt, #&10000
 2010 BPL    up_loop_out
 2020 B      out
 2030]
 2040ENDPROC
 2050
 2060DEFFNzero_macro( S, F )
 2070LOCAL Reg
 2080FOR Reg=S TO F
 2090[OPT    pass%
 2100 MOV    Reg, #0
 2110]
 2120NEXT
 2130=""
 2140
 2150DEFFNverticle_average( A, B )
 2160LOCAL I
 2170FOR I=0 TO 3
 2180[OPT    pass%
 2190 AND    Tmp1, Mask, (A+I)
 2200 AND    Tmp2, Mask, (B+I)
 2210 ADD    Tmp1, Tmp1, Tmp2
 2220 AND    Tmp1, Mask, Tmp1, LSR #1
 2230 AND    (A+I), Mask, (A+I), LSR #4
 2240 AND    Tmp2, Mask, (B+I), LSR #4
 2250 ADD    (A+I), (A+I), Tmp2
 2260 AND    (A+I), Mask, (A+I), LSR #1
 2270 ORR    (A+I), Tmp1, (A+I), LSL #4
 2280]
 2290NEXT
 2300=""
 2310
 2320DEFFNhorizontal_average
 2330LOCAL I
 2340FOR Reg=0 TO 7
 2350[OPT    pass%
 2360 AND    Tmp1, Mask, Mask, LSR #3
 2370 BIC    Reg, Reg, Tmp1
 2380 BIC    Reg, Reg, Tmp1, LSL #4
 2390 BIC    End, End, Tmp1, LSL #4
 2400 BIC    (Reg+1), (Reg+1), Tmp1
 2410 AND    Tmp1, Mask, Reg
 2420 AND    Tmp2, Mask, Reg, LSR #4
 2430 ADD    Tmp1, Tmp2, Tmp1, LSL #1
 2440 AND    Tmp2, Mask, Reg, LSL #4
 2450 ADD    Tmp1, Tmp1, Tmp2
 2460 AND    Tmp2, Mask, End, LSR #28
 2470 ADD    Tmp1, Tmp1, Tmp2
 2480 MOV    End, Reg
 2490 AND    Reg, Mask, Tmp1, LSR #2
 2500 AND    Tmp1, Mask, End, LSR #4
 2510 AND    Tmp2, Mask, End
 2520 ADD    Tmp1, Tmp2, Tmp1, LSL #1
 2530 AND    Tmp2, Mask, End, LSR #8
 2540 ADD    Tmp1, Tmp1, Tmp2
 2550 AND    Tmp2, Mask, (Reg+1)
 2560 ADD    Tmp1, Tmp1, Tmp2, LSL #24
 2570 AND    Tmp1, Mask, Tmp1, LSR #2
 2580 ORR    Reg, Reg, Tmp1, LSL #4
 2590]
 2600NEXT
 2610=""

4� >>> !Smudge - full screen pixel softening demo
�     By Keith T Wood, 1996
'�     Mouse buttons:  LEFT   - draw
(/�                     MIDDLE - change brush
2;�                     RIGHT  - pause softening rountine
<
F%� �: ��: �: � " at line " �/10: �
P
Z	�9: �
d
n�kick_code
x�check_mode
�
�brush%=0
�
ang%=0
�
change%=0
�
��
� ȗ x%, y%, b%
� � (b%�1)=0 � � soft
� � b%�4 � �brushes
�= � b%�2 � � �>change%+20 � change%=�: brush%=(brush%+1)�3
�  � (b%�4)=0 � � 15: � x%, y%
�� �
��

��check_mode
� J%, w%, h%, c%
"+ș "OS_ReadModeVariable", -1, 3 � ,, c%
,+ș "OS_ReadModeVariable", -1, 6 � ,, w%
6,ș "OS_ReadModeVariable", -1, 12 � ,, h%
@&!v_count_extra=(((h%+1)>>1)-2)<<16
J!v_count=((w%>>4)-1)<<16
T!v_width=w%
^"!h_count_extra=((w%>>5)-2)<<16
h!h_count=(h%-1)<<16
r,ș "OS_ReadVduVariables", vdin, v_screen
|,ș "OS_ReadVduVariables", vdin, h_screen
�� J%=0 � 15
� � J%, 17*J%, 17*J%, 17*J%
��
��
�
�
��brushes
�Ȏ brush% �
� � 0: �smoke
� � 1: �15: ȏȐ x%, y%, 60
� � 2: �15: ȏ x%, y%, 100
� � 3: �spiral
��
�� x%, y%
�

��smoke
&� J%, nx%, ny%, g%
0� J%=0 � 49
:' nx%=x%+�(100)-50: ny%=y%+�(100)-50
D g%=((�(6)+1)<<2)-1
N �g%
X Ȓ nx%, ny%
b �g%-�(3)-1
l? Ȓ nx%, ny%+4: Ȓ nx%, ny%-4: Ȓ nx%-4, ny%: Ȓ nx%+4, ny%
v�
��
�
���spiral
�
� J%, inc
�inc=2*�/31
�� J%=0 � 31
� � J%�15
�
 � x%, y%
�E � x%+200*�(inc*(J%+ang%)+ang%/2), y%+200*�(inc*(J%+ang%)+ang%/2)
��
�ang%=(ang%+1)�31
��
�
��kick_code
 � pass%
 � code% 40000
  � pass%=0 � 2 � 2
*  P%=code%
4  �verticle_code
> �
H�
R
\��verticle_code
f
pCnt = 9: Mask=10
zWide=11: End =11
�Scrn=12: Tmp1=13: Tmp2=14
�
�[OPT    pass%
� 
�, .vdin           EQUD 148:       EQUD -1
�+ .h_stack        EQUD 0:         EQUD 0
� .h_count        EQUD 0
�# .h_mask         EQUD &0F0F0F0F
� .h_screen       EQUD 0
� .h_count_extra  EQUD 0
�
�	 .out
� ADR    r0, h_stack
 LDMIA  r0, {r13, r14}
 MOV    PC, r14

$
 .soft
. ADR    r0, h_stack
8 STMIA  r0, {r13, r14}
B ADR    r0, h_count
L! LDMIA  r0, {Cnt, Mask, Scrn}
V 
` .h_count_out
j LDR    Tmp1, h_count_extra
t" �R    Cnt, Tmp1, Cnt, LSR #16
~ MOV    End, #0
� 
� .h_count_in
� LDMIA  Scrn, {r0-r8}
� �horizontal_average
� STMIA  (Scrn)!, {r0-r7}
� SUBS   Cnt, Cnt, #&10000
� BPL    h_count_in
� LDMIA  Scrn, {r0-r7}
� MOV    r8, #0
� �horizontal_average
� STMIA  (Scrn)!, {r0-r7}
� ADD    Cnt, Cnt, #&10000
 MOV    Cnt, Cnt, LSL #16

 SUBS   Cnt, Cnt, #&10000
 BPL    h_count_out
 ADR    r0, v_count
( LDMIA  r0, {Cnt, Wide}
2 
< .down_loop_out
F ADR    Tmp1, v_screen
P LDMIA  Tmp1, {Scrn, Tmp1}
Z& ADD    Scrn, Scrn, Cnt, LSR #16-4
d" �R    Cnt, Tmp1, Cnt, LSR #16
n LDMIA  Scrn, {r0-r3}
x ADD    Scrn, Scrn, Wide
� LDMIA  Scrn, {r4-r7}
� 
� .down_loop_in
� �verticle_average( 0, 4 )
� STMIA  Scrn, {r0-r3}
� ADD    Scrn, Scrn, Wide
� LDMIA  Scrn, {r0-r3}
� �verticle_average( 4, 0 )
� STMIA  Scrn, {r4-r7}
� ADD    Scrn, Scrn, Wide
� LDMIA  Scrn, {r4-r7}
� SUBS   Cnt, Cnt, #&10000
� BPL    down_loop_in
 �verticle_average( 0, 4 )
 STMIA  Scrn, {r0-r3}
 ADD    Cnt, Cnt, #&10000
" MOV    Cnt, Cnt, LSL #16
, SUBS   Cnt, Cnt, #&10000
6 BPL    down_loop_out
@ B      up
J 
T .v_count        EQUD 0
^ .v_width        EQUD 0
h .v_screen       EQUD 0
r .v_count_extra  EQUD 0
| 
� .up
� LDR    Cnt, v_count
� 
� .up_loop_out
� ADR    Tmp1, v_screen
� LDMIA  Tmp1, {Scrn, Tmp1}
�& ADD    Scrn, Scrn, Cnt, LSR #16-4
�" �R    Cnt, Tmp1, Cnt, LSR #16
� �zero_macro( 0, 3 )
� ADD    Scrn, Scrn, Wide
� LDMIA  Scrn, {r4-r7}
� 
� .up_loop_in
 �verticle_average( 0, 4 )
 SUB    Scrn, Scrn, Wide
 STMIA  Scrn, {r0-r3}
&$ ADD    Scrn, Scrn, Wide, LSL #1
0 LDMIA  Scrn, {r0-r3}
: �verticle_average( 4, 0 )
D SUB    Scrn, Scrn, Wide
N STMIA  Scrn, {r4-r7}
X$ ADD    Scrn, Scrn, Wide, LSL #1
b LDMIA  Scrn, {r4-r7}
l SUBS   Cnt, Cnt, #&10000
v BPL    up_loop_in
� �verticle_average( 0, 4 )
� SUB    Scrn, Scrn, Wide
� STMIA  Scrn, {r0-r3}
� �zero_macro( 4, 7 )
� ADD    Scrn, Scrn, Wide
� STMIA  Scrn, {r4-r7}
� ADD    Cnt, Cnt, #&10000
� MOV    Cnt, Cnt, LSL #16
� SUBS   Cnt, Cnt, #&10000
� BPL    up_loop_out
� B      out
�]
��

ݤzero_macro( S, F )
	� Reg
 � Reg=S � F
*[OPT    pass%
4 MOV    Reg, #0
>]
H�
R=""
\
fݤverticle_average( A, B )
p� I
z
� I=0 � 3
�[OPT    pass%
� �    Tmp1, Mask, (A+I)
� �    Tmp2, Mask, (B+I)
� ADD    Tmp1, Tmp1, Tmp2
�" �    Tmp1, Mask, Tmp1, LSR #1
�$ �    (A+I), Mask, (A+I), LSR #4
�# �    Tmp2, Mask, (B+I), LSR #4
� ADD    (A+I), (A+I), Tmp2
�$ �    (A+I), Mask, (A+I), LSR #1
�% �R    (A+I), Tmp1, (A+I), LSL #4
�]
��
�=""
	
	ݤhorizontal_average
	� I
	$� Reg=0 � 7
	.[OPT    pass%
	8" �    Tmp1, Mask, Mask, LSR #3
	B BIC    Reg, Reg, Tmp1
	L" BIC    Reg, Reg, Tmp1, LSL #4
	V" BIC    End, End, Tmp1, LSL #4
	`" BIC    (Reg+1), (Reg+1), Tmp1
	j �    Tmp1, Mask, Reg
	t! �    Tmp2, Mask, Reg, LSR #4
	~$ ADD    Tmp1, Tmp2, Tmp1, LSL #1
	�! �    Tmp2, Mask, Reg, LSL #4
	� ADD    Tmp1, Tmp1, Tmp2
	�" �    Tmp2, Mask, End, LSR #28
	� ADD    Tmp1, Tmp1, Tmp2
	� MOV    End, Reg
	�! �    Reg, Mask, Tmp1, LSR #2
	�! �    Tmp1, Mask, End, LSR #4
	� �    Tmp2, Mask, End
	�$ ADD    Tmp1, Tmp2, Tmp1, LSL #1
	�! �    Tmp2, Mask, End, LSR #8
	� ADD    Tmp1, Tmp1, Tmp2
	� �    Tmp2, Mask, (Reg+1)
% ADD    Tmp1, Tmp1, Tmp2, LSL #24

" �    Tmp1, Mask, Tmp1, LSR #2
! �R    Reg, Reg, Tmp1, LSL #4
]
(�
2=""
�
00000000  0d 00 0a 34 f4 20 3e 3e  3e 20 21 53 6d 75 64 67  |...4. >>> !Smudg|
00000010  65 20 2d 20 66 75 6c 6c  20 73 63 72 65 65 6e 20  |e - full screen |
00000020  70 69 78 65 6c 20 73 6f  66 74 65 6e 69 6e 67 20  |pixel softening |
00000030  64 65 6d 6f 0d 00 14 1f  f4 20 20 20 20 20 42 79  |demo.....     By|
00000040  20 4b 65 69 74 68 20 54  20 57 6f 6f 64 2c 20 31  | Keith T Wood, 1|
00000050  39 39 36 0d 00 1e 27 f4  20 20 20 20 20 4d 6f 75  |996...'.     Mou|
00000060  73 65 20 62 75 74 74 6f  6e 73 3a 20 20 4c 45 46  |se buttons:  LEF|
00000070  54 20 20 20 2d 20 64 72  61 77 0d 00 28 2f f4 20  |T   - draw..(/. |
00000080  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000090  20 20 20 20 4d 49 44 44  4c 45 20 2d 20 63 68 61  |    MIDDLE - cha|
000000a0  6e 67 65 20 62 72 75 73  68 0d 00 32 3b f4 20 20  |nge brush..2;.  |
000000b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000000c0  20 20 20 52 49 47 48 54  20 20 2d 20 70 61 75 73  |   RIGHT  - paus|
000000d0  65 20 73 6f 66 74 65 6e  69 6e 67 20 72 6f 75 6e  |e softening roun|
000000e0  74 69 6e 65 0d 00 3c 04  0d 00 46 25 ee 20 85 3a  |tine..<...F%. .:|
000000f0  20 eb eb 3a 20 f6 3a 20  f1 20 22 20 61 74 20 6c  | ..: .: . " at l|
00000100  69 6e 65 20 22 20 9e 2f  31 30 3a 20 e0 0d 00 50  |ine " ./10: ...P|
00000110  04 0d 00 5a 09 eb 39 3a  20 87 0d 00 64 04 0d 00  |...Z..9: ...d...|
00000120  6e 0e f2 6b 69 63 6b 5f  63 6f 64 65 0d 00 78 0f  |n..kick_code..x.|
00000130  f2 63 68 65 63 6b 5f 6d  6f 64 65 0d 00 82 04 0d  |.check_mode.....|
00000140  00 8c 0c 62 72 75 73 68  25 3d 30 0d 00 96 0a 61  |...brush%=0....a|
00000150  6e 67 25 3d 30 0d 00 a0  0d 63 68 61 6e 67 65 25  |ng%=0....change%|
00000160  3d 30 0d 00 aa 04 0d 00  b4 05 f5 0d 00 be 12 20  |=0............. |
00000170  c8 97 20 78 25 2c 20 79  25 2c 20 62 25 0d 00 c8  |.. x%, y%, b%...|
00000180  18 20 e7 20 28 62 25 80  31 29 3d 30 20 8c 20 d6  |. . (b%.1)=0 . .|
00000190  20 73 6f 66 74 0d 00 d2  16 20 e7 20 62 25 80 34  | soft.... . b%.4|
000001a0  20 8c 20 f2 62 72 75 73  68 65 73 0d 00 dc 3d 20  | . .brushes...= |
000001b0  e7 20 62 25 80 32 20 8c  20 e7 20 91 3e 63 68 61  |. b%.2 . . .>cha|
000001c0  6e 67 65 25 2b 32 30 20  8c 20 63 68 61 6e 67 65  |nge%+20 . change|
000001d0  25 3d 91 3a 20 62 72 75  73 68 25 3d 28 62 72 75  |%=.: brush%=(bru|
000001e0  73 68 25 2b 31 29 80 33  0d 00 e6 20 20 e7 20 28  |sh%+1).3...  . (|
000001f0  62 25 80 34 29 3d 30 20  8c 20 e6 20 31 35 3a 20  |b%.4)=0 . . 15: |
00000200  df 20 78 25 2c 20 79 25  0d 00 f0 07 fd 20 a3 0d  |. x%, y%..... ..|
00000210  00 fa 05 e0 0d 01 04 04  0d 01 0e 10 dd f2 63 68  |..............ch|
00000220  65 63 6b 5f 6d 6f 64 65  0d 01 18 14 ea 20 4a 25  |eck_mode..... J%|
00000230  2c 20 77 25 2c 20 68 25  2c 20 63 25 0d 01 22 2b  |, w%, h%, c%.."+|
00000240  c8 99 20 22 4f 53 5f 52  65 61 64 4d 6f 64 65 56  |.. "OS_ReadModeV|
00000250  61 72 69 61 62 6c 65 22  2c 20 2d 31 2c 20 33 20  |ariable", -1, 3 |
00000260  b8 20 2c 2c 20 63 25 0d  01 2c 2b c8 99 20 22 4f  |. ,, c%..,+.. "O|
00000270  53 5f 52 65 61 64 4d 6f  64 65 56 61 72 69 61 62  |S_ReadModeVariab|
00000280  6c 65 22 2c 20 2d 31 2c  20 36 20 b8 20 2c 2c 20  |le", -1, 6 . ,, |
00000290  77 25 0d 01 36 2c c8 99  20 22 4f 53 5f 52 65 61  |w%..6,.. "OS_Rea|
000002a0  64 4d 6f 64 65 56 61 72  69 61 62 6c 65 22 2c 20  |dModeVariable", |
000002b0  2d 31 2c 20 31 32 20 b8  20 2c 2c 20 68 25 0d 01  |-1, 12 . ,, h%..|
000002c0  40 26 21 76 5f 63 6f 75  6e 74 5f 65 78 74 72 61  |@&!v_count_extra|
000002d0  3d 28 28 28 68 25 2b 31  29 3e 3e 31 29 2d 32 29  |=(((h%+1)>>1)-2)|
000002e0  3c 3c 31 36 0d 01 4a 1c  21 76 5f 63 6f 75 6e 74  |<<16..J.!v_count|
000002f0  3d 28 28 77 25 3e 3e 34  29 2d 31 29 3c 3c 31 36  |=((w%>>4)-1)<<16|
00000300  0d 01 54 0f 21 76 5f 77  69 64 74 68 3d 77 25 0d  |..T.!v_width=w%.|
00000310  01 5e 22 21 68 5f 63 6f  75 6e 74 5f 65 78 74 72  |.^"!h_count_extr|
00000320  61 3d 28 28 77 25 3e 3e  35 29 2d 32 29 3c 3c 31  |a=((w%>>5)-2)<<1|
00000330  36 0d 01 68 17 21 68 5f  63 6f 75 6e 74 3d 28 68  |6..h.!h_count=(h|
00000340  25 2d 31 29 3c 3c 31 36  0d 01 72 2c c8 99 20 22  |%-1)<<16..r,.. "|
00000350  4f 53 5f 52 65 61 64 56  64 75 56 61 72 69 61 62  |OS_ReadVduVariab|
00000360  6c 65 73 22 2c 20 76 64  69 6e 2c 20 76 5f 73 63  |les", vdin, v_sc|
00000370  72 65 65 6e 0d 01 7c 2c  c8 99 20 22 4f 53 5f 52  |reen..|,.. "OS_R|
00000380  65 61 64 56 64 75 56 61  72 69 61 62 6c 65 73 22  |eadVduVariables"|
00000390  2c 20 76 64 69 6e 2c 20  68 5f 73 63 72 65 65 6e  |, vdin, h_screen|
000003a0  0d 01 86 0f e3 20 4a 25  3d 30 20 b8 20 31 35 0d  |..... J%=0 . 15.|
000003b0  01 90 1e 20 fb 20 4a 25  2c 20 31 37 2a 4a 25 2c  |... . J%, 17*J%,|
000003c0  20 31 37 2a 4a 25 2c 20  31 37 2a 4a 25 0d 01 9a  | 17*J%, 17*J%...|
000003d0  05 ed 0d 01 a4 05 e1 0d  01 ae 04 0d 01 b8 0d dd  |................|
000003e0  f2 62 72 75 73 68 65 73  0d 01 c2 0f c8 8e 20 62  |.brushes...... b|
000003f0  72 75 73 68 25 20 ca 0d  01 cc 10 20 c9 20 30 3a  |rush% ..... . 0:|
00000400  20 f2 73 6d 6f 6b 65 0d  01 d6 1e 20 c9 20 31 3a  | .smoke.... . 1:|
00000410  20 e6 31 35 3a 20 c8 8f  c8 90 20 78 25 2c 20 79  | .15: .... x%, y|
00000420  25 2c 20 36 30 0d 01 e0  1d 20 c9 20 32 3a 20 e6  |%, 60.... . 2: .|
00000430  31 35 3a 20 c8 8f 20 78  25 2c 20 79 25 2c 20 31  |15: .. x%, y%, 1|
00000440  30 30 0d 01 ea 11 20 c9  20 33 3a 20 f2 73 70 69  |00.... . 3: .spi|
00000450  72 61 6c 0d 01 f4 05 cb  0d 01 fe 0c ec 20 78 25  |ral.......... x%|
00000460  2c 20 79 25 0d 02 08 05  e1 0d 02 12 04 0d 02 1c  |, y%............|
00000470  0b dd f2 73 6d 6f 6b 65  0d 02 26 16 ea 20 4a 25  |...smoke..&.. J%|
00000480  2c 20 6e 78 25 2c 20 6e  79 25 2c 20 67 25 0d 02  |, nx%, ny%, g%..|
00000490  30 0f e3 20 4a 25 3d 30  20 b8 20 34 39 0d 02 3a  |0.. J%=0 . 49..:|
000004a0  27 20 6e 78 25 3d 78 25  2b b3 28 31 30 30 29 2d  |' nx%=x%+.(100)-|
000004b0  35 30 3a 20 6e 79 25 3d  79 25 2b b3 28 31 30 30  |50: ny%=y%+.(100|
000004c0  29 2d 35 30 0d 02 44 17  20 67 25 3d 28 28 b3 28  |)-50..D. g%=((.(|
000004d0  36 29 2b 31 29 3c 3c 32  29 2d 31 0d 02 4e 08 20  |6)+1)<<2)-1..N. |
000004e0  e6 67 25 0d 02 58 10 20  c8 92 20 6e 78 25 2c 20  |.g%..X. .. nx%, |
000004f0  6e 79 25 0d 02 62 0f 20  e6 67 25 2d b3 28 33 29  |ny%..b. .g%-.(3)|
00000500  2d 31 0d 02 6c 3f 20 c8  92 20 6e 78 25 2c 20 6e  |-1..l? .. nx%, n|
00000510  79 25 2b 34 3a 20 c8 92  20 6e 78 25 2c 20 6e 79  |y%+4: .. nx%, ny|
00000520  25 2d 34 3a 20 c8 92 20  6e 78 25 2d 34 2c 20 6e  |%-4: .. nx%-4, n|
00000530  79 25 3a 20 c8 92 20 6e  78 25 2b 34 2c 20 6e 79  |y%: .. nx%+4, ny|
00000540  25 0d 02 76 05 ed 0d 02  80 05 e1 0d 02 8a 04 0d  |%..v............|
00000550  02 94 0c dd f2 73 70 69  72 61 6c 0d 02 9e 0d ea  |.....spiral.....|
00000560  20 4a 25 2c 20 69 6e 63  0d 02 a8 0e 69 6e 63 3d  | J%, inc....inc=|
00000570  32 2a af 2f 33 31 0d 02  b2 0f e3 20 4a 25 3d 30  |2*./31..... J%=0|
00000580  20 b8 20 33 31 0d 02 bc  0c 20 e6 20 4a 25 80 31  | . 31.... . J%.1|
00000590  35 0d 02 c6 0d 20 ec 20  78 25 2c 20 79 25 0d 02  |5.... . x%, y%..|
000005a0  d0 45 20 df 20 78 25 2b  32 30 30 2a b5 28 69 6e  |.E . x%+200*.(in|
000005b0  63 2a 28 4a 25 2b 61 6e  67 25 29 2b 61 6e 67 25  |c*(J%+ang%)+ang%|
000005c0  2f 32 29 2c 20 79 25 2b  32 30 30 2a 9b 28 69 6e  |/2), y%+200*.(in|
000005d0  63 2a 28 4a 25 2b 61 6e  67 25 29 2b 61 6e 67 25  |c*(J%+ang%)+ang%|
000005e0  2f 32 29 0d 02 da 05 ed  0d 02 e4 14 61 6e 67 25  |/2).........ang%|
000005f0  3d 28 61 6e 67 25 2b 31  29 80 33 31 0d 02 ee 05  |=(ang%+1).31....|
00000600  e1 0d 02 f8 04 0d 03 02  0f dd f2 6b 69 63 6b 5f  |...........kick_|
00000610  63 6f 64 65 0d 03 0c 0c  20 ea 20 70 61 73 73 25  |code.... . pass%|
00000620  0d 03 16 12 20 de 20 63  6f 64 65 25 20 34 30 30  |.... . code% 400|
00000630  30 30 0d 03 20 16 20 e3  20 70 61 73 73 25 3d 30  |00.. . . pass%=0|
00000640  20 b8 20 32 20 88 20 32  0d 03 2a 0e 20 20 50 25  | . 2 . 2..*.  P%|
00000650  3d 63 6f 64 65 25 0d 03  34 14 20 20 f2 76 65 72  |=code%..4.  .ver|
00000660  74 69 63 6c 65 5f 63 6f  64 65 0d 03 3e 06 20 ed  |ticle_code..>. .|
00000670  0d 03 48 05 e1 0d 03 52  04 0d 03 5c 13 dd f2 76  |..H....R...\...v|
00000680  65 72 74 69 63 6c 65 5f  63 6f 64 65 0d 03 66 04  |erticle_code..f.|
00000690  0d 03 70 14 43 6e 74 20  3d 20 39 3a 20 4d 61 73  |..p.Cnt = 9: Mas|
000006a0  6b 3d 31 30 0d 03 7a 14  57 69 64 65 3d 31 31 3a  |k=10..z.Wide=11:|
000006b0  20 45 6e 64 20 3d 31 31  0d 03 84 1d 53 63 72 6e  | End =11....Scrn|
000006c0  3d 31 32 3a 20 54 6d 70  31 3d 31 33 3a 20 54 6d  |=12: Tmp1=13: Tm|
000006d0  70 32 3d 31 34 0d 03 8e  04 0d 03 98 11 5b 4f 50  |p2=14........[OP|
000006e0  54 20 20 20 20 70 61 73  73 25 0d 03 a2 05 20 0d  |T    pass%.... .|
000006f0  03 ac 2c 20 2e 76 64 69  6e 20 20 20 20 20 20 20  |.., .vdin       |
00000700  20 20 20 20 45 51 55 44  20 31 34 38 3a 20 20 20  |    EQUD 148:   |
00000710  20 20 20 20 45 51 55 44  20 2d 31 0d 03 b6 2b 20  |    EQUD -1...+ |
00000720  2e 68 5f 73 74 61 63 6b  20 20 20 20 20 20 20 20  |.h_stack        |
00000730  45 51 55 44 20 30 3a 20  20 20 20 20 20 20 20 20  |EQUD 0:         |
00000740  45 51 55 44 20 30 0d 03  c0 1b 20 2e 68 5f 63 6f  |EQUD 0.... .h_co|
00000750  75 6e 74 20 20 20 20 20  20 20 20 45 51 55 44 20  |unt        EQUD |
00000760  30 0d 03 ca 23 20 2e 68  5f 6d 61 73 6b 20 20 20  |0...# .h_mask   |
00000770  20 20 20 20 20 20 45 51  55 44 20 26 30 46 30 46  |      EQUD &0F0F|
00000780  30 46 30 46 0d 03 d4 1b  20 2e 68 5f 73 63 72 65  |0F0F.... .h_scre|
00000790  65 6e 20 20 20 20 20 20  20 45 51 55 44 20 30 0d  |en       EQUD 0.|
000007a0  03 de 1b 20 2e 68 5f 63  6f 75 6e 74 5f 65 78 74  |... .h_count_ext|
000007b0  72 61 20 20 45 51 55 44  20 30 0d 03 e8 04 0d 03  |ra  EQUD 0......|
000007c0  f2 09 20 2e 6f 75 74 0d  03 fc 17 20 41 44 52 20  |.. .out.... ADR |
000007d0  20 20 20 72 30 2c 20 68  5f 73 74 61 63 6b 0d 04  |   r0, h_stack..|
000007e0  06 1a 20 4c 44 4d 49 41  20 20 72 30 2c 20 7b 72  |.. LDMIA  r0, {r|
000007f0  31 33 2c 20 72 31 34 7d  0d 04 10 13 20 4d 4f 56  |13, r14}.... MOV|
00000800  20 20 20 20 50 43 2c 20  72 31 34 0d 04 1a 04 0d  |    PC, r14.....|
00000810  04 24 0a 20 2e 73 6f 66  74 0d 04 2e 17 20 41 44  |.$. .soft.... AD|
00000820  52 20 20 20 20 72 30 2c  20 68 5f 73 74 61 63 6b  |R    r0, h_stack|
00000830  0d 04 38 1a 20 53 54 4d  49 41 20 20 72 30 2c 20  |..8. STMIA  r0, |
00000840  7b 72 31 33 2c 20 72 31  34 7d 0d 04 42 17 20 41  |{r13, r14}..B. A|
00000850  44 52 20 20 20 20 72 30  2c 20 68 5f 63 6f 75 6e  |DR    r0, h_coun|
00000860  74 0d 04 4c 21 20 4c 44  4d 49 41 20 20 72 30 2c  |t..L! LDMIA  r0,|
00000870  20 7b 43 6e 74 2c 20 4d  61 73 6b 2c 20 53 63 72  | {Cnt, Mask, Scr|
00000880  6e 7d 0d 04 56 05 20 0d  04 60 11 20 2e 68 5f 63  |n}..V. ..`. .h_c|
00000890  6f 75 6e 74 5f 6f 75 74  0d 04 6a 1f 20 4c 44 52  |ount_out..j. LDR|
000008a0  20 20 20 20 54 6d 70 31  2c 20 68 5f 63 6f 75 6e  |    Tmp1, h_coun|
000008b0  74 5f 65 78 74 72 61 0d  04 74 22 20 84 52 20 20  |t_extra..t" .R  |
000008c0  20 20 43 6e 74 2c 20 54  6d 70 31 2c 20 43 6e 74  |  Cnt, Tmp1, Cnt|
000008d0  2c 20 4c 53 52 20 23 31  36 0d 04 7e 13 20 4d 4f  |, LSR #16..~. MO|
000008e0  56 20 20 20 20 45 6e 64  2c 20 23 30 0d 04 88 05  |V    End, #0....|
000008f0  20 0d 04 92 10 20 2e 68  5f 63 6f 75 6e 74 5f 69  | .... .h_count_i|
00000900  6e 0d 04 9c 19 20 4c 44  4d 49 41 20 20 53 63 72  |n.... LDMIA  Scr|
00000910  6e 2c 20 7b 72 30 2d 72  38 7d 0d 04 a6 18 20 a4  |n, {r0-r8}.... .|
00000920  68 6f 72 69 7a 6f 6e 74  61 6c 5f 61 76 65 72 61  |horizontal_avera|
00000930  67 65 0d 04 b0 1c 20 53  54 4d 49 41 20 20 28 53  |ge.... STMIA  (S|
00000940  63 72 6e 29 21 2c 20 7b  72 30 2d 72 37 7d 0d 04  |crn)!, {r0-r7}..|
00000950  ba 1d 20 53 55 42 53 20  20 20 43 6e 74 2c 20 43  |.. SUBS   Cnt, C|
00000960  6e 74 2c 20 23 26 31 30  30 30 30 0d 04 c4 16 20  |nt, #&10000.... |
00000970  42 50 4c 20 20 20 20 68  5f 63 6f 75 6e 74 5f 69  |BPL    h_count_i|
00000980  6e 0d 04 ce 19 20 4c 44  4d 49 41 20 20 53 63 72  |n.... LDMIA  Scr|
00000990  6e 2c 20 7b 72 30 2d 72  37 7d 0d 04 d8 12 20 4d  |n, {r0-r7}.... M|
000009a0  4f 56 20 20 20 20 72 38  2c 20 23 30 0d 04 e2 18  |OV    r8, #0....|
000009b0  20 a4 68 6f 72 69 7a 6f  6e 74 61 6c 5f 61 76 65  | .horizontal_ave|
000009c0  72 61 67 65 0d 04 ec 1c  20 53 54 4d 49 41 20 20  |rage.... STMIA  |
000009d0  28 53 63 72 6e 29 21 2c  20 7b 72 30 2d 72 37 7d  |(Scrn)!, {r0-r7}|
000009e0  0d 04 f6 1d 20 41 44 44  20 20 20 20 43 6e 74 2c  |.... ADD    Cnt,|
000009f0  20 43 6e 74 2c 20 23 26  31 30 30 30 30 0d 05 00  | Cnt, #&10000...|
00000a00  1d 20 4d 4f 56 20 20 20  20 43 6e 74 2c 20 43 6e  |. MOV    Cnt, Cn|
00000a10  74 2c 20 4c 53 4c 20 23  31 36 0d 05 0a 1d 20 53  |t, LSL #16.... S|
00000a20  55 42 53 20 20 20 43 6e  74 2c 20 43 6e 74 2c 20  |UBS   Cnt, Cnt, |
00000a30  23 26 31 30 30 30 30 0d  05 14 17 20 42 50 4c 20  |#&10000.... BPL |
00000a40  20 20 20 68 5f 63 6f 75  6e 74 5f 6f 75 74 0d 05  |   h_count_out..|
00000a50  1e 17 20 41 44 52 20 20  20 20 72 30 2c 20 76 5f  |.. ADR    r0, v_|
00000a60  63 6f 75 6e 74 0d 05 28  1b 20 4c 44 4d 49 41 20  |count..(. LDMIA |
00000a70  20 72 30 2c 20 7b 43 6e  74 2c 20 57 69 64 65 7d  | r0, {Cnt, Wide}|
00000a80  0d 05 32 05 20 0d 05 3c  13 20 2e 64 6f 77 6e 5f  |..2. ..<. .down_|
00000a90  6c 6f 6f 70 5f 6f 75 74  0d 05 46 1a 20 41 44 52  |loop_out..F. ADR|
00000aa0  20 20 20 20 54 6d 70 31  2c 20 76 5f 73 63 72 65  |    Tmp1, v_scre|
00000ab0  65 6e 0d 05 50 1e 20 4c  44 4d 49 41 20 20 54 6d  |en..P. LDMIA  Tm|
00000ac0  70 31 2c 20 7b 53 63 72  6e 2c 20 54 6d 70 31 7d  |p1, {Scrn, Tmp1}|
00000ad0  0d 05 5a 26 20 41 44 44  20 20 20 20 53 63 72 6e  |..Z& ADD    Scrn|
00000ae0  2c 20 53 63 72 6e 2c 20  43 6e 74 2c 20 4c 53 52  |, Scrn, Cnt, LSR|
00000af0  20 23 31 36 2d 34 0d 05  64 22 20 84 52 20 20 20  | #16-4..d" .R   |
00000b00  20 43 6e 74 2c 20 54 6d  70 31 2c 20 43 6e 74 2c  | Cnt, Tmp1, Cnt,|
00000b10  20 4c 53 52 20 23 31 36  0d 05 6e 19 20 4c 44 4d  | LSR #16..n. LDM|
00000b20  49 41 20 20 53 63 72 6e  2c 20 7b 72 30 2d 72 33  |IA  Scrn, {r0-r3|
00000b30  7d 0d 05 78 1c 20 41 44  44 20 20 20 20 53 63 72  |}..x. ADD    Scr|
00000b40  6e 2c 20 53 63 72 6e 2c  20 57 69 64 65 0d 05 82  |n, Scrn, Wide...|
00000b50  19 20 4c 44 4d 49 41 20  20 53 63 72 6e 2c 20 7b  |. LDMIA  Scrn, {|
00000b60  72 34 2d 72 37 7d 0d 05  8c 05 20 0d 05 96 12 20  |r4-r7}.... .... |
00000b70  2e 64 6f 77 6e 5f 6c 6f  6f 70 5f 69 6e 0d 05 a0  |.down_loop_in...|
00000b80  1e 20 a4 76 65 72 74 69  63 6c 65 5f 61 76 65 72  |. .verticle_aver|
00000b90  61 67 65 28 20 30 2c 20  34 20 29 0d 05 aa 19 20  |age( 0, 4 ).... |
00000ba0  53 54 4d 49 41 20 20 53  63 72 6e 2c 20 7b 72 30  |STMIA  Scrn, {r0|
00000bb0  2d 72 33 7d 0d 05 b4 1c  20 41 44 44 20 20 20 20  |-r3}.... ADD    |
00000bc0  53 63 72 6e 2c 20 53 63  72 6e 2c 20 57 69 64 65  |Scrn, Scrn, Wide|
00000bd0  0d 05 be 19 20 4c 44 4d  49 41 20 20 53 63 72 6e  |.... LDMIA  Scrn|
00000be0  2c 20 7b 72 30 2d 72 33  7d 0d 05 c8 1e 20 a4 76  |, {r0-r3}.... .v|
00000bf0  65 72 74 69 63 6c 65 5f  61 76 65 72 61 67 65 28  |erticle_average(|
00000c00  20 34 2c 20 30 20 29 0d  05 d2 19 20 53 54 4d 49  | 4, 0 ).... STMI|
00000c10  41 20 20 53 63 72 6e 2c  20 7b 72 34 2d 72 37 7d  |A  Scrn, {r4-r7}|
00000c20  0d 05 dc 1c 20 41 44 44  20 20 20 20 53 63 72 6e  |.... ADD    Scrn|
00000c30  2c 20 53 63 72 6e 2c 20  57 69 64 65 0d 05 e6 19  |, Scrn, Wide....|
00000c40  20 4c 44 4d 49 41 20 20  53 63 72 6e 2c 20 7b 72  | LDMIA  Scrn, {r|
00000c50  34 2d 72 37 7d 0d 05 f0  1d 20 53 55 42 53 20 20  |4-r7}.... SUBS  |
00000c60  20 43 6e 74 2c 20 43 6e  74 2c 20 23 26 31 30 30  | Cnt, Cnt, #&100|
00000c70  30 30 0d 05 fa 18 20 42  50 4c 20 20 20 20 64 6f  |00.... BPL    do|
00000c80  77 6e 5f 6c 6f 6f 70 5f  69 6e 0d 06 04 1e 20 a4  |wn_loop_in.... .|
00000c90  76 65 72 74 69 63 6c 65  5f 61 76 65 72 61 67 65  |verticle_average|
00000ca0  28 20 30 2c 20 34 20 29  0d 06 0e 19 20 53 54 4d  |( 0, 4 ).... STM|
00000cb0  49 41 20 20 53 63 72 6e  2c 20 7b 72 30 2d 72 33  |IA  Scrn, {r0-r3|
00000cc0  7d 0d 06 18 1d 20 41 44  44 20 20 20 20 43 6e 74  |}.... ADD    Cnt|
00000cd0  2c 20 43 6e 74 2c 20 23  26 31 30 30 30 30 0d 06  |, Cnt, #&10000..|
00000ce0  22 1d 20 4d 4f 56 20 20  20 20 43 6e 74 2c 20 43  |". MOV    Cnt, C|
00000cf0  6e 74 2c 20 4c 53 4c 20  23 31 36 0d 06 2c 1d 20  |nt, LSL #16..,. |
00000d00  53 55 42 53 20 20 20 43  6e 74 2c 20 43 6e 74 2c  |SUBS   Cnt, Cnt,|
00000d10  20 23 26 31 30 30 30 30  0d 06 36 19 20 42 50 4c  | #&10000..6. BPL|
00000d20  20 20 20 20 64 6f 77 6e  5f 6c 6f 6f 70 5f 6f 75  |    down_loop_ou|
00000d30  74 0d 06 40 0e 20 42 20  20 20 20 20 20 75 70 0d  |t..@. B      up.|
00000d40  06 4a 05 20 0d 06 54 1b  20 2e 76 5f 63 6f 75 6e  |.J. ..T. .v_coun|
00000d50  74 20 20 20 20 20 20 20  20 45 51 55 44 20 30 0d  |t        EQUD 0.|
00000d60  06 5e 1b 20 2e 76 5f 77  69 64 74 68 20 20 20 20  |.^. .v_width    |
00000d70  20 20 20 20 45 51 55 44  20 30 0d 06 68 1b 20 2e  |    EQUD 0..h. .|
00000d80  76 5f 73 63 72 65 65 6e  20 20 20 20 20 20 20 45  |v_screen       E|
00000d90  51 55 44 20 30 0d 06 72  1b 20 2e 76 5f 63 6f 75  |QUD 0..r. .v_cou|
00000da0  6e 74 5f 65 78 74 72 61  20 20 45 51 55 44 20 30  |nt_extra  EQUD 0|
00000db0  0d 06 7c 05 20 0d 06 86  08 20 2e 75 70 0d 06 90  |..|. .... .up...|
00000dc0  18 20 4c 44 52 20 20 20  20 43 6e 74 2c 20 76 5f  |. LDR    Cnt, v_|
00000dd0  63 6f 75 6e 74 0d 06 9a  05 20 0d 06 a4 11 20 2e  |count.... .... .|
00000de0  75 70 5f 6c 6f 6f 70 5f  6f 75 74 0d 06 ae 1a 20  |up_loop_out.... |
00000df0  41 44 52 20 20 20 20 54  6d 70 31 2c 20 76 5f 73  |ADR    Tmp1, v_s|
00000e00  63 72 65 65 6e 0d 06 b8  1e 20 4c 44 4d 49 41 20  |creen.... LDMIA |
00000e10  20 54 6d 70 31 2c 20 7b  53 63 72 6e 2c 20 54 6d  | Tmp1, {Scrn, Tm|
00000e20  70 31 7d 0d 06 c2 26 20  41 44 44 20 20 20 20 53  |p1}...& ADD    S|
00000e30  63 72 6e 2c 20 53 63 72  6e 2c 20 43 6e 74 2c 20  |crn, Scrn, Cnt, |
00000e40  4c 53 52 20 23 31 36 2d  34 0d 06 cc 22 20 84 52  |LSR #16-4..." .R|
00000e50  20 20 20 20 43 6e 74 2c  20 54 6d 70 31 2c 20 43  |    Cnt, Tmp1, C|
00000e60  6e 74 2c 20 4c 53 52 20  23 31 36 0d 06 d6 18 20  |nt, LSR #16.... |
00000e70  a4 7a 65 72 6f 5f 6d 61  63 72 6f 28 20 30 2c 20  |.zero_macro( 0, |
00000e80  33 20 29 0d 06 e0 1c 20  41 44 44 20 20 20 20 53  |3 ).... ADD    S|
00000e90  63 72 6e 2c 20 53 63 72  6e 2c 20 57 69 64 65 0d  |crn, Scrn, Wide.|
00000ea0  06 ea 19 20 4c 44 4d 49  41 20 20 53 63 72 6e 2c  |... LDMIA  Scrn,|
00000eb0  20 7b 72 34 2d 72 37 7d  0d 06 f4 05 20 0d 06 fe  | {r4-r7}.... ...|
00000ec0  10 20 2e 75 70 5f 6c 6f  6f 70 5f 69 6e 0d 07 08  |. .up_loop_in...|
00000ed0  1e 20 a4 76 65 72 74 69  63 6c 65 5f 61 76 65 72  |. .verticle_aver|
00000ee0  61 67 65 28 20 30 2c 20  34 20 29 0d 07 12 1c 20  |age( 0, 4 ).... |
00000ef0  53 55 42 20 20 20 20 53  63 72 6e 2c 20 53 63 72  |SUB    Scrn, Scr|
00000f00  6e 2c 20 57 69 64 65 0d  07 1c 19 20 53 54 4d 49  |n, Wide.... STMI|
00000f10  41 20 20 53 63 72 6e 2c  20 7b 72 30 2d 72 33 7d  |A  Scrn, {r0-r3}|
00000f20  0d 07 26 24 20 41 44 44  20 20 20 20 53 63 72 6e  |..&$ ADD    Scrn|
00000f30  2c 20 53 63 72 6e 2c 20  57 69 64 65 2c 20 4c 53  |, Scrn, Wide, LS|
00000f40  4c 20 23 31 0d 07 30 19  20 4c 44 4d 49 41 20 20  |L #1..0. LDMIA  |
00000f50  53 63 72 6e 2c 20 7b 72  30 2d 72 33 7d 0d 07 3a  |Scrn, {r0-r3}..:|
00000f60  1e 20 a4 76 65 72 74 69  63 6c 65 5f 61 76 65 72  |. .verticle_aver|
00000f70  61 67 65 28 20 34 2c 20  30 20 29 0d 07 44 1c 20  |age( 4, 0 )..D. |
00000f80  53 55 42 20 20 20 20 53  63 72 6e 2c 20 53 63 72  |SUB    Scrn, Scr|
00000f90  6e 2c 20 57 69 64 65 0d  07 4e 19 20 53 54 4d 49  |n, Wide..N. STMI|
00000fa0  41 20 20 53 63 72 6e 2c  20 7b 72 34 2d 72 37 7d  |A  Scrn, {r4-r7}|
00000fb0  0d 07 58 24 20 41 44 44  20 20 20 20 53 63 72 6e  |..X$ ADD    Scrn|
00000fc0  2c 20 53 63 72 6e 2c 20  57 69 64 65 2c 20 4c 53  |, Scrn, Wide, LS|
00000fd0  4c 20 23 31 0d 07 62 19  20 4c 44 4d 49 41 20 20  |L #1..b. LDMIA  |
00000fe0  53 63 72 6e 2c 20 7b 72  34 2d 72 37 7d 0d 07 6c  |Scrn, {r4-r7}..l|
00000ff0  1d 20 53 55 42 53 20 20  20 43 6e 74 2c 20 43 6e  |. SUBS   Cnt, Cn|
00001000  74 2c 20 23 26 31 30 30  30 30 0d 07 76 16 20 42  |t, #&10000..v. B|
00001010  50 4c 20 20 20 20 75 70  5f 6c 6f 6f 70 5f 69 6e  |PL    up_loop_in|
00001020  0d 07 80 1e 20 a4 76 65  72 74 69 63 6c 65 5f 61  |.... .verticle_a|
00001030  76 65 72 61 67 65 28 20  30 2c 20 34 20 29 0d 07  |verage( 0, 4 )..|
00001040  8a 1c 20 53 55 42 20 20  20 20 53 63 72 6e 2c 20  |.. SUB    Scrn, |
00001050  53 63 72 6e 2c 20 57 69  64 65 0d 07 94 19 20 53  |Scrn, Wide.... S|
00001060  54 4d 49 41 20 20 53 63  72 6e 2c 20 7b 72 30 2d  |TMIA  Scrn, {r0-|
00001070  72 33 7d 0d 07 9e 18 20  a4 7a 65 72 6f 5f 6d 61  |r3}.... .zero_ma|
00001080  63 72 6f 28 20 34 2c 20  37 20 29 0d 07 a8 1c 20  |cro( 4, 7 ).... |
00001090  41 44 44 20 20 20 20 53  63 72 6e 2c 20 53 63 72  |ADD    Scrn, Scr|
000010a0  6e 2c 20 57 69 64 65 0d  07 b2 19 20 53 54 4d 49  |n, Wide.... STMI|
000010b0  41 20 20 53 63 72 6e 2c  20 7b 72 34 2d 72 37 7d  |A  Scrn, {r4-r7}|
000010c0  0d 07 bc 1d 20 41 44 44  20 20 20 20 43 6e 74 2c  |.... ADD    Cnt,|
000010d0  20 43 6e 74 2c 20 23 26  31 30 30 30 30 0d 07 c6  | Cnt, #&10000...|
000010e0  1d 20 4d 4f 56 20 20 20  20 43 6e 74 2c 20 43 6e  |. MOV    Cnt, Cn|
000010f0  74 2c 20 4c 53 4c 20 23  31 36 0d 07 d0 1d 20 53  |t, LSL #16.... S|
00001100  55 42 53 20 20 20 43 6e  74 2c 20 43 6e 74 2c 20  |UBS   Cnt, Cnt, |
00001110  23 26 31 30 30 30 30 0d  07 da 17 20 42 50 4c 20  |#&10000.... BPL |
00001120  20 20 20 75 70 5f 6c 6f  6f 70 5f 6f 75 74 0d 07  |   up_loop_out..|
00001130  e4 0f 20 42 20 20 20 20  20 20 6f 75 74 0d 07 ee  |.. B      out...|
00001140  05 5d 0d 07 f8 05 e1 0d  08 02 04 0d 08 0c 18 dd  |.]..............|
00001150  a4 7a 65 72 6f 5f 6d 61  63 72 6f 28 20 53 2c 20  |.zero_macro( S, |
00001160  46 20 29 0d 08 16 09 ea  20 52 65 67 0d 08 20 0f  |F )..... Reg.. .|
00001170  e3 20 52 65 67 3d 53 20  b8 20 46 0d 08 2a 11 5b  |. Reg=S . F..*.[|
00001180  4f 50 54 20 20 20 20 70  61 73 73 25 0d 08 34 13  |OPT    pass%..4.|
00001190  20 4d 4f 56 20 20 20 20  52 65 67 2c 20 23 30 0d  | MOV    Reg, #0.|
000011a0  08 3e 05 5d 0d 08 48 05  ed 0d 08 52 07 3d 22 22  |.>.]..H....R.=""|
000011b0  0d 08 5c 04 0d 08 66 1e  dd a4 76 65 72 74 69 63  |..\...f...vertic|
000011c0  6c 65 5f 61 76 65 72 61  67 65 28 20 41 2c 20 42  |le_average( A, B|
000011d0  20 29 0d 08 70 07 ea 20  49 0d 08 7a 0d e3 20 49  | )..p.. I..z.. I|
000011e0  3d 30 20 b8 20 33 0d 08  84 11 5b 4f 50 54 20 20  |=0 . 3....[OPT  |
000011f0  20 20 70 61 73 73 25 0d  08 8e 1b 20 80 20 20 20  |  pass%.... .   |
00001200  20 54 6d 70 31 2c 20 4d  61 73 6b 2c 20 28 41 2b  | Tmp1, Mask, (A+|
00001210  49 29 0d 08 98 1b 20 80  20 20 20 20 54 6d 70 32  |I).... .    Tmp2|
00001220  2c 20 4d 61 73 6b 2c 20  28 42 2b 49 29 0d 08 a2  |, Mask, (B+I)...|
00001230  1c 20 41 44 44 20 20 20  20 54 6d 70 31 2c 20 54  |. ADD    Tmp1, T|
00001240  6d 70 31 2c 20 54 6d 70  32 0d 08 ac 22 20 80 20  |mp1, Tmp2..." . |
00001250  20 20 20 54 6d 70 31 2c  20 4d 61 73 6b 2c 20 54  |   Tmp1, Mask, T|
00001260  6d 70 31 2c 20 4c 53 52  20 23 31 0d 08 b6 24 20  |mp1, LSR #1...$ |
00001270  80 20 20 20 20 28 41 2b  49 29 2c 20 4d 61 73 6b  |.    (A+I), Mask|
00001280  2c 20 28 41 2b 49 29 2c  20 4c 53 52 20 23 34 0d  |, (A+I), LSR #4.|
00001290  08 c0 23 20 80 20 20 20  20 54 6d 70 32 2c 20 4d  |..# .    Tmp2, M|
000012a0  61 73 6b 2c 20 28 42 2b  49 29 2c 20 4c 53 52 20  |ask, (B+I), LSR |
000012b0  23 34 0d 08 ca 1e 20 41  44 44 20 20 20 20 28 41  |#4.... ADD    (A|
000012c0  2b 49 29 2c 20 28 41 2b  49 29 2c 20 54 6d 70 32  |+I), (A+I), Tmp2|
000012d0  0d 08 d4 24 20 80 20 20  20 20 28 41 2b 49 29 2c  |...$ .    (A+I),|
000012e0  20 4d 61 73 6b 2c 20 28  41 2b 49 29 2c 20 4c 53  | Mask, (A+I), LS|
000012f0  52 20 23 31 0d 08 de 25  20 84 52 20 20 20 20 28  |R #1...% .R    (|
00001300  41 2b 49 29 2c 20 54 6d  70 31 2c 20 28 41 2b 49  |A+I), Tmp1, (A+I|
00001310  29 2c 20 4c 53 4c 20 23  34 0d 08 e8 05 5d 0d 08  |), LSL #4....]..|
00001320  f2 05 ed 0d 08 fc 07 3d  22 22 0d 09 06 04 0d 09  |.......=""......|
00001330  10 18 dd a4 68 6f 72 69  7a 6f 6e 74 61 6c 5f 61  |....horizontal_a|
00001340  76 65 72 61 67 65 0d 09  1a 07 ea 20 49 0d 09 24  |verage..... I..$|
00001350  0f e3 20 52 65 67 3d 30  20 b8 20 37 0d 09 2e 11  |.. Reg=0 . 7....|
00001360  5b 4f 50 54 20 20 20 20  70 61 73 73 25 0d 09 38  |[OPT    pass%..8|
00001370  22 20 80 20 20 20 20 54  6d 70 31 2c 20 4d 61 73  |" .    Tmp1, Mas|
00001380  6b 2c 20 4d 61 73 6b 2c  20 4c 53 52 20 23 33 0d  |k, Mask, LSR #3.|
00001390  09 42 1a 20 42 49 43 20  20 20 20 52 65 67 2c 20  |.B. BIC    Reg, |
000013a0  52 65 67 2c 20 54 6d 70  31 0d 09 4c 22 20 42 49  |Reg, Tmp1..L" BI|
000013b0  43 20 20 20 20 52 65 67  2c 20 52 65 67 2c 20 54  |C    Reg, Reg, T|
000013c0  6d 70 31 2c 20 4c 53 4c  20 23 34 0d 09 56 22 20  |mp1, LSL #4..V" |
000013d0  42 49 43 20 20 20 20 45  6e 64 2c 20 45 6e 64 2c  |BIC    End, End,|
000013e0  20 54 6d 70 31 2c 20 4c  53 4c 20 23 34 0d 09 60  | Tmp1, LSL #4..`|
000013f0  22 20 42 49 43 20 20 20  20 28 52 65 67 2b 31 29  |" BIC    (Reg+1)|
00001400  2c 20 28 52 65 67 2b 31  29 2c 20 54 6d 70 31 0d  |, (Reg+1), Tmp1.|
00001410  09 6a 19 20 80 20 20 20  20 54 6d 70 31 2c 20 4d  |.j. .    Tmp1, M|
00001420  61 73 6b 2c 20 52 65 67  0d 09 74 21 20 80 20 20  |ask, Reg..t! .  |
00001430  20 20 54 6d 70 32 2c 20  4d 61 73 6b 2c 20 52 65  |  Tmp2, Mask, Re|
00001440  67 2c 20 4c 53 52 20 23  34 0d 09 7e 24 20 41 44  |g, LSR #4..~$ AD|
00001450  44 20 20 20 20 54 6d 70  31 2c 20 54 6d 70 32 2c  |D    Tmp1, Tmp2,|
00001460  20 54 6d 70 31 2c 20 4c  53 4c 20 23 31 0d 09 88  | Tmp1, LSL #1...|
00001470  21 20 80 20 20 20 20 54  6d 70 32 2c 20 4d 61 73  |! .    Tmp2, Mas|
00001480  6b 2c 20 52 65 67 2c 20  4c 53 4c 20 23 34 0d 09  |k, Reg, LSL #4..|
00001490  92 1c 20 41 44 44 20 20  20 20 54 6d 70 31 2c 20  |.. ADD    Tmp1, |
000014a0  54 6d 70 31 2c 20 54 6d  70 32 0d 09 9c 22 20 80  |Tmp1, Tmp2..." .|
000014b0  20 20 20 20 54 6d 70 32  2c 20 4d 61 73 6b 2c 20  |    Tmp2, Mask, |
000014c0  45 6e 64 2c 20 4c 53 52  20 23 32 38 0d 09 a6 1c  |End, LSR #28....|
000014d0  20 41 44 44 20 20 20 20  54 6d 70 31 2c 20 54 6d  | ADD    Tmp1, Tm|
000014e0  70 31 2c 20 54 6d 70 32  0d 09 b0 14 20 4d 4f 56  |p1, Tmp2.... MOV|
000014f0  20 20 20 20 45 6e 64 2c  20 52 65 67 0d 09 ba 21  |    End, Reg...!|
00001500  20 80 20 20 20 20 52 65  67 2c 20 4d 61 73 6b 2c  | .    Reg, Mask,|
00001510  20 54 6d 70 31 2c 20 4c  53 52 20 23 32 0d 09 c4  | Tmp1, LSR #2...|
00001520  21 20 80 20 20 20 20 54  6d 70 31 2c 20 4d 61 73  |! .    Tmp1, Mas|
00001530  6b 2c 20 45 6e 64 2c 20  4c 53 52 20 23 34 0d 09  |k, End, LSR #4..|
00001540  ce 19 20 80 20 20 20 20  54 6d 70 32 2c 20 4d 61  |.. .    Tmp2, Ma|
00001550  73 6b 2c 20 45 6e 64 0d  09 d8 24 20 41 44 44 20  |sk, End...$ ADD |
00001560  20 20 20 54 6d 70 31 2c  20 54 6d 70 32 2c 20 54  |   Tmp1, Tmp2, T|
00001570  6d 70 31 2c 20 4c 53 4c  20 23 31 0d 09 e2 21 20  |mp1, LSL #1...! |
00001580  80 20 20 20 20 54 6d 70  32 2c 20 4d 61 73 6b 2c  |.    Tmp2, Mask,|
00001590  20 45 6e 64 2c 20 4c 53  52 20 23 38 0d 09 ec 1c  | End, LSR #8....|
000015a0  20 41 44 44 20 20 20 20  54 6d 70 31 2c 20 54 6d  | ADD    Tmp1, Tm|
000015b0  70 31 2c 20 54 6d 70 32  0d 09 f6 1d 20 80 20 20  |p1, Tmp2.... .  |
000015c0  20 20 54 6d 70 32 2c 20  4d 61 73 6b 2c 20 28 52  |  Tmp2, Mask, (R|
000015d0  65 67 2b 31 29 0d 0a 00  25 20 41 44 44 20 20 20  |eg+1)...% ADD   |
000015e0  20 54 6d 70 31 2c 20 54  6d 70 31 2c 20 54 6d 70  | Tmp1, Tmp1, Tmp|
000015f0  32 2c 20 4c 53 4c 20 23  32 34 0d 0a 0a 22 20 80  |2, LSL #24..." .|
00001600  20 20 20 20 54 6d 70 31  2c 20 4d 61 73 6b 2c 20  |    Tmp1, Mask, |
00001610  54 6d 70 31 2c 20 4c 53  52 20 23 32 0d 0a 14 21  |Tmp1, LSR #2...!|
00001620  20 84 52 20 20 20 20 52  65 67 2c 20 52 65 67 2c  | .R    Reg, Reg,|
00001630  20 54 6d 70 31 2c 20 4c  53 4c 20 23 34 0d 0a 1e  | Tmp1, LSL #4...|
00001640  05 5d 0d 0a 28 05 ed 0d  0a 32 07 3d 22 22 0d ff  |.]..(....2.=""..|
00001650