Home » CEEFAX disks » telesoftware12.adl » 10-02-89/Graphic

10-02-89/Graphic

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 » CEEFAX disks » telesoftware12.adl
Filename: 10-02-89/Graphic
Read OK:
File size: 13A1 bytes
Load address: 0800
Exec address: 802B
File contents
   10REM> GRAPHIC
   20ON ERROR VDU23,1,1;0;0;0;:END
   30A%=&EA
   40X%=0
   50Y%=&FF
   60IF ((USR(&FFF4)AND&FF00)DIV&100)<>0 END
   70DIM mcode &100
   80PROCmcode
   90mode=2
  100divisor=4
  110paper=6
  120ink=4
  130MODE mode
  140PROCnewmode
  150REPEAT
  160REPEAT
  170oldx=newx
  180oldy=newy
  190CALL mcode
  200PRINTTAB(11,1);!xcoord;"   "TAB(11,2);!ycoord;"   "
  210newx=newx+((!xcoord-newx)DIV divisor)
  220newy=newy+((!ycoord-newy)DIV divisor)
  230IF FNswitch PLOT69,oldx,oldy:PLOT69,newx,newy ELSE PLOT13,newx,newy
  240UNTIL FNswitch
  250IF INKEY(-58) PROCup:MODE mode:PROCnewmode
  260IF INKEY(-42) PROCdown:MODE mode:PROCnewmode
  270IF INKEY(-85) PROChigh
  280IF INKEY(-87) PROClow
  290IF INKEY(-56) PROCpaper
  300IF INKEY(-38) PROCink
  310IF INKEY(-26) PROCleft
  320IF INKEY(-122) PROCright
  330IF INKEY(-74) PROCscroll
  340UNTIL FALSE
  350:
  360DEFPROCscroll
  370PRINTTAB(0,31)
  380PROCdelay
  390ENDPROC
  400:
  410DEFPROCup
  420mode=mode+1
  430IF mode=3 mode=4
  440IF mode>5 mode=5
  450ENDPROC
  460:
  470DEFPROCdown
  480mode=mode-1
  490IF mode=3 mode=2
  500IF mode<0 mode=0
  510ENDPROC
  520:
  530DEFPROCleft
  540IF offsetlow?mode=12 ENDPROC
  550offsetlow?mode=offsetlow?mode+1
  560PROCdelay
  570ENDPROC
  580:
  590DEFPROCright
  600IF offsetlow?mode=0 ENDPROC
  610offsetlow?mode=offsetlow?mode-1
  620PROCdelay
  630ENDPROC
  640:
  650DEFPROCnewmode
  660VDU23,1,0;0;0;0;
  670VDU19,0,paper;0;
  680VDU19,1,ink;0;
  690GCOL3,1
  700COLOUR1
  710newx=-1
  720newy=-1
  730oldx=-1
  740oldy=-1
  750PROCdelay
  760ENDPROC
  770:
  780DEFPROClow
  790IF divisor>1 divisor=divisor DIV 2
  800PROCdelay
  810ENDPROC
  820:
  830DEFPROChigh
  840IF divisor<8 divisor=divisor*2
  850PROCdelay
  860ENDPROC
  870:
  880DEFPROCdelay
  890PRINTTAB(1,0)"Mode ";mode;SPC(8)
  900PRINTTAB(1,1)"X coord = "
  910PRINTTAB(1,2)"Y coord = "
  920PRINTTAB(1,3)"divisor = ";divisor;"  "
  930PRINTTAB(1,4)"offsetlow = ";offsetlow?mode
  940time=TIME+20
  950REPEAT UNTIL time<TIME
  960ENDPROC
  970:
  980DEFPROCink
  990ink=ink+1
 1000IF ink=paper ink=ink+1
 1010IF ink>7 ink=0
 1020VDU19,1,ink;0;
 1030PROCdelay
 1040ENDPROC
 1050:
 1060DEFPROCpaper
 1070paper=paper+1
 1080IF paper=ink paper=paper+1
 1090IF paper>7 paper=0
 1100VDU19,0,paper;0;
 1110PROCdelay
 1120ENDPROC
 1130:
 1140DEFPROCmcode
 1150xcoord=&70 :REM: &70-&73
 1160ycoord=&74 :REM: &74-&77
 1170start=&350 :REM: screen start address
 1180screen=&355 :REM: screen mode
 1190sheila=&FE00
 1200FOR pass=0 TO 2 STEP 2
 1210P%=mcode
 1220[OPT pass
 1230LDA #&00
 1240LDX #&07
 1250.initloop
 1260STA xcoord,X \ &70-&77 = #&00
 1270DEX
 1280BPL initloop
 1290LDY screen \ screen mode into Y register
 1300CPY #&06 \ is this mode 6 or 7?
 1310BCS return \ exit if non-graphics mode
 1320CPY #&03 \ is this mode 3?
 1330BNE carryon \ exit if non-graphics mode
 1340.return
 1350RTS \ return to BASIC if non-graphics mode
 1360.carryon
 1370LDA start \ screen start address, low byte
 1380STA ycoord
 1390LDA start+1 \ screen start address, high byte
 1400STA ycoord+1
 1410LSR ycoord+1
 1420ROR ycoord \ start address DIV 2
 1430LSR ycoord+1
 1440ROR ycoord \ start address DIV 4
 1450LSR ycoord+1
 1460ROR ycoord \ start address DIV 8
 1470LDA offsetlow,Y \ trim the offset
 1480CLD \ clear decimal flag
 1490CLC \ prepare for addition
 1500ADC ycoord \ add trim to offset
 1510STA ycoord
 1520LDA #&00
 1530ADC ycoord+1
 1540STA ycoord+1
 1550SEC \ prepare to subtract offset from light pen register
 1560LDX #&11 \ light pen register, low byte
 1570STX sheila \ 6845 address register
 1580LDA sheila+1 \ 6845 data register
 1590SBC ycoord \ subtract offset, low byte
 1600STA ycoord \ low byte - offset
 1610DEX \ X = #&10
 1620STX sheila \ 6845 address register
 1630LDA sheila+1 \ 6845 data register
 1640SBC ycoord+1 \ subtract offset, high byte
 1650STA ycoord+1 \ high byte - offset
 1660.next
 1670ASL ycoord \ shift dividend/quotient left
 1680ROL ycoord+1 \ shift dividend/quotient left
 1690ROL xcoord \ shift bits into partial dividend
 1700LDA xcoord \ load partial dividend
 1710SEC \ prepare for subtraction
 1720SBC width,Y \ subtract divisor
 1730BCC done \ branch if dividend < divisor
 1740INC ycoord \ increment quotient
 1750STA xcoord \ save new partial dividend
 1760.done
 1770DEX \ decrement bit counter
 1780BNE next \ branch for 16 bits
 1790LDA xloop,Y \ prepare for multiplication
 1800TAX \ X=4 modes 0-3, X=5 modes 4-7
 1810.multx
 1820ASL xcoord \ low byte * 2
 1830ROL xcoord+1 \ high byte * 2
 1840DEX \ count number of multiplications
 1850BNE multx \ go back if not finished
 1860LDA xadd,Y \ A=8 modes 0-3, A=16 modes 4-7
 1870CLC \ prepare for addition
 1880ADC xcoord
 1890STA xcoord
 1900LDA #&00
 1910ADC xcoord+1
 1920CMP #&05 \ max value = 4
 1930BCC inrange
 1940LDA #&02 \ dummy value
 1950.inrange
 1960STA xcoord+1
 1970LDX #&05 \ prepare for y coordinate multiplication
 1980.multy
 1990ASL ycoord \ low byte * 2
 2000ROL ycoord+1 \ high byte * 2
 2010DEX \ count number of multiplications
 2020BNE multy \ go back if not finished
 2030SEC \ prepare for subtraction
 2040LDA #&F0 \ low byte of decimal 1008
 2050SBC ycoord \ ycoord-#&F0
 2060STA ycoord
 2070LDA #&03 \ high byte of decimal 1008
 2080SBC ycoord+1 \ (ycoord+1)-#&03
 2090AND #&03 \ max value = 3
 2100STA ycoord+1
 2110RTS \ return to BASIC
 2120.offsetlow
 2130EQUB &04 \ mode0, untrimmed = &06
 2140EQUB &04 \ mode1, untrimmed = &06
 2150EQUB &04 \ mode2, untrimmed = &06
 2160EQUB &00 \ mode3, dummy value
 2170EQUB &03 \ mode4, untrimmed = &04
 2180EQUB &03 \ mode5, untrimmed = &04
 2190.xloop
 2200EQUD &00040404 \ modes 3-0
 2210EQUW &0505 \ modes 5-4
 2220.xadd
 2230EQUD &00080808 \ modes 3-0
 2240EQUW &1010 \ modes 5-4
 2250.width
 2260EQUD &00505050 \ modes 3-0
 2270EQUW &2828 \ modes 5-4
 2280.lastbyte
 2290]
 2300NEXT
 2310ENDPROC
 2320:
 2330DEFFNswitch
 2340IF (ADVAL(0)AND3)=0 IF !xcoord>16 IF !xcoord<1248 =FALSE
 2350=TRUE

