Home » Recent acquisitions » Acorn ADFS disks » adfs_AcornUser_199512_2.adf » !Regulars » Regulars/StarInfo/Vlietinck/AntiAlias

Regulars/StarInfo/Vlietinck/AntiAlias

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_199512_2.adf » !Regulars
Filename: Regulars/StarInfo/Vlietinck/AntiAlias
Read OK:
File size: 0D3E bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >Anti_aliaC
   20REM (c) JAN VLIETINCK
   21REM vlietin@intec.rug.ac.be
   22
   30MODE 13+128:MODE13
   31ON ERROR:END
   40DIM Q% 8000
   50Q%=16*(Q%DIV16)+28
   60
   70DIM DITABLE 1024*4
   80P%=DITABLE+4
   90FOR I=1 TO 1024
  100[OPT 0
  110EQUD (2^20/I)
  120]
  130NEXT
  140
  150DIM CTABLE 8
  160P%=CTABLE
  170[OPT 0
  180EQUB %11111111
  190EQUB %11111110
  200EQUB %11111101
  210EQUB %11111100
  220EQUB %11010011
  230EQUB %11010010
  240EQUB %11010001
  241EQUB %11010000
  250;EQUB %11010000
  260]
  270
  280X1=0:Y1=1:X2=2:Y2=3:XL=4:XR=5:YB=6:YT=7:K1=8:K2=9:DT=10:S=11:T=12
  290
  300LL=0:RR=1:A=2:B=3:C=4:O=5:D=6:CT=7
  310FOR P=0 TO 2 STEP 2
  320P%=Q%
  330[OPT P
  340\-------------------------------------------------------------------------
  350.screen1 EQUD 148:EQUD -1
  360.screen EQUD 0
  370.CTABLED EQUD CTABLE
  380
  390.BOX EQUD 1:EQUD 318:EQUD 1:EQUD 254
  400.DITABLED EQUD DITABLE
  410.set
  420ADR R0,screen1:ADR R1,screen:SWI "OS_ReadVduVariables"
  430MOV PC,R14
  440\-------------------------------------------------------------------------
  450
  460REM Anti-aliased lines, with faster then Sutherland clipping
  480REM Parameters  (X1,Y1) => (R0,R1); (X2,Y2) => (R2,R3)
  500.line
  510ADR T,BOX
  520LDMIA T,{XL,XR,YB,YT,DT}
  530CMP   XL,X1
  540CMPLE X1,XR
  550CMPLE YB,Y1
  560CMPLE Y1,YT
  570CMPLE XL,X2
  580CMPLE X2,XR
  590CMPLE YB,Y2
  600CMPLE Y2,YT
  610BLE inside
  620
  630CMP X1,X2
  640MOVGT T,X1:MOVGT X1,X2:MOVGT X2,T
  650MOVGT T,Y1:MOVGT Y1,Y2:MOVGT Y2,T
  660CMP X2,XL:MOVLT PC,R14
  670CMP X1,XR:MOVGT PC,R14
  680SUB T,X2,X1:LDR S,[DT,T,LSL #2]
  690SUB T,Y2,Y1:MUL S,T,S:MOV S,S,ASR #10
  700CMP X1,XL:SUBLT T,XL,X1:MULLT T,S,T:ADDLT Y1,Y1,T,ASR #10:MOVLT X1,XL
  710CMP X2,XR:SUBGT T,XR,X2:MULGT T,S,T:ADDGT Y2,Y2,T,ASR #10:MOVGT X2,XR
  720
  730CMP Y1,Y2
  740MOVGT T,X1:MOVGT X1,X2:MOVGT X2,T
  750MOVGT T,Y1:MOVGT Y1,Y2:MOVGT Y2,T
  760CMP Y2,YB:MOVLT PC,R14
  770CMP Y1,YT:MOVGT PC,R14
  780SUB T,Y2,Y1:LDR S,[DT,T,LSL #2]
  790SUB T,X2,X1:MUL S,T,S:MOV S,S,ASR #10
  800CMP Y1,YB:SUBLT T,YB,Y1:MULLT T,S,T:ADDLT X1,X1,T,ASR #10:MOVLT Y1,YB
  810CMP Y2,YT:SUBGT T,YT,Y2:MULGT T,S,T:ADDGT X2,X2,T,ASR #10:MOVGT Y2,YT
  820
  830.inside    \ Line completely inside box
  840ADR T,screen
  850LDMIA T,{O,CT}
  860RSB T,Y1,#255
  870ADD T,T,T,LSL #2
  880ADD T,X1,T,LSL #6
  890ADD O,O,T
  900SUB A,X2,X1
  910SUB B,Y2,Y1
  920MOV LL,#1
  930MOV RR,#320
  940RSB RR,RR,#0
  950CMP A,#0
  960 RSBLT A,A,#0
  970 RSBLT LL,LL,#0
  980CMP B,#0
  990 RSBLT B,B,#0
 1000 RSBLT RR,RR,#0
 1010CMP A,B
 1020 MOVLT T,A
 1030 MOVLT A,B
 1040 MOVLT B,T
 1050 MOVLT T,LL
 1060 MOVLT LL,RR
 1070 MOVLT RR,T
 1080STRB C,[O]
 1090CMP A,#0
 1100 MOVEQ PC,R14
 1110LDR T,[DT,A,LSL #2]
 1120MUL B,T,B
 1130MOV D,#1<<20
 1140.line_loop
 1150SUBS D,D,B
 1160ADDLE D,D,#1<<20
 1170ADDLE O,O,RR
 1180RSB  T,D,#1<<20
 1190LDRB C,[CT,T,LSR #17]
 1200STRB C,[O,LL]!
 1210LDRB C,[CT,D,LSR #17]
 1220STRB C,[O,RR]
 1230SUBS A,A,#1
 1240BNE line_loop
 1250MOV PC,R14
 1260\---------------------------------------------------------------
 1270]
 1280NEXT
 1290*POINTER
 1300MOUSE ON:MOUSE TO 640,512
 1310M=2
 1320A%=160:B%=128
 1330
 1340FOR DH=0 TO 30000 STEP 0.9
 1350SYS "OS_Byte",&70,M:CLS
 1360ALIAS=DH AND 32
 1370IF ALIAS THEN PRINT "WITH anti-aliasing" ELSE PRINT "WITHOUT anti-aliasing"
 1380CALL set
 1390MOUSE X%,Y%,Z%
 1400A%=X%-640+160
 1410B%=Y%-512+128
 1420FOR H=0 TO 350 STEP 10
 1430R=RAD(H+DH)
 1440C%=100*COSR+X%-640+160
 1450D%=100*SINR+Y%-512+128
 1460IF ALIAS THEN CALL line ELSE LINE 4*A%,4*B%,4*C%,4*D%
 1470NEXT
 1480WAIT:SYS "OS_Byte",&71,M:M=M EOR3
 1490NEXT
 1500
 1510
 1520*POINTER
 1530MOUSE ON:MOUSE TO 800,512
 1540REPEAT
 1550SYS "OS_Byte",&70,M:CLS
 1560MOUSE X%,Y%,Z%
 1570C%=X%/4
 1580D%=Y%/4
 1590CALL set
 1600CALL line
 1610WAIT:SYS "OS_Byte",&71,M:M=M EOR 3
 1620UNTIL 0
 1630END

� >Anti_aliaC
� (c) JAN VLIETINCK
� vlietin@intec.rug.ac.be

� 13+128:�13
	� �:�
(
� Q% 8000
2Q%=16*(Q%�16)+28
<
F� DITABLE 1024*4
PP%=DITABLE+4
Z� I=1 � 1024
d
[OPT 0
nEQUD (2^20/I)
x]
��
�
�� CTABLE 8
�
P%=CTABLE
�
[OPT 0
�EQUB %11111111
�EQUB %11111110
�EQUB %11111101
�EQUB %11111100
�EQUB %11010011
�EQUB %11010010
�EQUB %11010001
�EQUB %11010000
�;EQUB %11010000
]

EX1=0:Y1=1:X2=2:Y2=3:XL=4:XR=5:YB=6:YT=7:K1=8:K2=9:DT=10:S=11:T=12
"
,&LL=0:RR=1:A=2:B=3:C=4:O=5:D=6:CT=7
6� P=0 � 2 � 2
@	P%=Q%
J
[OPT P
TN\-------------------------------------------------------------------------
^.screen1 EQUD 148:EQUD -1
h.screen EQUD 0
r.CTABLED EQUD CTABLE
|
�(.BOX EQUD 1:EQUD 318:EQUD 1:EQUD 254
�.DITABLED EQUD DITABLE
�.set
�:ADR R0,screen1:ADR R1,screen:SWI "OS_ReadVduVariables"
�MOV PC,R14
�N\-------------------------------------------------------------------------
�
�>� Anti-aliased lines, with faster then Sutherland clipping
�8� Parameters  (X1,Y1) => (R0,R1); (X2,Y2) => (R2,R3)
�	.line
�
ADR T,BOX
LDMIA T,{XL,XR,YB,YT,DT}
CMP   XL,X1
CMPLE X1,XR
&CMPLE YB,Y1
0CMPLE Y1,YT
:CMPLE XL,X2
DCMPLE X2,XR
NCMPLE YB,Y2
XCMPLE Y2,YT
bBLE inside
l
v
CMP X1,X2
�%MOVGT T,X1:MOVGT X1,X2:MOVGT X2,T
�%MOVGT T,Y1:MOVGT Y1,Y2:MOVGT Y2,T
�CMP X2,XL:MOVLT PC,R14
�CMP X1,XR:MOVGT PC,R14
�#SUB T,X2,X1:LDR S,[DT,T,LSL #2]
�)SUB T,Y2,Y1:MUL S,T,S:MOV S,S,ASR #10
�ICMP X1,XL:SUBLT T,XL,X1:MULLT T,S,T:ADDLT Y1,Y1,T,ASR #10:MOVLT X1,XL
�ICMP X2,XR:SUBGT T,XR,X2:MULGT T,S,T:ADDGT Y2,Y2,T,ASR #10:MOVGT X2,XR
�
�
CMP Y1,Y2
�%MOVGT T,X1:MOVGT X1,X2:MOVGT X2,T
�%MOVGT T,Y1:MOVGT Y1,Y2:MOVGT Y2,T
�CMP Y2,YB:MOVLT PC,R14
CMP Y1,YT:MOVGT PC,R14
#SUB T,Y2,Y1:LDR S,[DT,T,LSL #2]
)SUB T,X2,X1:MUL S,T,S:MOV S,S,ASR #10
 ICMP Y1,YB:SUBLT T,YB,Y1:MULLT T,S,T:ADDLT X1,X1,T,ASR #10:MOVLT Y1,YB
*ICMP Y2,YT:SUBGT T,YT,Y2:MULGT T,S,T:ADDGT X2,X2,T,ASR #10:MOVGT Y2,YT
4
>+.inside    \ Line completely inside box
HADR T,screen
RLDMIA T,{O,CT}
\RSB T,Y1,#255
fADD T,T,T,LSL #2
pADD T,X1,T,LSL #6
z
ADD O,O,T
�SUB A,X2,X1
�SUB B,Y2,Y1
�
MOV LL,#1
�MOV RR,#320
�RSB RR,RR,#0
�CMP A,#0
� RSBLT A,A,#0
� RSBLT LL,LL,#0
�CMP B,#0
� RSBLT B,B,#0
� RSBLT RR,RR,#0
�CMP A,B
� MOVLT T,A
 MOVLT A,B
 MOVLT B,T
 MOVLT T,LL
$ MOVLT LL,RR
. MOVLT RR,T
8STRB C,[O]
BCMP A,#0
L �Q PC,R14
VLDR T,[DT,A,LSL #2]
`
MUL B,T,B
jMOV D,#1<<20
t.line_loop
~SUBS D,D,B
�ADDLE D,D,#1<<20
�ADDLE O,O,RR
�RSB  T,D,#1<<20
�LDRB C,[CT,T,LSR #17]
�STRB C,[O,LL]!
�LDRB C,[CT,D,LSR #17]
�STRB C,[O,RR]
�SUBS A,A,#1
�BNE line_loop
�MOV PC,R14
�D\---------------------------------------------------------------
�]
�

*POINTER
ȗ �:ȗ � 640,512
M=2
(A%=160:B%=128
2
<� DH=0 � 30000 � 0.9
Fș "OS_Byte",&70,M:�
PALIAS=DH � 32
Z@� ALIAS � � "WITH anti-aliasing" � � "WITHOUT anti-aliasing"
d	� set
nȗ X%,Y%,Z%
xA%=X%-640+160
�B%=Y%-512+128
�� H=0 � 350 � 10
�
R=�(H+DH)
�C%=100*�R+X%-640+160
�D%=100*�R+Y%-512+128
�,� ALIAS � � line � � 4*A%,4*B%,4*C%,4*D%
��
� Ȗ:ș "OS_Byte",&71,M:M=M �3
��
�
�
�*POINTER
�ȗ �:ȗ � 800,512
�
ș "OS_Byte",&70,M:�
ȗ X%,Y%,Z%
"C%=X%/4
,D%=Y%/4
6	� set
@
� line
J!Ȗ:ș "OS_Byte",&71,M:M=M � 3
T� 0
^�
�
00000000  0d 00 0a 11 f4 20 3e 41  6e 74 69 5f 61 6c 69 61  |..... >Anti_alia|
00000010  43 0d 00 14 17 f4 20 28  63 29 20 4a 41 4e 20 56  |C..... (c) JAN V|
00000020  4c 49 45 54 49 4e 43 4b  0d 00 15 1d f4 20 76 6c  |LIETINCK..... vl|
00000030  69 65 74 69 6e 40 69 6e  74 65 63 2e 72 75 67 2e  |ietin@intec.rug.|
00000040  61 63 2e 62 65 0d 00 16  04 0d 00 1e 10 eb 20 31  |ac.be......... 1|
00000050  33 2b 31 32 38 3a eb 31  33 0d 00 1f 09 ee 20 85  |3+128:.13..... .|
00000060  3a e0 0d 00 28 0d de 20  51 25 20 38 30 30 30 0d  |:...(.. Q% 8000.|
00000070  00 32 14 51 25 3d 31 36  2a 28 51 25 81 31 36 29  |.2.Q%=16*(Q%.16)|
00000080  2b 32 38 0d 00 3c 04 0d  00 46 14 de 20 44 49 54  |+28..<...F.. DIT|
00000090  41 42 4c 45 20 31 30 32  34 2a 34 0d 00 50 10 50  |ABLE 1024*4..P.P|
000000a0  25 3d 44 49 54 41 42 4c  45 2b 34 0d 00 5a 10 e3  |%=DITABLE+4..Z..|
000000b0  20 49 3d 31 20 b8 20 31  30 32 34 0d 00 64 0a 5b  | I=1 . 1024..d.[|
000000c0  4f 50 54 20 30 0d 00 6e  11 45 51 55 44 20 28 32  |OPT 0..n.EQUD (2|
000000d0  5e 32 30 2f 49 29 0d 00  78 05 5d 0d 00 82 05 ed  |^20/I)..x.].....|
000000e0  0d 00 8c 04 0d 00 96 0e  de 20 43 54 41 42 4c 45  |......... CTABLE|
000000f0  20 38 0d 00 a0 0d 50 25  3d 43 54 41 42 4c 45 0d  | 8....P%=CTABLE.|
00000100  00 aa 0a 5b 4f 50 54 20  30 0d 00 b4 12 45 51 55  |...[OPT 0....EQU|
00000110  42 20 25 31 31 31 31 31  31 31 31 0d 00 be 12 45  |B %11111111....E|
00000120  51 55 42 20 25 31 31 31  31 31 31 31 30 0d 00 c8  |QUB %11111110...|
00000130  12 45 51 55 42 20 25 31  31 31 31 31 31 30 31 0d  |.EQUB %11111101.|
00000140  00 d2 12 45 51 55 42 20  25 31 31 31 31 31 31 30  |...EQUB %1111110|
00000150  30 0d 00 dc 12 45 51 55  42 20 25 31 31 30 31 30  |0....EQUB %11010|
00000160  30 31 31 0d 00 e6 12 45  51 55 42 20 25 31 31 30  |011....EQUB %110|
00000170  31 30 30 31 30 0d 00 f0  12 45 51 55 42 20 25 31  |10010....EQUB %1|
00000180  31 30 31 30 30 30 31 0d  00 f1 12 45 51 55 42 20  |1010001....EQUB |
00000190  25 31 31 30 31 30 30 30  30 0d 00 fa 13 3b 45 51  |%11010000....;EQ|
000001a0  55 42 20 25 31 31 30 31  30 30 30 30 0d 01 04 05  |UB %11010000....|
000001b0  5d 0d 01 0e 04 0d 01 18  45 58 31 3d 30 3a 59 31  |].......EX1=0:Y1|
000001c0  3d 31 3a 58 32 3d 32 3a  59 32 3d 33 3a 58 4c 3d  |=1:X2=2:Y2=3:XL=|
000001d0  34 3a 58 52 3d 35 3a 59  42 3d 36 3a 59 54 3d 37  |4:XR=5:YB=6:YT=7|
000001e0  3a 4b 31 3d 38 3a 4b 32  3d 39 3a 44 54 3d 31 30  |:K1=8:K2=9:DT=10|
000001f0  3a 53 3d 31 31 3a 54 3d  31 32 0d 01 22 04 0d 01  |:S=11:T=12.."...|
00000200  2c 26 4c 4c 3d 30 3a 52  52 3d 31 3a 41 3d 32 3a  |,&LL=0:RR=1:A=2:|
00000210  42 3d 33 3a 43 3d 34 3a  4f 3d 35 3a 44 3d 36 3a  |B=3:C=4:O=5:D=6:|
00000220  43 54 3d 37 0d 01 36 11  e3 20 50 3d 30 20 b8 20  |CT=7..6.. P=0 . |
00000230  32 20 88 20 32 0d 01 40  09 50 25 3d 51 25 0d 01  |2 . 2..@.P%=Q%..|
00000240  4a 0a 5b 4f 50 54 20 50  0d 01 54 4e 5c 2d 2d 2d  |J.[OPT P..TN\---|
00000250  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000290  2d 2d 2d 2d 2d 2d 0d 01  5e 1d 2e 73 63 72 65 65  |------..^..scree|
000002a0  6e 31 20 45 51 55 44 20  31 34 38 3a 45 51 55 44  |n1 EQUD 148:EQUD|
000002b0  20 2d 31 0d 01 68 12 2e  73 63 72 65 65 6e 20 45  | -1..h..screen E|
000002c0  51 55 44 20 30 0d 01 72  18 2e 43 54 41 42 4c 45  |QUD 0..r..CTABLE|
000002d0  44 20 45 51 55 44 20 43  54 41 42 4c 45 0d 01 7c  |D EQUD CTABLE..||
000002e0  04 0d 01 86 28 2e 42 4f  58 20 45 51 55 44 20 31  |....(.BOX EQUD 1|
000002f0  3a 45 51 55 44 20 33 31  38 3a 45 51 55 44 20 31  |:EQUD 318:EQUD 1|
00000300  3a 45 51 55 44 20 32 35  34 0d 01 90 1a 2e 44 49  |:EQUD 254.....DI|
00000310  54 41 42 4c 45 44 20 45  51 55 44 20 44 49 54 41  |TABLED EQUD DITA|
00000320  42 4c 45 0d 01 9a 08 2e  73 65 74 0d 01 a4 3a 41  |BLE.....set...:A|
00000330  44 52 20 52 30 2c 73 63  72 65 65 6e 31 3a 41 44  |DR R0,screen1:AD|
00000340  52 20 52 31 2c 73 63 72  65 65 6e 3a 53 57 49 20  |R R1,screen:SWI |
00000350  22 4f 53 5f 52 65 61 64  56 64 75 56 61 72 69 61  |"OS_ReadVduVaria|
00000360  62 6c 65 73 22 0d 01 ae  0e 4d 4f 56 20 50 43 2c  |bles"....MOV PC,|
00000370  52 31 34 0d 01 b8 4e 5c  2d 2d 2d 2d 2d 2d 2d 2d  |R14...N\--------|
00000380  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
000003c0  2d 0d 01 c2 04 0d 01 cc  3e f4 20 41 6e 74 69 2d  |-.......>. Anti-|
000003d0  61 6c 69 61 73 65 64 20  6c 69 6e 65 73 2c 20 77  |aliased lines, w|
000003e0  69 74 68 20 66 61 73 74  65 72 20 74 68 65 6e 20  |ith faster then |
000003f0  53 75 74 68 65 72 6c 61  6e 64 20 63 6c 69 70 70  |Sutherland clipp|
00000400  69 6e 67 0d 01 e0 38 f4  20 50 61 72 61 6d 65 74  |ing...8. Paramet|
00000410  65 72 73 20 20 28 58 31  2c 59 31 29 20 3d 3e 20  |ers  (X1,Y1) => |
00000420  28 52 30 2c 52 31 29 3b  20 28 58 32 2c 59 32 29  |(R0,R1); (X2,Y2)|
00000430  20 3d 3e 20 28 52 32 2c  52 33 29 0d 01 f4 09 2e  | => (R2,R3).....|
00000440  6c 69 6e 65 0d 01 fe 0d  41 44 52 20 54 2c 42 4f  |line....ADR T,BO|
00000450  58 0d 02 08 1c 4c 44 4d  49 41 20 54 2c 7b 58 4c  |X....LDMIA T,{XL|
00000460  2c 58 52 2c 59 42 2c 59  54 2c 44 54 7d 0d 02 12  |,XR,YB,YT,DT}...|
00000470  0f 43 4d 50 20 20 20 58  4c 2c 58 31 0d 02 1c 0f  |.CMP   XL,X1....|
00000480  43 4d 50 4c 45 20 58 31  2c 58 52 0d 02 26 0f 43  |CMPLE X1,XR..&.C|
00000490  4d 50 4c 45 20 59 42 2c  59 31 0d 02 30 0f 43 4d  |MPLE YB,Y1..0.CM|
000004a0  50 4c 45 20 59 31 2c 59  54 0d 02 3a 0f 43 4d 50  |PLE Y1,YT..:.CMP|
000004b0  4c 45 20 58 4c 2c 58 32  0d 02 44 0f 43 4d 50 4c  |LE XL,X2..D.CMPL|
000004c0  45 20 58 32 2c 58 52 0d  02 4e 0f 43 4d 50 4c 45  |E X2,XR..N.CMPLE|
000004d0  20 59 42 2c 59 32 0d 02  58 0f 43 4d 50 4c 45 20  | YB,Y2..X.CMPLE |
000004e0  59 32 2c 59 54 0d 02 62  0e 42 4c 45 20 69 6e 73  |Y2,YT..b.BLE ins|
000004f0  69 64 65 0d 02 6c 04 0d  02 76 0d 43 4d 50 20 58  |ide..l...v.CMP X|
00000500  31 2c 58 32 0d 02 80 25  4d 4f 56 47 54 20 54 2c  |1,X2...%MOVGT T,|
00000510  58 31 3a 4d 4f 56 47 54  20 58 31 2c 58 32 3a 4d  |X1:MOVGT X1,X2:M|
00000520  4f 56 47 54 20 58 32 2c  54 0d 02 8a 25 4d 4f 56  |OVGT X2,T...%MOV|
00000530  47 54 20 54 2c 59 31 3a  4d 4f 56 47 54 20 59 31  |GT T,Y1:MOVGT Y1|
00000540  2c 59 32 3a 4d 4f 56 47  54 20 59 32 2c 54 0d 02  |,Y2:MOVGT Y2,T..|
00000550  94 1a 43 4d 50 20 58 32  2c 58 4c 3a 4d 4f 56 4c  |..CMP X2,XL:MOVL|
00000560  54 20 50 43 2c 52 31 34  0d 02 9e 1a 43 4d 50 20  |T PC,R14....CMP |
00000570  58 31 2c 58 52 3a 4d 4f  56 47 54 20 50 43 2c 52  |X1,XR:MOVGT PC,R|
00000580  31 34 0d 02 a8 23 53 55  42 20 54 2c 58 32 2c 58  |14...#SUB T,X2,X|
00000590  31 3a 4c 44 52 20 53 2c  5b 44 54 2c 54 2c 4c 53  |1:LDR S,[DT,T,LS|
000005a0  4c 20 23 32 5d 0d 02 b2  29 53 55 42 20 54 2c 59  |L #2]...)SUB T,Y|
000005b0  32 2c 59 31 3a 4d 55 4c  20 53 2c 54 2c 53 3a 4d  |2,Y1:MUL S,T,S:M|
000005c0  4f 56 20 53 2c 53 2c 41  53 52 20 23 31 30 0d 02  |OV S,S,ASR #10..|
000005d0  bc 49 43 4d 50 20 58 31  2c 58 4c 3a 53 55 42 4c  |.ICMP X1,XL:SUBL|
000005e0  54 20 54 2c 58 4c 2c 58  31 3a 4d 55 4c 4c 54 20  |T T,XL,X1:MULLT |
000005f0  54 2c 53 2c 54 3a 41 44  44 4c 54 20 59 31 2c 59  |T,S,T:ADDLT Y1,Y|
00000600  31 2c 54 2c 41 53 52 20  23 31 30 3a 4d 4f 56 4c  |1,T,ASR #10:MOVL|
00000610  54 20 58 31 2c 58 4c 0d  02 c6 49 43 4d 50 20 58  |T X1,XL...ICMP X|
00000620  32 2c 58 52 3a 53 55 42  47 54 20 54 2c 58 52 2c  |2,XR:SUBGT T,XR,|
00000630  58 32 3a 4d 55 4c 47 54  20 54 2c 53 2c 54 3a 41  |X2:MULGT T,S,T:A|
00000640  44 44 47 54 20 59 32 2c  59 32 2c 54 2c 41 53 52  |DDGT Y2,Y2,T,ASR|
00000650  20 23 31 30 3a 4d 4f 56  47 54 20 58 32 2c 58 52  | #10:MOVGT X2,XR|
00000660  0d 02 d0 04 0d 02 da 0d  43 4d 50 20 59 31 2c 59  |........CMP Y1,Y|
00000670  32 0d 02 e4 25 4d 4f 56  47 54 20 54 2c 58 31 3a  |2...%MOVGT T,X1:|
00000680  4d 4f 56 47 54 20 58 31  2c 58 32 3a 4d 4f 56 47  |MOVGT X1,X2:MOVG|
00000690  54 20 58 32 2c 54 0d 02  ee 25 4d 4f 56 47 54 20  |T X2,T...%MOVGT |
000006a0  54 2c 59 31 3a 4d 4f 56  47 54 20 59 31 2c 59 32  |T,Y1:MOVGT Y1,Y2|
000006b0  3a 4d 4f 56 47 54 20 59  32 2c 54 0d 02 f8 1a 43  |:MOVGT Y2,T....C|
000006c0  4d 50 20 59 32 2c 59 42  3a 4d 4f 56 4c 54 20 50  |MP Y2,YB:MOVLT P|
000006d0  43 2c 52 31 34 0d 03 02  1a 43 4d 50 20 59 31 2c  |C,R14....CMP Y1,|
000006e0  59 54 3a 4d 4f 56 47 54  20 50 43 2c 52 31 34 0d  |YT:MOVGT PC,R14.|
000006f0  03 0c 23 53 55 42 20 54  2c 59 32 2c 59 31 3a 4c  |..#SUB T,Y2,Y1:L|
00000700  44 52 20 53 2c 5b 44 54  2c 54 2c 4c 53 4c 20 23  |DR S,[DT,T,LSL #|
00000710  32 5d 0d 03 16 29 53 55  42 20 54 2c 58 32 2c 58  |2]...)SUB T,X2,X|
00000720  31 3a 4d 55 4c 20 53 2c  54 2c 53 3a 4d 4f 56 20  |1:MUL S,T,S:MOV |
00000730  53 2c 53 2c 41 53 52 20  23 31 30 0d 03 20 49 43  |S,S,ASR #10.. IC|
00000740  4d 50 20 59 31 2c 59 42  3a 53 55 42 4c 54 20 54  |MP Y1,YB:SUBLT T|
00000750  2c 59 42 2c 59 31 3a 4d  55 4c 4c 54 20 54 2c 53  |,YB,Y1:MULLT T,S|
00000760  2c 54 3a 41 44 44 4c 54  20 58 31 2c 58 31 2c 54  |,T:ADDLT X1,X1,T|
00000770  2c 41 53 52 20 23 31 30  3a 4d 4f 56 4c 54 20 59  |,ASR #10:MOVLT Y|
00000780  31 2c 59 42 0d 03 2a 49  43 4d 50 20 59 32 2c 59  |1,YB..*ICMP Y2,Y|
00000790  54 3a 53 55 42 47 54 20  54 2c 59 54 2c 59 32 3a  |T:SUBGT T,YT,Y2:|
000007a0  4d 55 4c 47 54 20 54 2c  53 2c 54 3a 41 44 44 47  |MULGT T,S,T:ADDG|
000007b0  54 20 58 32 2c 58 32 2c  54 2c 41 53 52 20 23 31  |T X2,X2,T,ASR #1|
000007c0  30 3a 4d 4f 56 47 54 20  59 32 2c 59 54 0d 03 34  |0:MOVGT Y2,YT..4|
000007d0  04 0d 03 3e 2b 2e 69 6e  73 69 64 65 20 20 20 20  |...>+.inside    |
000007e0  5c 20 4c 69 6e 65 20 63  6f 6d 70 6c 65 74 65 6c  |\ Line completel|
000007f0  79 20 69 6e 73 69 64 65  20 62 6f 78 0d 03 48 10  |y inside box..H.|
00000800  41 44 52 20 54 2c 73 63  72 65 65 6e 0d 03 52 12  |ADR T,screen..R.|
00000810  4c 44 4d 49 41 20 54 2c  7b 4f 2c 43 54 7d 0d 03  |LDMIA T,{O,CT}..|
00000820  5c 11 52 53 42 20 54 2c  59 31 2c 23 32 35 35 0d  |\.RSB T,Y1,#255.|
00000830  03 66 14 41 44 44 20 54  2c 54 2c 54 2c 4c 53 4c  |.f.ADD T,T,T,LSL|
00000840  20 23 32 0d 03 70 15 41  44 44 20 54 2c 58 31 2c  | #2..p.ADD T,X1,|
00000850  54 2c 4c 53 4c 20 23 36  0d 03 7a 0d 41 44 44 20  |T,LSL #6..z.ADD |
00000860  4f 2c 4f 2c 54 0d 03 84  0f 53 55 42 20 41 2c 58  |O,O,T....SUB A,X|
00000870  32 2c 58 31 0d 03 8e 0f  53 55 42 20 42 2c 59 32  |2,X1....SUB B,Y2|
00000880  2c 59 31 0d 03 98 0d 4d  4f 56 20 4c 4c 2c 23 31  |,Y1....MOV LL,#1|
00000890  0d 03 a2 0f 4d 4f 56 20  52 52 2c 23 33 32 30 0d  |....MOV RR,#320.|
000008a0  03 ac 10 52 53 42 20 52  52 2c 52 52 2c 23 30 0d  |...RSB RR,RR,#0.|
000008b0  03 b6 0c 43 4d 50 20 41  2c 23 30 0d 03 c0 11 20  |...CMP A,#0.... |
000008c0  52 53 42 4c 54 20 41 2c  41 2c 23 30 0d 03 ca 13  |RSBLT A,A,#0....|
000008d0  20 52 53 42 4c 54 20 4c  4c 2c 4c 4c 2c 23 30 0d  | RSBLT LL,LL,#0.|
000008e0  03 d4 0c 43 4d 50 20 42  2c 23 30 0d 03 de 11 20  |...CMP B,#0.... |
000008f0  52 53 42 4c 54 20 42 2c  42 2c 23 30 0d 03 e8 13  |RSBLT B,B,#0....|
00000900  20 52 53 42 4c 54 20 52  52 2c 52 52 2c 23 30 0d  | RSBLT RR,RR,#0.|
00000910  03 f2 0b 43 4d 50 20 41  2c 42 0d 03 fc 0e 20 4d  |...CMP A,B.... M|
00000920  4f 56 4c 54 20 54 2c 41  0d 04 06 0e 20 4d 4f 56  |OVLT T,A.... MOV|
00000930  4c 54 20 41 2c 42 0d 04  10 0e 20 4d 4f 56 4c 54  |LT A,B.... MOVLT|
00000940  20 42 2c 54 0d 04 1a 0f  20 4d 4f 56 4c 54 20 54  | B,T.... MOVLT T|
00000950  2c 4c 4c 0d 04 24 10 20  4d 4f 56 4c 54 20 4c 4c  |,LL..$. MOVLT LL|
00000960  2c 52 52 0d 04 2e 0f 20  4d 4f 56 4c 54 20 52 52  |,RR.... MOVLT RR|
00000970  2c 54 0d 04 38 0e 53 54  52 42 20 43 2c 5b 4f 5d  |,T..8.STRB C,[O]|
00000980  0d 04 42 0c 43 4d 50 20  41 2c 23 30 0d 04 4c 0e  |..B.CMP A,#0..L.|
00000990  20 ec 51 20 50 43 2c 52  31 34 0d 04 56 17 4c 44  | .Q PC,R14..V.LD|
000009a0  52 20 54 2c 5b 44 54 2c  41 2c 4c 53 4c 20 23 32  |R T,[DT,A,LSL #2|
000009b0  5d 0d 04 60 0d 4d 55 4c  20 42 2c 54 2c 42 0d 04  |]..`.MUL B,T,B..|
000009c0  6a 10 4d 4f 56 20 44 2c  23 31 3c 3c 32 30 0d 04  |j.MOV D,#1<<20..|
000009d0  74 0e 2e 6c 69 6e 65 5f  6c 6f 6f 70 0d 04 7e 0e  |t..line_loop..~.|
000009e0  53 55 42 53 20 44 2c 44  2c 42 0d 04 88 14 41 44  |SUBS D,D,B....AD|
000009f0  44 4c 45 20 44 2c 44 2c  23 31 3c 3c 32 30 0d 04  |DLE D,D,#1<<20..|
00000a00  92 10 41 44 44 4c 45 20  4f 2c 4f 2c 52 52 0d 04  |..ADDLE O,O,RR..|
00000a10  9c 13 52 53 42 20 20 54  2c 44 2c 23 31 3c 3c 32  |..RSB  T,D,#1<<2|
00000a20  30 0d 04 a6 19 4c 44 52  42 20 43 2c 5b 43 54 2c  |0....LDRB C,[CT,|
00000a30  54 2c 4c 53 52 20 23 31  37 5d 0d 04 b0 12 53 54  |T,LSR #17]....ST|
00000a40  52 42 20 43 2c 5b 4f 2c  4c 4c 5d 21 0d 04 ba 19  |RB C,[O,LL]!....|
00000a50  4c 44 52 42 20 43 2c 5b  43 54 2c 44 2c 4c 53 52  |LDRB C,[CT,D,LSR|
00000a60  20 23 31 37 5d 0d 04 c4  11 53 54 52 42 20 43 2c  | #17]....STRB C,|
00000a70  5b 4f 2c 52 52 5d 0d 04  ce 0f 53 55 42 53 20 41  |[O,RR]....SUBS A|
00000a80  2c 41 2c 23 31 0d 04 d8  11 42 4e 45 20 6c 69 6e  |,A,#1....BNE lin|
00000a90  65 5f 6c 6f 6f 70 0d 04  e2 0e 4d 4f 56 20 50 43  |e_loop....MOV PC|
00000aa0  2c 52 31 34 0d 04 ec 44  5c 2d 2d 2d 2d 2d 2d 2d  |,R14...D\-------|
00000ab0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000ae0  2d 2d 2d 2d 2d 2d 2d 2d  0d 04 f6 05 5d 0d 05 00  |--------....]...|
00000af0  05 ed 0d 05 0a 0c 2a 50  4f 49 4e 54 45 52 0d 05  |......*POINTER..|
00000b00  14 15 c8 97 20 ee 3a c8  97 20 b8 20 36 34 30 2c  |.... .:.. . 640,|
00000b10  35 31 32 0d 05 1e 07 4d  3d 32 0d 05 28 11 41 25  |512....M=2..(.A%|
00000b20  3d 31 36 30 3a 42 25 3d  31 32 38 0d 05 32 04 0d  |=160:B%=128..2..|
00000b30  05 3c 18 e3 20 44 48 3d  30 20 b8 20 33 30 30 30  |.<.. DH=0 . 3000|
00000b40  30 20 88 20 30 2e 39 0d  05 46 18 c8 99 20 22 4f  |0 . 0.9..F... "O|
00000b50  53 5f 42 79 74 65 22 2c  26 37 30 2c 4d 3a db 0d  |S_Byte",&70,M:..|
00000b60  05 50 11 41 4c 49 41 53  3d 44 48 20 80 20 33 32  |.P.ALIAS=DH . 32|
00000b70  0d 05 5a 40 e7 20 41 4c  49 41 53 20 8c 20 f1 20  |..Z@. ALIAS . . |
00000b80  22 57 49 54 48 20 61 6e  74 69 2d 61 6c 69 61 73  |"WITH anti-alias|
00000b90  69 6e 67 22 20 8b 20 f1  20 22 57 49 54 48 4f 55  |ing" . . "WITHOU|
00000ba0  54 20 61 6e 74 69 2d 61  6c 69 61 73 69 6e 67 22  |T anti-aliasing"|
00000bb0  0d 05 64 09 d6 20 73 65  74 0d 05 6e 0f c8 97 20  |..d.. set..n... |
00000bc0  58 25 2c 59 25 2c 5a 25  0d 05 78 11 41 25 3d 58  |X%,Y%,Z%..x.A%=X|
00000bd0  25 2d 36 34 30 2b 31 36  30 0d 05 82 11 42 25 3d  |%-640+160....B%=|
00000be0  59 25 2d 35 31 32 2b 31  32 38 0d 05 8c 14 e3 20  |Y%-512+128..... |
00000bf0  48 3d 30 20 b8 20 33 35  30 20 88 20 31 30 0d 05  |H=0 . 350 . 10..|
00000c00  96 0d 52 3d b2 28 48 2b  44 48 29 0d 05 a0 18 43  |..R=.(H+DH)....C|
00000c10  25 3d 31 30 30 2a 9b 52  2b 58 25 2d 36 34 30 2b  |%=100*.R+X%-640+|
00000c20  31 36 30 0d 05 aa 18 44  25 3d 31 30 30 2a b5 52  |160....D%=100*.R|
00000c30  2b 59 25 2d 35 31 32 2b  31 32 38 0d 05 b4 2c e7  |+Y%-512+128...,.|
00000c40  20 41 4c 49 41 53 20 8c  20 d6 20 6c 69 6e 65 20  | ALIAS . . line |
00000c50  8b 20 86 20 34 2a 41 25  2c 34 2a 42 25 2c 34 2a  |. . 4*A%,4*B%,4*|
00000c60  43 25 2c 34 2a 44 25 0d  05 be 05 ed 0d 05 c8 20  |C%,4*D%........ |
00000c70  c8 96 3a c8 99 20 22 4f  53 5f 42 79 74 65 22 2c  |..:.. "OS_Byte",|
00000c80  26 37 31 2c 4d 3a 4d 3d  4d 20 82 33 0d 05 d2 05  |&71,M:M=M .3....|
00000c90  ed 0d 05 dc 04 0d 05 e6  04 0d 05 f0 0c 2a 50 4f  |.............*PO|
00000ca0  49 4e 54 45 52 0d 05 fa  15 c8 97 20 ee 3a c8 97  |INTER...... .:..|
00000cb0  20 b8 20 38 30 30 2c 35  31 32 0d 06 04 05 f5 0d  | . 800,512......|
00000cc0  06 0e 18 c8 99 20 22 4f  53 5f 42 79 74 65 22 2c  |..... "OS_Byte",|
00000cd0  26 37 30 2c 4d 3a db 0d  06 18 0f c8 97 20 58 25  |&70,M:....... X%|
00000ce0  2c 59 25 2c 5a 25 0d 06  22 0b 43 25 3d 58 25 2f  |,Y%,Z%..".C%=X%/|
00000cf0  34 0d 06 2c 0b 44 25 3d  59 25 2f 34 0d 06 36 09  |4..,.D%=Y%/4..6.|
00000d00  d6 20 73 65 74 0d 06 40  0a d6 20 6c 69 6e 65 0d  |. set..@.. line.|
00000d10  06 4a 21 c8 96 3a c8 99  20 22 4f 53 5f 42 79 74  |.J!..:.. "OS_Byt|
00000d20  65 22 2c 26 37 31 2c 4d  3a 4d 3d 4d 20 82 20 33  |e",&71,M:M=M . 3|
00000d30  0d 06 54 07 fd 20 30 0d  06 5e 05 e0 0d ff        |..T.. 0..^....|
00000d3e