annotate level1/modules/co80.asm @ 1585:4a2a4667a4cf

Source enhancements
author boisy
date Fri, 21 May 2004 21:44:15 +0000
parents e19a38f50c3a
children e26f7d2e40df
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * CO80 - WordPak 80-RS co-driver for CCIO
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
1499
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
6 * Edt/Rev YYYY/MM/DD Modified by
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
7 * Comment
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 * ------------------------------------------------------------------
1499
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
9 * 2 ????/??/??
6cd590fc076f Fixed comments
boisy
parents: 1287
diff changeset
10 * From Tandy OS-9 Level One VR 02.00.00
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
11 *
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
12 * 2003/09/22 Rodney Hamilton
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
13 * recoded dispatch table fcbs
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 nam CO80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 ttl WordPak 80-RS co-driver for CCIO
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 * Disassembled 98/08/23 17:58:20 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 use defsfile
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
22 use cciodefs
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 tylg set Systm+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 atrv set ReEnt+rev
1287
10957d54bf16 Made all modules rev 0
boisy
parents: 201
diff changeset
27 rev set $00
201
668388823050 Fixed headers to be consistent
boisy
parents: 0
diff changeset
28 edition set 2
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 u0000 rmb 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 fcb $06
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 name fcs /CO80/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
39 start equ *
1582
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
40 lbra Init
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
41 lbra Write
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
42 lbra GetStat
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
43 lbra SetStat
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
44 lbra Term
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
45
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
46 * Init
1582
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
47 Init ldx #$FF78
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 lda #$06
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 lda #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 clr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 lda #$0E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 clr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 lbsr L0152
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 lbsr L0229
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 ldd #$07D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 lbsr L0189
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
61 ldb <V.COLoad,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 orb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 bra L004F
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
64 * Term
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
65 Term ldb <V.COLoad,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66 andb #$FB
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
67 L004F stb <V.COLoad,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 rts
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
70 * GetStat
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
71 GetStat cmpa #SS.Cursr
1582
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
72 bne SetStat
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
73 ldy R$Y,y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 clra
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
75 ldb <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 addb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 std $06,y
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
78 ldb <V.C80Y,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 addb #$20
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
80 std R$X,y
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 ldx #$FF78
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 lbsr L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 lbsr L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 lda ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 sta $01,y
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
89 * no operation entry point
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 L007D clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 rts
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
92 * SetStat
1582
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
93 SetStat ldb #E$UnkSvc
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 rts
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
96 * Write
1582
e19a38f50c3a More commments added
boisy
parents: 1512
diff changeset
97 Write ldx #$FF78
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98 cmpa #$0E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 bcs L00B6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100 cmpa #$1E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 bcs L007D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 cmpa #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103 lbcs L01F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 cmpa #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105 bcs L0106
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 cmpa #$C0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 bls L00A6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 anda #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 suba #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110 cmpa #$19
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 bhi L00B2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112 bra L0106
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 L00A6 cmpa #$AA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 bcs L00B2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115 ora #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 anda #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 cmpa #$1A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 bcc L0106
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119 L00B2 lda #$7F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 bra L0106
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 L00B6 leax >L00C5,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 lsla
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 ldd a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 ldx #$FF78
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 rts
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
128
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
129 * display functions dispatch table
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
130 L00C5 fdb L007D-L00C5 $ffb8 $00:no-op (null)
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
131 fdb L0152-L00C5 $008d $01:HOME cursor
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
132 fdb L01A2-L00C5 $00dd $02:CURSOR XY
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
133 fdb L0179-L00C5 $00b4 $03:ERASE LINE
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
134 fdb L017B-L00C5 $00b6 $04:ERASE TO EOL
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
135 fdb L0211-L00C5 $014c $05:CURSOR ON/OFF
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
136 fdb L0115-L00C5 $0050 $06:CURSOR RIGHT
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
137 fdb L007D-L00C5 $ffb8 $07:no-op (bel:handled in CCIO)
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
138 fdb L00E1-L00C5 $001c $08:CURSOR LEFT
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
139 fdb L00F3-L00C5 $002e $09:CURSOR UP
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
140 fdb L0121-L00C5 $005c $0A:CURSOR DOWN
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
141 fdb L0186-L00C5 $00c1 $0B:ERASE TO EOS
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
142 fdb L0184-L00C5 $00bf $0C:CLEAR SCREEN
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
143 fdb Do0D-L00C5 $003c $0D:RETURN
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
144
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
145 * $08 - cursor left
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
146 L00E1 ldd <V.C80X,u get CO80 X/Y
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
147 bne L00E8 branch if not at start
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
148 clrb
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
149 rts
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 L00E8 decb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 bge L00EE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 ldb #$4F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 deca
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
154 L00EE std <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 bra L014F
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
156
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
157 * $09 - cursor up
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
158 L00F3 lda <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 beq L00FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 deca
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
161 sta <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 lbra L01CC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163 L00FF clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 rts
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
165
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
166 * $0D - move cursor to start of line (carriage return)
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
167 Do0D clr <V.C80Y,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 bra L014C
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
169
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
170 L0106 ora <V.5A,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 bsr L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 ldb #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 stb $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176 sta ,x
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
177
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
178 * $06 - cursor right
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
179 L0115 inc <V.C80Y,u
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
180 lda <V.C80Y,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 cmpa #$4F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 ble L014C
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
183 bsr Do0D
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
184
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
185 * $0A - cursor down (line feed)
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
186 L0121 lda <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 cmpa #$17
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 bge L012E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 inca
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
190 sta <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 bra L014F
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
192 L012E ldd <V.54,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 lbsr L01DC
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
194 ldd <V.54,u
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
195 addd #80
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 bsr L0161
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
197 std <V.54,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 bsr L018E
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
199 ldd <V.54,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 bsr L016B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 lda #$08
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 stb ,x
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
204 L014C lda <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 L014F lbra L01CC
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
206
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
207 * $01 - home cursor
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
208 L0152 clr <V.C80X,u
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
209 clr <V.C80Y,u
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
210 ldd <V.54,u
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
211 std <V.56,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212 lbra L01DC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 L0161 cmpd #$07D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 blt L016A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 subd #$07D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216 L016A rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 L016B lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 L0174 lda $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 bpl L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 rts
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
229
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
230 * $03 - erase line
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
231 L0179 bsr Do0D do a CR
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
232 L017B lda <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 inca
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
234 ldb #80 line length
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 mul
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 bra L0189
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
237
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
238 * $0C - clear screen
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
239 L0184 bsr L0152 do home cursor, then erase to EOS
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
240
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
241 * $0B - erase to end of screen
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
242 L0186 ldd #$0780
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
243 L0189 addd <V.54,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 bsr L0161
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 L018E bsr L016B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 bsr L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 lda #$0B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 stb ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 L01A0 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 rts
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
256
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
257 * $02 XX YY - move cursor to col XX-32, row YY-32
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
258 L01A2 leax >L01B0,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 ldb #$02
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
260 L01A8 stx <V.RTAdd,u
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
261 stb <V.NGChr,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 L01B0 ldx #$FF78
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
265 lda <V.NChr2,u
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
266 ldb <V.NChar,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 subb #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 blt L01A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 cmpb #$4F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 bgt L01A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 suba #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 blt L01A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 cmpa #$17
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 bgt L01A0
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
275 std <V.C80X,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 L01CC ldb #$50
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 mul
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
278 addb <V.C80Y,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 adca #$00
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
280 addd <V.54,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 bsr L0161
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
282 std <V.56,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 L01DC pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 bsr L0174
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 lda #$0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 lda ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 lda #$09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 sta $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 lda ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 L01F2 cmpa #$1F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 bne L0201
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
297 lda <V.NChr2,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 cmpa #$21
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 beq L0205
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 cmpa #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 beq L020C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 L0201 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 ldb #E$Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 L0205 lda #$80
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
306 sta <V.5A,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 rts
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
309 L020C clr <V.5A,u
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 L020F clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 rts
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
312
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
313 * $05 XX - set cursor off/on/color per XX-32
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
314 L0211 leax >L0219,pcr
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315 ldb #$01
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 bra L01A8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 L0219 ldx #$FF78
1585
4a2a4667a4cf Source enhancements
boisy
parents: 1582
diff changeset
318 lda <V.NChr2,u get next character
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
319 cmpa #$20 cursor code valid?
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
320 blt L0201 no, error
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 beq L022D
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
322 cmpa #$2A color code in range?
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
323 bgt L020F no, ignore
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
324 L0229 lda #$05 cursor on (all colors=on)
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 bra L022F
1512
f3557a63b11c Rodney's improvements
boisy
parents: 1499
diff changeset
326 L022D lda #$45 cursor off
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 L022F ldb #$0C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328 stb $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 sta ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336