�> GRAPHIC
� � �23,1,1;0;0;0;:�

A%=&EA
(X%=0
2
Y%=&FF
<"� ((�(&FFF4)�&FF00)�&100)<>0 �
F� mcode &100
P
�mcode
Z
mode=2
d
divisor=4
npaper=6
x	ink=4
�
� mode
��newmode
��
��
�
oldx=newx
�
oldy=newy
�� mcode
�-�11,1);!xcoord;"   "�11,2);!ycoord;"   "
�'newx=newx+((!xcoord-newx)� divisor)
�'newy=newy+((!ycoord-newy)� divisor)
�9� �switch �69,oldx,oldy:�69,newx,newy � �13,newx,newy
�
� �switch
� � �(-58) �up:� mode:�newmode
"� �(-42) �down:� mode:�newmode
� �(-85) �high
� �(-87) �low
"� �(-56) �paper
,� �(-38) �ink
6� �(-26) �left
@� �(-122) �right
J� �(-74) �scroll
T� �
^:
h��scroll
r�0,31)
|
�delay
��
�:
���up
�mode=mode+1
�� mode=3 mode=4
�� mode>5 mode=5
��
�:
�
��down
�mode=mode-1
�� mode=3 mode=2
�� mode<0 mode=0
��
:

��left
� offsetlow?mode=12 �
&#offsetlow?mode=offsetlow?mode+1
0
�delay
:�
D:
N��right
X� offsetlow?mode=0 �
b#offsetlow?mode=offsetlow?mode-1
l
�delay
v�
�:
�
��newmode
��23,1,0;0;0;0;
��19,0,paper;0;
��19,1,ink;0;
��3,1
��1
�newx=-1
�newy=-1
�oldx=-1
�oldy=-1
�
�delay
��
:
	��low
#� divisor>1 divisor=divisor � 2
 
�delay
*�
4:
>
��high
H!� divisor<8 divisor=divisor*2
R
�delay
\�
f:
p��delay
z�1,0)"Mode ";mode;�(8)
��1,1)"X coord = "
��1,2)"Y coord = "
�#�1,3)"divisor = ";divisor;"  "
�'�1,4)"offsetlow = ";offsetlow?mode
�
time=�+20
�� � time<�
��
�:
�	��ink
�
ink=ink+1
�� ink=paper ink=ink+1
�� ink>7 ink=0
��19,1,ink;0;

�delay
�
:
$��paper
.paper=paper+1
8� paper=ink paper=paper+1
B� paper>7 paper=0
L�19,0,paper;0;
V
�delay
`�
j:
t��mcode
~xcoord=&70 :�: &70-&73
�ycoord=&74 :�: &74-&77
�'start=&350 :�: screen start address
�screen=&355 :�: screen mode
�sheila=&FE00
�� pass=0 � 2 � 2
�P%=mcode
�
[OPT pass
�LDA #&00
�LDX #&07
�
.initloop
�!STA xcoord,X \ &70-&77 = #&00
�DEX
BPL initloop

,LDY screen \ screen mode into Y register
#CPY #&06 \ is this mode 6 or 7?
*BCS return \ exit if non-graphics mode
(CPY #&03 \ is this mode 3?
2+BNE carryon \ exit if non-graphics mode
<.return
F.RTS \ return to BASIC if non-graphics mode
P.carryon
Z.LDA start \ screen start address, low byte
dSTA ycoord
n1LDA start+1 \ screen start address, high byte
xSTA ycoord+1
�LSR ycoord+1
�"ROR ycoord \ start address � 2
�LSR ycoord+1
�"ROR ycoord \ start address � 4
�LSR ycoord+1
�"ROR ycoord \ start address � 8
�%LDA offsetlow,Y \ trim the offset
�CLD \ clear decimal flag
�CLC \ prepare for addition
�#ADC ycoord \ add trim to offset
�STA ycoord
�LDA #&00
�ADC ycoord+1
STA ycoord+1
<SEC \ prepare to subtract offset from light pen register
+LDX #&11 \ light pen register, low byte
"&STX sheila \ 6845 address register
,%LDA sheila+1 \ 6845 data register
6*SBC ycoord \ subtract offset, low byte
@"STA ycoord \ low byte - offset
JDEX \ X = #&10
T&STX sheila \ 6845 address register
^%LDA sheila+1 \ 6845 data register
h-SBC ycoord+1 \ subtract offset, high byte
r%STA ycoord+1 \ high byte - offset
|	.next
�-ASL ycoord \ shift dividend/quotient left
�/ROL ycoord+1 \ shift dividend/quotient left
�1ROL xcoord \ shift bits into partial dividend
�&LDA xcoord \ load partial dividend
�!SEC \ prepare for subtraction
�"SBC width,Y \ subtract divisor
�+BCC done \ branch if dividend < divisor
�#INC ycoord \ increment quotient
�*STA xcoord \ save new partial dividend
�	.done
�DEX \ decrement bit counter
�!BNE next \ branch for 16 bits
�,LDA xloop,Y \ prepare for multiplication
&TAX \ X=4 modes 0-3, X=5 modes 4-7

.multx
ASL xcoord \ low byte * 2
& ROL xcoord+1 \ high byte * 2
0)DEX \ count number of multiplications
:'BNE multx \ go back if not finished
D.LDA xadd,Y \ A=8 modes 0-3, A=16 modes 4-7
NCLC \ prepare for addition
XADC xcoord
bSTA xcoord
lLDA #&00
vADC xcoord+1
�CMP #&05 \ max value = 4
�BCC inrange
�LDA #&02 \ dummy value
�.inrange
�STA xcoord+1
�6LDX #&05 \ prepare for y coordinate multiplication
�
.multy
�ASL ycoord \ low byte * 2
� ROL ycoord+1 \ high byte * 2
�)DEX \ count number of multiplications
�'BNE multy \ go back if not finished
�!SEC \ prepare for subtraction
�'LDA #&F0 \ low byte of decimal 1008
SBC ycoord \ ycoord-#&F0
STA ycoord
(LDA #&03 \ high byte of decimal 1008
 "SBC ycoord+1 \ (ycoord+1)-#&03
*� #&03 \ max value = 3
4STA ycoord+1
>RTS \ return to BASIC
H.offsetlow
R%EQUB &04 \ mode0, untrimmed = &06
\%EQUB &04 \ mode1, untrimmed = &06
f%EQUB &04 \ mode2, untrimmed = &06
p!EQUB &00 \ mode3, dummy value
z%EQUB &03 \ mode4, untrimmed = &04
�%EQUB &03 \ mode5, untrimmed = &04
�
.xloop
�EQUD &00040404 \ modes 3-0
�EQUW &0505 \ modes 5-4
�	.xadd
�EQUD &00080808 \ modes 3-0
�EQUW &1010 \ modes 5-4
�
.width
�EQUD &00505050 \ modes 3-0
�EQUW &2828 \ modes 5-4
�
.lastbyte
�]
��
	�
	:
	ݤswitch
	$/� (�(0)�3)=0 � !xcoord>16 � !xcoord<1248 =�
	.=�
�
00000000  0d 00 0a 0e f4 3e 20 47  52 41 50 48 49 43 0d 00  |.....> GRAPHIC..|
00000010  14 18 ee 20 85 20 ef 32  33 2c 31 2c 31 3b 30 3b  |... . .23,1,1;0;|
00000020  30 3b 30 3b 3a e0 0d 00  1e 0a 41 25 3d 26 45 41  |0;0;:.....A%=&EA|
00000030  0d 00 28 08 58 25 3d 30  0d 00 32 0a 59 25 3d 26  |..(.X%=0..2.Y%=&|
00000040  46 46 0d 00 3c 22 e7 20  28 28 ba 28 26 46 46 46  |FF..<". ((.(&FFF|
00000050  34 29 80 26 46 46 30 30  29 81 26 31 30 30 29 3c  |4).&FF00).&100)<|
00000060  3e 30 20 e0 0d 00 46 10  de 20 6d 63 6f 64 65 20  |>0 ...F.. mcode |
00000070  26 31 30 30 0d 00 50 0a  f2 6d 63 6f 64 65 0d 00  |&100..P..mcode..|
00000080  5a 0a 6d 6f 64 65 3d 32  0d 00 64 0d 64 69 76 69  |Z.mode=2..d.divi|
00000090  73 6f 72 3d 34 0d 00 6e  0b 70 61 70 65 72 3d 36  |sor=4..n.paper=6|
000000a0  0d 00 78 09 69 6e 6b 3d  34 0d 00 82 0a eb 20 6d  |..x.ink=4..... m|
000000b0  6f 64 65 0d 00 8c 0c f2  6e 65 77 6d 6f 64 65 0d  |ode.....newmode.|
000000c0  00 96 05 f5 0d 00 a0 05  f5 0d 00 aa 0d 6f 6c 64  |.............old|
000000d0  78 3d 6e 65 77 78 0d 00  b4 0d 6f 6c 64 79 3d 6e  |x=newx....oldy=n|
000000e0  65 77 79 0d 00 be 0b d6  20 6d 63 6f 64 65 0d 00  |ewy..... mcode..|
000000f0  c8 2d f1 8a 31 31 2c 31  29 3b 21 78 63 6f 6f 72  |.-..11,1);!xcoor|
00000100  64 3b 22 20 20 20 22 8a  31 31 2c 32 29 3b 21 79  |d;"   ".11,2);!y|
00000110  63 6f 6f 72 64 3b 22 20  20 20 22 0d 00 d2 27 6e  |coord;"   "...'n|
00000120  65 77 78 3d 6e 65 77 78  2b 28 28 21 78 63 6f 6f  |ewx=newx+((!xcoo|
00000130  72 64 2d 6e 65 77 78 29  81 20 64 69 76 69 73 6f  |rd-newx). diviso|
00000140  72 29 0d 00 dc 27 6e 65  77 79 3d 6e 65 77 79 2b  |r)...'newy=newy+|
00000150  28 28 21 79 63 6f 6f 72  64 2d 6e 65 77 79 29 81  |((!ycoord-newy).|
00000160  20 64 69 76 69 73 6f 72  29 0d 00 e6 39 e7 20 a4  | divisor)...9. .|
00000170  73 77 69 74 63 68 20 f0  36 39 2c 6f 6c 64 78 2c  |switch .69,oldx,|
00000180  6f 6c 64 79 3a f0 36 39  2c 6e 65 77 78 2c 6e 65  |oldy:.69,newx,ne|
00000190  77 79 20 8b 20 f0 31 33  2c 6e 65 77 78 2c 6e 65  |wy . .13,newx,ne|
000001a0  77 79 0d 00 f0 0d fd 20  a4 73 77 69 74 63 68 0d  |wy..... .switch.|
000001b0  00 fa 20 e7 20 a6 28 2d  35 38 29 20 f2 75 70 3a  |.. . .(-58) .up:|
000001c0  eb 20 6d 6f 64 65 3a f2  6e 65 77 6d 6f 64 65 0d  |. mode:.newmode.|
000001d0  01 04 22 e7 20 a6 28 2d  34 32 29 20 f2 64 6f 77  |..". .(-42) .dow|
000001e0  6e 3a eb 20 6d 6f 64 65  3a f2 6e 65 77 6d 6f 64  |n:. mode:.newmod|
000001f0  65 0d 01 0e 12 e7 20 a6  28 2d 38 35 29 20 f2 68  |e..... .(-85) .h|
00000200  69 67 68 0d 01 18 11 e7  20 a6 28 2d 38 37 29 20  |igh..... .(-87) |
00000210  f2 6c 6f 77 0d 01 22 13  e7 20 a6 28 2d 35 36 29  |.low..".. .(-56)|
00000220  20 f2 70 61 70 65 72 0d  01 2c 11 e7 20 a6 28 2d  | .paper..,.. .(-|
00000230  33 38 29 20 f2 69 6e 6b  0d 01 36 12 e7 20 a6 28  |38) .ink..6.. .(|
00000240  2d 32 36 29 20 f2 6c 65  66 74 0d 01 40 14 e7 20  |-26) .left..@.. |
00000250  a6 28 2d 31 32 32 29 20  f2 72 69 67 68 74 0d 01  |.(-122) .right..|
00000260  4a 14 e7 20 a6 28 2d 37  34 29 20 f2 73 63 72 6f  |J.. .(-74) .scro|
00000270  6c 6c 0d 01 54 07 fd 20  a3 0d 01 5e 05 3a 0d 01  |ll..T.. ...^.:..|
00000280  68 0c dd f2 73 63 72 6f  6c 6c 0d 01 72 0b f1 8a  |h...scroll..r...|
00000290  30 2c 33 31 29 0d 01 7c  0a f2 64 65 6c 61 79 0d  |0,31)..|..delay.|
000002a0  01 86 05 e1 0d 01 90 05  3a 0d 01 9a 08 dd f2 75  |........:......u|
000002b0  70 0d 01 a4 0f 6d 6f 64  65 3d 6d 6f 64 65 2b 31  |p....mode=mode+1|
000002c0  0d 01 ae 13 e7 20 6d 6f  64 65 3d 33 20 6d 6f 64  |..... mode=3 mod|
000002d0  65 3d 34 0d 01 b8 13 e7  20 6d 6f 64 65 3e 35 20  |e=4..... mode>5 |
000002e0  6d 6f 64 65 3d 35 0d 01  c2 05 e1 0d 01 cc 05 3a  |mode=5.........:|
000002f0  0d 01 d6 0a dd f2 64 6f  77 6e 0d 01 e0 0f 6d 6f  |......down....mo|
00000300  64 65 3d 6d 6f 64 65 2d  31 0d 01 ea 13 e7 20 6d  |de=mode-1..... m|
00000310  6f 64 65 3d 33 20 6d 6f  64 65 3d 32 0d 01 f4 13  |ode=3 mode=2....|
00000320  e7 20 6d 6f 64 65 3c 30  20 6d 6f 64 65 3d 30 0d  |. mode<0 mode=0.|
00000330  01 fe 05 e1 0d 02 08 05  3a 0d 02 12 0a dd f2 6c  |........:......l|
00000340  65 66 74 0d 02 1c 19 e7  20 6f 66 66 73 65 74 6c  |eft..... offsetl|
00000350  6f 77 3f 6d 6f 64 65 3d  31 32 20 e1 0d 02 26 23  |ow?mode=12 ...&#|
00000360  6f 66 66 73 65 74 6c 6f  77 3f 6d 6f 64 65 3d 6f  |offsetlow?mode=o|
00000370  66 66 73 65 74 6c 6f 77  3f 6d 6f 64 65 2b 31 0d  |ffsetlow?mode+1.|
00000380  02 30 0a f2 64 65 6c 61  79 0d 02 3a 05 e1 0d 02  |.0..delay..:....|
00000390  44 05 3a 0d 02 4e 0b dd  f2 72 69 67 68 74 0d 02  |D.:..N...right..|
000003a0  58 18 e7 20 6f 66 66 73  65 74 6c 6f 77 3f 6d 6f  |X.. offsetlow?mo|
000003b0  64 65 3d 30 20 e1 0d 02  62 23 6f 66 66 73 65 74  |de=0 ...b#offset|
000003c0  6c 6f 77 3f 6d 6f 64 65  3d 6f 66 66 73 65 74 6c  |low?mode=offsetl|
000003d0  6f 77 3f 6d 6f 64 65 2d  31 0d 02 6c 0a f2 64 65  |ow?mode-1..l..de|
000003e0  6c 61 79 0d 02 76 05 e1  0d 02 80 05 3a 0d 02 8a  |lay..v......:...|
000003f0  0d dd f2 6e 65 77 6d 6f  64 65 0d 02 94 12 ef 32  |...newmode.....2|
00000400  33 2c 31 2c 30 3b 30 3b  30 3b 30 3b 0d 02 9e 12  |3,1,0;0;0;0;....|
00000410  ef 31 39 2c 30 2c 70 61  70 65 72 3b 30 3b 0d 02  |.19,0,paper;0;..|
00000420  a8 10 ef 31 39 2c 31 2c  69 6e 6b 3b 30 3b 0d 02  |...19,1,ink;0;..|
00000430  b2 08 e6 33 2c 31 0d 02  bc 06 fb 31 0d 02 c6 0b  |...3,1.....1....|
00000440  6e 65 77 78 3d 2d 31 0d  02 d0 0b 6e 65 77 79 3d  |newx=-1....newy=|
00000450  2d 31 0d 02 da 0b 6f 6c  64 78 3d 2d 31 0d 02 e4  |-1....oldx=-1...|
00000460  0b 6f 6c 64 79 3d 2d 31  0d 02 ee 0a f2 64 65 6c  |.oldy=-1.....del|
00000470  61 79 0d 02 f8 05 e1 0d  03 02 05 3a 0d 03 0c 09  |ay.........:....|
00000480  dd f2 6c 6f 77 0d 03 16  23 e7 20 64 69 76 69 73  |..low...#. divis|
00000490  6f 72 3e 31 20 64 69 76  69 73 6f 72 3d 64 69 76  |or>1 divisor=div|
000004a0  69 73 6f 72 20 81 20 32  0d 03 20 0a f2 64 65 6c  |isor . 2.. ..del|
000004b0  61 79 0d 03 2a 05 e1 0d  03 34 05 3a 0d 03 3e 0a  |ay..*....4.:..>.|
000004c0  dd f2 68 69 67 68 0d 03  48 21 e7 20 64 69 76 69  |..high..H!. divi|
000004d0  73 6f 72 3c 38 20 64 69  76 69 73 6f 72 3d 64 69  |sor<8 divisor=di|
000004e0  76 69 73 6f 72 2a 32 0d  03 52 0a f2 64 65 6c 61  |visor*2..R..dela|
000004f0  79 0d 03 5c 05 e1 0d 03  66 05 3a 0d 03 70 0b dd  |y..\....f.:..p..|
00000500  f2 64 65 6c 61 79 0d 03  7a 1b f1 8a 31 2c 30 29  |.delay..z...1,0)|
00000510  22 4d 6f 64 65 20 22 3b  6d 6f 64 65 3b 89 28 38  |"Mode ";mode;.(8|
00000520  29 0d 03 84 16 f1 8a 31  2c 31 29 22 58 20 63 6f  |)......1,1)"X co|
00000530  6f 72 64 20 3d 20 22 0d  03 8e 16 f1 8a 31 2c 32  |ord = "......1,2|
00000540  29 22 59 20 63 6f 6f 72  64 20 3d 20 22 0d 03 98  |)"Y coord = "...|
00000550  23 f1 8a 31 2c 33 29 22  64 69 76 69 73 6f 72 20  |#..1,3)"divisor |
00000560  3d 20 22 3b 64 69 76 69  73 6f 72 3b 22 20 20 22  |= ";divisor;"  "|
00000570  0d 03 a2 27 f1 8a 31 2c  34 29 22 6f 66 66 73 65  |...'..1,4)"offse|
00000580  74 6c 6f 77 20 3d 20 22  3b 6f 66 66 73 65 74 6c  |tlow = ";offsetl|
00000590  6f 77 3f 6d 6f 64 65 0d  03 ac 0d 74 69 6d 65 3d  |ow?mode....time=|
000005a0  91 2b 32 30 0d 03 b6 0e  f5 20 fd 20 74 69 6d 65  |.+20..... . time|
000005b0  3c 91 0d 03 c0 05 e1 0d  03 ca 05 3a 0d 03 d4 09  |<..........:....|
000005c0  dd f2 69 6e 6b 0d 03 de  0d 69 6e 6b 3d 69 6e 6b  |..ink....ink=ink|
000005d0  2b 31 0d 03 e8 19 e7 20  69 6e 6b 3d 70 61 70 65  |+1..... ink=pape|
000005e0  72 20 69 6e 6b 3d 69 6e  6b 2b 31 0d 03 f2 11 e7  |r ink=ink+1.....|
000005f0  20 69 6e 6b 3e 37 20 69  6e 6b 3d 30 0d 03 fc 10  | ink>7 ink=0....|
00000600  ef 31 39 2c 31 2c 69 6e  6b 3b 30 3b 0d 04 06 0a  |.19,1,ink;0;....|
00000610  f2 64 65 6c 61 79 0d 04  10 05 e1 0d 04 1a 05 3a  |.delay.........:|
00000620  0d 04 24 0b dd f2 70 61  70 65 72 0d 04 2e 11 70  |..$...paper....p|
00000630  61 70 65 72 3d 70 61 70  65 72 2b 31 0d 04 38 1d  |aper=paper+1..8.|
00000640  e7 20 70 61 70 65 72 3d  69 6e 6b 20 70 61 70 65  |. paper=ink pape|
00000650  72 3d 70 61 70 65 72 2b  31 0d 04 42 15 e7 20 70  |r=paper+1..B.. p|
00000660  61 70 65 72 3e 37 20 70  61 70 65 72 3d 30 0d 04  |aper>7 paper=0..|
00000670  4c 12 ef 31 39 2c 30 2c  70 61 70 65 72 3b 30 3b  |L..19,0,paper;0;|
00000680  0d 04 56 0a f2 64 65 6c  61 79 0d 04 60 05 e1 0d  |..V..delay..`...|
00000690  04 6a 05 3a 0d 04 74 0b  dd f2 6d 63 6f 64 65 0d  |.j.:..t...mcode.|
000006a0  04 7e 1a 78 63 6f 6f 72  64 3d 26 37 30 20 3a f4  |.~.xcoord=&70 :.|
000006b0  3a 20 26 37 30 2d 26 37  33 0d 04 88 1a 79 63 6f  |: &70-&73....yco|
000006c0  6f 72 64 3d 26 37 34 20  3a f4 3a 20 26 37 34 2d  |ord=&74 :.: &74-|
000006d0  26 37 37 0d 04 92 27 73  74 61 72 74 3d 26 33 35  |&77...'start=&35|
000006e0  30 20 3a f4 3a 20 73 63  72 65 65 6e 20 73 74 61  |0 :.: screen sta|
000006f0  72 74 20 61 64 64 72 65  73 73 0d 04 9c 1f 73 63  |rt address....sc|
00000700  72 65 65 6e 3d 26 33 35  35 20 3a f4 3a 20 73 63  |reen=&355 :.: sc|
00000710  72 65 65 6e 20 6d 6f 64  65 0d 04 a6 10 73 68 65  |reen mode....she|
00000720  69 6c 61 3d 26 46 45 30  30 0d 04 b0 14 e3 20 70  |ila=&FE00..... p|
00000730  61 73 73 3d 30 20 b8 20  32 20 88 20 32 0d 04 ba  |ass=0 . 2 . 2...|
00000740  0c 50 25 3d 6d 63 6f 64  65 0d 04 c4 0d 5b 4f 50  |.P%=mcode....[OP|
00000750  54 20 70 61 73 73 0d 04  ce 0c 4c 44 41 20 23 26  |T pass....LDA #&|
00000760  30 30 0d 04 d8 0c 4c 44  58 20 23 26 30 37 0d 04  |00....LDX #&07..|
00000770  e2 0d 2e 69 6e 69 74 6c  6f 6f 70 0d 04 ec 21 53  |...initloop...!S|
00000780  54 41 20 78 63 6f 6f 72  64 2c 58 20 5c 20 26 37  |TA xcoord,X \ &7|
00000790  30 2d 26 37 37 20 3d 20  23 26 30 30 0d 04 f6 07  |0-&77 = #&00....|
000007a0  44 45 58 0d 05 00 10 42  50 4c 20 69 6e 69 74 6c  |DEX....BPL initl|
000007b0  6f 6f 70 0d 05 0a 2c 4c  44 59 20 73 63 72 65 65  |oop...,LDY scree|
000007c0  6e 20 5c 20 73 63 72 65  65 6e 20 6d 6f 64 65 20  |n \ screen mode |
000007d0  69 6e 74 6f 20 59 20 72  65 67 69 73 74 65 72 0d  |into Y register.|
000007e0  05 14 23 43 50 59 20 23  26 30 36 20 5c 20 69 73  |..#CPY #&06 \ is|
000007f0  20 74 68 69 73 20 6d 6f  64 65 20 36 20 6f 72 20  | this mode 6 or |
00000800  37 3f 0d 05 1e 2a 42 43  53 20 72 65 74 75 72 6e  |7?...*BCS return|
00000810  20 5c 20 65 78 69 74 20  69 66 20 6e 6f 6e 2d 67  | \ exit if non-g|
00000820  72 61 70 68 69 63 73 20  6d 6f 64 65 0d 05 28 1e  |raphics mode..(.|
00000830  43 50 59 20 23 26 30 33  20 5c 20 69 73 20 74 68  |CPY #&03 \ is th|
00000840  69 73 20 6d 6f 64 65 20  33 3f 0d 05 32 2b 42 4e  |is mode 3?..2+BN|
00000850  45 20 63 61 72 72 79 6f  6e 20 5c 20 65 78 69 74  |E carryon \ exit|
00000860  20 69 66 20 6e 6f 6e 2d  67 72 61 70 68 69 63 73  | if non-graphics|
00000870  20 6d 6f 64 65 0d 05 3c  0b 2e 72 65 74 75 72 6e  | mode..<..return|
00000880  0d 05 46 2e 52 54 53 20  5c 20 72 65 74 75 72 6e  |..F.RTS \ return|
00000890  20 74 6f 20 42 41 53 49  43 20 69 66 20 6e 6f 6e  | to BASIC if non|
000008a0  2d 67 72 61 70 68 69 63  73 20 6d 6f 64 65 0d 05  |-graphics mode..|
000008b0  50 0c 2e 63 61 72 72 79  6f 6e 0d 05 5a 2e 4c 44  |P..carryon..Z.LD|
000008c0  41 20 73 74 61 72 74 20  5c 20 73 63 72 65 65 6e  |A start \ screen|
000008d0  20 73 74 61 72 74 20 61  64 64 72 65 73 73 2c 20  | start address, |
000008e0  6c 6f 77 20 62 79 74 65  0d 05 64 0e 53 54 41 20  |low byte..d.STA |
000008f0  79 63 6f 6f 72 64 0d 05  6e 31 4c 44 41 20 73 74  |ycoord..n1LDA st|
00000900  61 72 74 2b 31 20 5c 20  73 63 72 65 65 6e 20 73  |art+1 \ screen s|
00000910  74 61 72 74 20 61 64 64  72 65 73 73 2c 20 68 69  |tart address, hi|
00000920  67 68 20 62 79 74 65 0d  05 78 10 53 54 41 20 79  |gh byte..x.STA y|
00000930  63 6f 6f 72 64 2b 31 0d  05 82 10 4c 53 52 20 79  |coord+1....LSR y|
00000940  63 6f 6f 72 64 2b 31 0d  05 8c 22 52 4f 52 20 79  |coord+1..."ROR y|
00000950  63 6f 6f 72 64 20 5c 20  73 74 61 72 74 20 61 64  |coord \ start ad|
00000960  64 72 65 73 73 20 81 20  32 0d 05 96 10 4c 53 52  |dress . 2....LSR|
00000970  20 79 63 6f 6f 72 64 2b  31 0d 05 a0 22 52 4f 52  | ycoord+1..."ROR|
00000980  20 79 63 6f 6f 72 64 20  5c 20 73 74 61 72 74 20  | ycoord \ start |
00000990  61 64 64 72 65 73 73 20  81 20 34 0d 05 aa 10 4c  |address . 4....L|
000009a0  53 52 20 79 63 6f 6f 72  64 2b 31 0d 05 b4 22 52  |SR ycoord+1..."R|
000009b0  4f 52 20 79 63 6f 6f 72  64 20 5c 20 73 74 61 72  |OR ycoord \ star|
000009c0  74 20 61 64 64 72 65 73  73 20 81 20 38 0d 05 be  |t address . 8...|
000009d0  25 4c 44 41 20 6f 66 66  73 65 74 6c 6f 77 2c 59  |%LDA offsetlow,Y|
000009e0  20 5c 20 74 72 69 6d 20  74 68 65 20 6f 66 66 73  | \ trim the offs|
000009f0  65 74 0d 05 c8 1c 43 4c  44 20 5c 20 63 6c 65 61  |et....CLD \ clea|
00000a00  72 20 64 65 63 69 6d 61  6c 20 66 6c 61 67 0d 05  |r decimal flag..|
00000a10  d2 1e 43 4c 43 20 5c 20  70 72 65 70 61 72 65 20  |..CLC \ prepare |
00000a20  66 6f 72 20 61 64 64 69  74 69 6f 6e 0d 05 dc 23  |for addition...#|
00000a30  41 44 43 20 79 63 6f 6f  72 64 20 5c 20 61 64 64  |ADC ycoord \ add|
00000a40  20 74 72 69 6d 20 74 6f  20 6f 66 66 73 65 74 0d  | trim to offset.|
00000a50  05 e6 0e 53 54 41 20 79  63 6f 6f 72 64 0d 05 f0  |...STA ycoord...|
00000a60  0c 4c 44 41 20 23 26 30  30 0d 05 fa 10 41 44 43  |.LDA #&00....ADC|
00000a70  20 79 63 6f 6f 72 64 2b  31 0d 06 04 10 53 54 41  | ycoord+1....STA|
00000a80  20 79 63 6f 6f 72 64 2b  31 0d 06 0e 3c 53 45 43  | ycoord+1...<SEC|
00000a90  20 5c 20 70 72 65 70 61  72 65 20 74 6f 20 73 75  | \ prepare to su|
00000aa0  62 74 72 61 63 74 20 6f  66 66 73 65 74 20 66 72  |btract offset fr|
00000ab0  6f 6d 20 6c 69 67 68 74  20 70 65 6e 20 72 65 67  |om light pen reg|
00000ac0  69 73 74 65 72 0d 06 18  2b 4c 44 58 20 23 26 31  |ister...+LDX #&1|
00000ad0  31 20 5c 20 6c 69 67 68  74 20 70 65 6e 20 72 65  |1 \ light pen re|
00000ae0  67 69 73 74 65 72 2c 20  6c 6f 77 20 62 79 74 65  |gister, low byte|
00000af0  0d 06 22 26 53 54 58 20  73 68 65 69 6c 61 20 5c  |.."&STX sheila \|
00000b00  20 36 38 34 35 20 61 64  64 72 65 73 73 20 72 65  | 6845 address re|
00000b10  67 69 73 74 65 72 0d 06  2c 25 4c 44 41 20 73 68  |gister..,%LDA sh|
00000b20  65 69 6c 61 2b 31 20 5c  20 36 38 34 35 20 64 61  |eila+1 \ 6845 da|
00000b30  74 61 20 72 65 67 69 73  74 65 72 0d 06 36 2a 53  |ta register..6*S|
00000b40  42 43 20 79 63 6f 6f 72  64 20 5c 20 73 75 62 74  |BC ycoord \ subt|
00000b50  72 61 63 74 20 6f 66 66  73 65 74 2c 20 6c 6f 77  |ract offset, low|
00000b60  20 62 79 74 65 0d 06 40  22 53 54 41 20 79 63 6f  | byte..@"STA yco|
00000b70  6f 72 64 20 5c 20 6c 6f  77 20 62 79 74 65 20 2d  |ord \ low byte -|
00000b80  20 6f 66 66 73 65 74 0d  06 4a 12 44 45 58 20 5c  | offset..J.DEX \|
00000b90  20 58 20 3d 20 23 26 31  30 0d 06 54 26 53 54 58  | X = #&10..T&STX|
00000ba0  20 73 68 65 69 6c 61 20  5c 20 36 38 34 35 20 61  | sheila \ 6845 a|
00000bb0  64 64 72 65 73 73 20 72  65 67 69 73 74 65 72 0d  |ddress register.|
00000bc0  06 5e 25 4c 44 41 20 73  68 65 69 6c 61 2b 31 20  |.^%LDA sheila+1 |
00000bd0  5c 20 36 38 34 35 20 64  61 74 61 20 72 65 67 69  |\ 6845 data regi|
00000be0  73 74 65 72 0d 06 68 2d  53 42 43 20 79 63 6f 6f  |ster..h-SBC ycoo|
00000bf0  72 64 2b 31 20 5c 20 73  75 62 74 72 61 63 74 20  |rd+1 \ subtract |
00000c00  6f 66 66 73 65 74 2c 20  68 69 67 68 20 62 79 74  |offset, high byt|
00000c10  65 0d 06 72 25 53 54 41  20 79 63 6f 6f 72 64 2b  |e..r%STA ycoord+|
00000c20  31 20 5c 20 68 69 67 68  20 62 79 74 65 20 2d 20  |1 \ high byte - |
00000c30  6f 66 66 73 65 74 0d 06  7c 09 2e 6e 65 78 74 0d  |offset..|..next.|
00000c40  06 86 2d 41 53 4c 20 79  63 6f 6f 72 64 20 5c 20  |..-ASL ycoord \ |
00000c50  73 68 69 66 74 20 64 69  76 69 64 65 6e 64 2f 71  |shift dividend/q|
00000c60  75 6f 74 69 65 6e 74 20  6c 65 66 74 0d 06 90 2f  |uotient left.../|
00000c70  52 4f 4c 20 79 63 6f 6f  72 64 2b 31 20 5c 20 73  |ROL ycoord+1 \ s|
00000c80  68 69 66 74 20 64 69 76  69 64 65 6e 64 2f 71 75  |hift dividend/qu|
00000c90  6f 74 69 65 6e 74 20 6c  65 66 74 0d 06 9a 31 52  |otient left...1R|
00000ca0  4f 4c 20 78 63 6f 6f 72  64 20 5c 20 73 68 69 66  |OL xcoord \ shif|
00000cb0  74 20 62 69 74 73 20 69  6e 74 6f 20 70 61 72 74  |t bits into part|
00000cc0  69 61 6c 20 64 69 76 69  64 65 6e 64 0d 06 a4 26  |ial dividend...&|
00000cd0  4c 44 41 20 78 63 6f 6f  72 64 20 5c 20 6c 6f 61  |LDA xcoord \ loa|
00000ce0  64 20 70 61 72 74 69 61  6c 20 64 69 76 69 64 65  |d partial divide|
00000cf0  6e 64 0d 06 ae 21 53 45  43 20 5c 20 70 72 65 70  |nd...!SEC \ prep|
00000d00  61 72 65 20 66 6f 72 20  73 75 62 74 72 61 63 74  |are for subtract|
00000d10  69 6f 6e 0d 06 b8 22 53  42 43 20 77 69 64 74 68  |ion..."SBC width|
00000d20  2c 59 20 5c 20 73 75 62  74 72 61 63 74 20 64 69  |,Y \ subtract di|
00000d30  76 69 73 6f 72 0d 06 c2  2b 42 43 43 20 64 6f 6e  |visor...+BCC don|
00000d40  65 20 5c 20 62 72 61 6e  63 68 20 69 66 20 64 69  |e \ branch if di|
00000d50  76 69 64 65 6e 64 20 3c  20 64 69 76 69 73 6f 72  |vidend < divisor|
00000d60  0d 06 cc 23 49 4e 43 20  79 63 6f 6f 72 64 20 5c  |...#INC ycoord \|
00000d70  20 69 6e 63 72 65 6d 65  6e 74 20 71 75 6f 74 69  | increment quoti|
00000d80  65 6e 74 0d 06 d6 2a 53  54 41 20 78 63 6f 6f 72  |ent...*STA xcoor|
00000d90  64 20 5c 20 73 61 76 65  20 6e 65 77 20 70 61 72  |d \ save new par|
00000da0  74 69 61 6c 20 64 69 76  69 64 65 6e 64 0d 06 e0  |tial dividend...|
00000db0  09 2e 64 6f 6e 65 0d 06  ea 1f 44 45 58 20 5c 20  |..done....DEX \ |
00000dc0  64 65 63 72 65 6d 65 6e  74 20 62 69 74 20 63 6f  |decrement bit co|
00000dd0  75 6e 74 65 72 0d 06 f4  21 42 4e 45 20 6e 65 78  |unter...!BNE nex|
00000de0  74 20 5c 20 62 72 61 6e  63 68 20 66 6f 72 20 31  |t \ branch for 1|
00000df0  36 20 62 69 74 73 0d 06  fe 2c 4c 44 41 20 78 6c  |6 bits...,LDA xl|
00000e00  6f 6f 70 2c 59 20 5c 20  70 72 65 70 61 72 65 20  |oop,Y \ prepare |
00000e10  66 6f 72 20 6d 75 6c 74  69 70 6c 69 63 61 74 69  |for multiplicati|
00000e20  6f 6e 0d 07 08 26 54 41  58 20 5c 20 58 3d 34 20  |on...&TAX \ X=4 |
00000e30  6d 6f 64 65 73 20 30 2d  33 2c 20 58 3d 35 20 6d  |modes 0-3, X=5 m|
00000e40  6f 64 65 73 20 34 2d 37  0d 07 12 0a 2e 6d 75 6c  |odes 4-7.....mul|
00000e50  74 78 0d 07 1c 1d 41 53  4c 20 78 63 6f 6f 72 64  |tx....ASL xcoord|
00000e60  20 5c 20 6c 6f 77 20 62  79 74 65 20 2a 20 32 0d  | \ low byte * 2.|
00000e70  07 26 20 52 4f 4c 20 78  63 6f 6f 72 64 2b 31 20  |.& ROL xcoord+1 |
00000e80  5c 20 68 69 67 68 20 62  79 74 65 20 2a 20 32 0d  |\ high byte * 2.|
00000e90  07 30 29 44 45 58 20 5c  20 63 6f 75 6e 74 20 6e  |.0)DEX \ count n|
00000ea0  75 6d 62 65 72 20 6f 66  20 6d 75 6c 74 69 70 6c  |umber of multipl|
00000eb0  69 63 61 74 69 6f 6e 73  0d 07 3a 27 42 4e 45 20  |ications..:'BNE |
00000ec0  6d 75 6c 74 78 20 5c 20  67 6f 20 62 61 63 6b 20  |multx \ go back |
00000ed0  69 66 20 6e 6f 74 20 66  69 6e 69 73 68 65 64 0d  |if not finished.|
00000ee0  07 44 2e 4c 44 41 20 78  61 64 64 2c 59 20 5c 20  |.D.LDA xadd,Y \ |
00000ef0  41 3d 38 20 6d 6f 64 65  73 20 30 2d 33 2c 20 41  |A=8 modes 0-3, A|
00000f00  3d 31 36 20 6d 6f 64 65  73 20 34 2d 37 0d 07 4e  |=16 modes 4-7..N|
00000f10  1e 43 4c 43 20 5c 20 70  72 65 70 61 72 65 20 66  |.CLC \ prepare f|
00000f20  6f 72 20 61 64 64 69 74  69 6f 6e 0d 07 58 0e 41  |or addition..X.A|
00000f30  44 43 20 78 63 6f 6f 72  64 0d 07 62 0e 53 54 41  |DC xcoord..b.STA|
00000f40  20 78 63 6f 6f 72 64 0d  07 6c 0c 4c 44 41 20 23  | xcoord..l.LDA #|
00000f50  26 30 30 0d 07 76 10 41  44 43 20 78 63 6f 6f 72  |&00..v.ADC xcoor|
00000f60  64 2b 31 0d 07 80 1c 43  4d 50 20 23 26 30 35 20  |d+1....CMP #&05 |
00000f70  5c 20 6d 61 78 20 76 61  6c 75 65 20 3d 20 34 0d  |\ max value = 4.|
00000f80  07 8a 0f 42 43 43 20 69  6e 72 61 6e 67 65 0d 07  |...BCC inrange..|
00000f90  94 1a 4c 44 41 20 23 26  30 32 20 5c 20 64 75 6d  |..LDA #&02 \ dum|
00000fa0  6d 79 20 76 61 6c 75 65  0d 07 9e 0c 2e 69 6e 72  |my value.....inr|
00000fb0  61 6e 67 65 0d 07 a8 10  53 54 41 20 78 63 6f 6f  |ange....STA xcoo|
00000fc0  72 64 2b 31 0d 07 b2 36  4c 44 58 20 23 26 30 35  |rd+1...6LDX #&05|
00000fd0  20 5c 20 70 72 65 70 61  72 65 20 66 6f 72 20 79  | \ prepare for y|
00000fe0  20 63 6f 6f 72 64 69 6e  61 74 65 20 6d 75 6c 74  | coordinate mult|
00000ff0  69 70 6c 69 63 61 74 69  6f 6e 0d 07 bc 0a 2e 6d  |iplication.....m|
00001000  75 6c 74 79 0d 07 c6 1d  41 53 4c 20 79 63 6f 6f  |ulty....ASL ycoo|
00001010  72 64 20 5c 20 6c 6f 77  20 62 79 74 65 20 2a 20  |rd \ low byte * |
00001020  32 0d 07 d0 20 52 4f 4c  20 79 63 6f 6f 72 64 2b  |2... ROL ycoord+|
00001030  31 20 5c 20 68 69 67 68  20 62 79 74 65 20 2a 20  |1 \ high byte * |
00001040  32 0d 07 da 29 44 45 58  20 5c 20 63 6f 75 6e 74  |2...)DEX \ count|
00001050  20 6e 75 6d 62 65 72 20  6f 66 20 6d 75 6c 74 69  | number of multi|
00001060  70 6c 69 63 61 74 69 6f  6e 73 0d 07 e4 27 42 4e  |plications...'BN|
00001070  45 20 6d 75 6c 74 79 20  5c 20 67 6f 20 62 61 63  |E multy \ go bac|
00001080  6b 20 69 66 20 6e 6f 74  20 66 69 6e 69 73 68 65  |k if not finishe|
00001090  64 0d 07 ee 21 53 45 43  20 5c 20 70 72 65 70 61  |d...!SEC \ prepa|
000010a0  72 65 20 66 6f 72 20 73  75 62 74 72 61 63 74 69  |re for subtracti|
000010b0  6f 6e 0d 07 f8 27 4c 44  41 20 23 26 46 30 20 5c  |on...'LDA #&F0 \|
000010c0  20 6c 6f 77 20 62 79 74  65 20 6f 66 20 64 65 63  | low byte of dec|
000010d0  69 6d 61 6c 20 31 30 30  38 0d 08 02 1c 53 42 43  |imal 1008....SBC|
000010e0  20 79 63 6f 6f 72 64 20  5c 20 79 63 6f 6f 72 64  | ycoord \ ycoord|
000010f0  2d 23 26 46 30 0d 08 0c  0e 53 54 41 20 79 63 6f  |-#&F0....STA yco|
00001100  6f 72 64 0d 08 16 28 4c  44 41 20 23 26 30 33 20  |ord...(LDA #&03 |
00001110  5c 20 68 69 67 68 20 62  79 74 65 20 6f 66 20 64  |\ high byte of d|
00001120  65 63 69 6d 61 6c 20 31  30 30 38 0d 08 20 22 53  |ecimal 1008.. "S|
00001130  42 43 20 79 63 6f 6f 72  64 2b 31 20 5c 20 28 79  |BC ycoord+1 \ (y|
00001140  63 6f 6f 72 64 2b 31 29  2d 23 26 30 33 0d 08 2a  |coord+1)-#&03..*|
00001150  1a 80 20 23 26 30 33 20  5c 20 6d 61 78 20 76 61  |.. #&03 \ max va|
00001160  6c 75 65 20 3d 20 33 0d  08 34 10 53 54 41 20 79  |lue = 3..4.STA y|
00001170  63 6f 6f 72 64 2b 31 0d  08 3e 19 52 54 53 20 5c  |coord+1..>.RTS \|
00001180  20 72 65 74 75 72 6e 20  74 6f 20 42 41 53 49 43  | return to BASIC|
00001190  0d 08 48 0e 2e 6f 66 66  73 65 74 6c 6f 77 0d 08  |..H..offsetlow..|
000011a0  52 25 45 51 55 42 20 26  30 34 20 5c 20 6d 6f 64  |R%EQUB &04 \ mod|
000011b0  65 30 2c 20 75 6e 74 72  69 6d 6d 65 64 20 3d 20  |e0, untrimmed = |
000011c0  26 30 36 0d 08 5c 25 45  51 55 42 20 26 30 34 20  |&06..\%EQUB &04 |
000011d0  5c 20 6d 6f 64 65 31 2c  20 75 6e 74 72 69 6d 6d  |\ mode1, untrimm|
000011e0  65 64 20 3d 20 26 30 36  0d 08 66 25 45 51 55 42  |ed = &06..f%EQUB|
000011f0  20 26 30 34 20 5c 20 6d  6f 64 65 32 2c 20 75 6e  | &04 \ mode2, un|
00001200  74 72 69 6d 6d 65 64 20  3d 20 26 30 36 0d 08 70  |trimmed = &06..p|
00001210  21 45 51 55 42 20 26 30  30 20 5c 20 6d 6f 64 65  |!EQUB &00 \ mode|
00001220  33 2c 20 64 75 6d 6d 79  20 76 61 6c 75 65 0d 08  |3, dummy value..|
00001230  7a 25 45 51 55 42 20 26  30 33 20 5c 20 6d 6f 64  |z%EQUB &03 \ mod|
00001240  65 34 2c 20 75 6e 74 72  69 6d 6d 65 64 20 3d 20  |e4, untrimmed = |
00001250  26 30 34 0d 08 84 25 45  51 55 42 20 26 30 33 20  |&04...%EQUB &03 |
00001260  5c 20 6d 6f 64 65 35 2c  20 75 6e 74 72 69 6d 6d  |\ mode5, untrimm|
00001270  65 64 20 3d 20 26 30 34  0d 08 8e 0a 2e 78 6c 6f  |ed = &04.....xlo|
00001280  6f 70 0d 08 98 1e 45 51  55 44 20 26 30 30 30 34  |op....EQUD &0004|
00001290  30 34 30 34 20 5c 20 6d  6f 64 65 73 20 33 2d 30  |0404 \ modes 3-0|
000012a0  0d 08 a2 1a 45 51 55 57  20 26 30 35 30 35 20 5c  |....EQUW &0505 \|
000012b0  20 6d 6f 64 65 73 20 35  2d 34 0d 08 ac 09 2e 78  | modes 5-4.....x|
000012c0  61 64 64 0d 08 b6 1e 45  51 55 44 20 26 30 30 30  |add....EQUD &000|
000012d0  38 30 38 30 38 20 5c 20  6d 6f 64 65 73 20 33 2d  |80808 \ modes 3-|
000012e0  30 0d 08 c0 1a 45 51 55  57 20 26 31 30 31 30 20  |0....EQUW &1010 |
000012f0  5c 20 6d 6f 64 65 73 20  35 2d 34 0d 08 ca 0a 2e  |\ modes 5-4.....|
00001300  77 69 64 74 68 0d 08 d4  1e 45 51 55 44 20 26 30  |width....EQUD &0|
00001310  30 35 30 35 30 35 30 20  5c 20 6d 6f 64 65 73 20  |0505050 \ modes |
00001320  33 2d 30 0d 08 de 1a 45  51 55 57 20 26 32 38 32  |3-0....EQUW &282|
00001330  38 20 5c 20 6d 6f 64 65  73 20 35 2d 34 0d 08 e8  |8 \ modes 5-4...|
00001340  0d 2e 6c 61 73 74 62 79  74 65 0d 08 f2 05 5d 0d  |..lastbyte....].|
00001350  08 fc 05 ed 0d 09 06 05  e1 0d 09 10 05 3a 0d 09  |.............:..|
00001360  1a 0c dd a4 73 77 69 74  63 68 0d 09 24 2f e7 20  |....switch..$/. |
00001370  28 96 28 30 29 80 33 29  3d 30 20 e7 20 21 78 63  |(.(0).3)=0 . !xc|
00001380  6f 6f 72 64 3e 31 36 20  e7 20 21 78 63 6f 6f 72  |oord>16 . !xcoor|
00001390  64 3c 31 32 34 38 20 3d  a3 0d 09 2e 06 3d b9 0d  |d<1248 =.....=..|
000013a0  ff                                                |.|
000013a1
10-02-89/Graphic.m0
10-02-89/Graphic.m1
10-02-89/Graphic.m2
10-02-89/Graphic.m4
10-02-89/Graphic.m5