Mercurial > hg > Members > kono > nitros9-code
annotate level1/cmds/debug.asm @ 814:fd9d07c31d20
Moved files from CMDS
author | boisy |
---|---|
date | Mon, 13 Jan 2003 13:41:48 +0000 |
parents | 98acb7c3a708 |
children | c155aac72190 |
rev | line source |
---|---|
115 | 1 ******************************************************************** |
2 * debug - 6809 debugger | |
3 * | |
4 * $Id$ | |
5 * | |
6 * Ed. Comments Who YY/MM/DD | |
7 * ------------------------------------------------------------------ | |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
116
diff
changeset
|
8 * 6 From Tandy OS-9 Level One VR 02.00.00 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
9 * 9 From Tandy OS-9 Level Two Development System, BGP 03/01/03 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
10 * back ported to OS-9 Level One |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
11 * 10 Start of optimizations, works under NitrOS-9 BGP 03/01/05 |
115 | 12 |
13 nam debug | |
14 ttl 6809 debugger | |
15 | |
16 * Disassembled 02/07/06 13:05:58 by Disasm v1.6 (C) 1988 by RML | |
17 | |
18 ifp1 | |
19 use defsfile | |
20 endc | |
21 | |
22 tylg set Prgrm+Objct | |
23 atrv set ReEnt+rev | |
24 rev set $01 | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
25 edition set 10 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
26 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
27 * Changable settings |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
28 NumBrkPt equ 12 number of breakpoints |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
29 BuffSiz equ $145 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
30 UnknSiz equ 80 |
115 | 31 |
32 L0000 mod eom,name,tylg,atrv,start,size | |
33 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
34 curraddr rmb 2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
35 u0002 rmb 2 |
115 | 36 u0004 rmb 2 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
37 buffptr rmb 2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
38 u0008 rmb 2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
39 prevaddr rmb 2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
40 bptable rmb 2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
41 isnarrow rmb 1 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
42 * extra memory allocated at start |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
43 rmb (NumBrkPt*3) |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
44 rmb UnknSiz |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
45 rmb BuffSiz |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
46 rmb R$Size |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
47 rmb 44 |
115 | 48 size equ . |
49 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
50 * Debugger Errors |
722 | 51 E$BadCnt equ 0 illegal constant |
52 E$ZerDiv equ 1 divide by zero | |
53 E$MulOvf equ 2 product > 65535 | |
54 E$OpMsng equ 3 operator not follwed by legal operand | |
55 E$RParen equ 4 right paren missing | |
56 E$RBrckt equ 5 right bracket missing | |
57 E$RABrkt equ 6 right angle bracket > missing | |
58 E$IllReg equ 7 illegal register | |
59 E$BytOvf equ 8 value > 255 for byte | |
60 E$CmdErr equ 9 illegal command | |
721 | 61 E$NotRAM equ 10 memory is ROM |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
62 E$BPTFull equ 11 breakpoint table full |
722 | 63 E$NoBkPt equ 12 breakpoint not found |
64 E$BadSWI equ 13 Illegal SWI | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
65 |
115 | 66 name fcs /debug/ |
200
e9ce43cc215e
Made major changes to headers for consistency and identification
boisy
parents:
116
diff
changeset
|
67 fcb edition |
115 | 68 |
69 L0013 bsr L0021 | |
70 bra L0019 | |
71 L0017 bsr L0027 | |
72 L0019 pshs a | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
73 lda #C$SPAC |
115 | 74 sta ,x+ |
75 puls pc,a | |
76 L0021 exg a,b | |
77 bsr L0027 | |
78 tfr a,b | |
79 L0027 pshs b | |
80 andb #$F0 | |
81 lsrb | |
82 lsrb | |
83 lsrb | |
84 lsrb | |
85 bsr L0035 | |
86 puls b | |
87 andb #$0F | |
88 L0035 cmpb #$09 | |
89 bls L003B | |
90 addb #$07 | |
91 L003B addb #$30 | |
92 stb ,x+ | |
93 rts | |
94 L0040 pshs u,y,b | |
95 leau <L0065,pcr | |
96 ldy #$0005 | |
97 L0049 clr ,s | |
98 L004B subd ,u | |
99 bcs L0053 | |
100 inc ,s | |
101 bra L004B | |
102 L0053 addd ,u++ | |
103 pshs b | |
104 ldb $01,s | |
105 addb #$30 | |
106 stb ,x+ | |
107 puls b | |
108 leay -$01,y | |
109 bne L0049 | |
110 puls pc,u,y,b | |
111 | |
721 | 112 L0065 fdb $2710,$03e8,$0064,$000a,$0001 |
115 | 113 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
114 L006F lbsr EatSpace skip spaces |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
115 leax $01,x point after byte in A |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
116 cmpa #'# decimal specifier? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
117 beq DoDec branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
118 cmpa #'% binary specifier? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
119 beq DoBin branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
120 cmpa #'$ hex specifier? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
121 beq DoHex branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
122 leax -$01,x back up |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
123 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
124 * Make hex number |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
125 DoHex leas -$04,s make room on stack for hex |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
126 bsr Clr4 clear bytes on stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
127 L0086 bsr AtoInt get integer value at ,X |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
128 bcc L00A0 branch if ok |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
129 cmpb #'A may be hex digit.. check for |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
130 lbcs L0110 branch if not |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
131 cmpb #'F check upperbound |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
132 bls L009E branch if ok |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
133 cmpb #'a now check lowercase |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
134 bcs L0110 branch if not |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
135 cmpb #'f check upperbound |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
136 bhi L0110 branch if not ok |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
137 subb #$20 else make uppercase |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
138 L009E subb #$37 and get value |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
139 L00A0 stb ,s save value on stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
140 ldd $02,s get two bytes from stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
141 bita #$F0 upper nibble set? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
142 bne L0123 branch if so |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
143 IFNE H6309 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
144 lsld |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
145 lsld |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
146 lsld |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
147 lsld |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
148 ELSE |
115 | 149 lslb |
150 rola | |
151 lslb | |
152 rola | |
153 lslb | |
154 rola | |
155 lslb | |
156 rola | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
157 ENDC |
115 | 158 addb ,s |
159 adca #$00 | |
160 std $02,s | |
161 inc $01,s | |
162 bra L0086 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
163 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
164 * Make decimal number |
721 | 165 DoDec leas -$04,s make room on stack |
166 bsr Clr4 clear it | |
167 L00BE bsr AtoInt convert ASCII char in A | |
115 | 168 bcs L0110 |
721 | 169 stb ,s save integer char |
170 ldd $02,s get word on stack | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
171 IFNE H6309 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
172 lsld |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
173 ELSE |
721 | 174 lslb |
175 rola D * 2 | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
176 ENDC |
721 | 177 std $02,s save |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
178 IFNE H6309 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
179 lsld |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
180 lsld |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
181 ELSE |
115 | 182 lslb |
721 | 183 rola D * 4 |
115 | 184 lslb |
721 | 185 rola D * 8 |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
186 ENDC |
115 | 187 bcs L0123 |
721 | 188 addd $02,s add to word on stack |
115 | 189 bcs L0123 |
190 addb ,s | |
191 adca #$00 | |
192 bcs L0123 | |
193 std $02,s | |
194 inc $01,s | |
195 bra L00BE | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
196 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
197 * Make binary number |
721 | 198 DoBin leas -$04,s make room on stack |
199 bsr Clr4 clear it | |
200 L00E4 ldb ,x+ get char at X | |
201 subb #'0 subtract ASCII 0 | |
202 bcs L0110 branch if lower | |
203 lsrb divide by 2 | |
204 bne L0110 branch if not zero | |
205 rol $03,s multiply 2,s * 2 | |
115 | 206 rol $02,s |
721 | 207 bcs L0123 branch if carry set |
115 | 208 inc $01,s |
721 | 209 bra L00E4 get next char |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
210 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
211 * Clear 4 bytes on stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
212 * Exit: |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
213 * A,B = 0 |
721 | 214 Clr4 equ * |
215 IFNE H6309 | |
216 clrd | |
217 ELSE | |
218 clra | |
115 | 219 clrb |
721 | 220 ENDC |
115 | 221 std $02,s |
222 std $04,s | |
223 rts | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
224 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
225 * ASCII to Integer |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
226 * Entry: |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
227 * X = address where byte is |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
228 * Exit: |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
229 * X = address + 1 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
230 * Carry = clear: B = integer |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
231 * Carry = set: B = ASCII char value |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
232 AtoInt ldb ,x+ get char at X |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
233 cmpb #'0 zero? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
234 bcs L0108 branch if lower |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
235 cmpb #'9 9? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
236 bls L010B branch if lower/same |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
237 L0108 orcc #Carry else set carry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
238 rts and return |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
239 L010B subb #'0 get real value |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
240 andcc #^Carry clear carry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
241 rts return |
721 | 242 |
243 L0110 leax -$01,x back up X by 1 | |
115 | 244 tst $01,s |
245 beq L011C | |
246 ldd $02,s | |
116 | 247 andcc #^Carry |
115 | 248 bra L0120 |
116 | 249 L011C orcc #Zero |
250 L011E orcc #Carry | |
115 | 251 L0120 leas $04,s |
252 rts | |
116 | 253 L0123 andcc #^Zero |
115 | 254 bra L011E |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
255 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
256 * Eat spaces |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
257 EatSpace lda ,x+ |
687 | 258 cmpa #C$SPAC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
259 beq EatSpace |
115 | 260 leax -$01,x |
261 rts | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
262 |
115 | 263 L0130 pshs x,b,a |
264 lda $03,s | |
265 mul | |
266 pshs b,a | |
267 lda $02,s | |
268 ldb $04,s | |
269 mul | |
270 pshs b,a | |
271 lda $04,s | |
272 ldb $07,s | |
273 bsr L0157 | |
274 lda $05,s | |
275 ldb $06,s | |
276 bsr L0157 | |
116 | 277 andcc #^Carry |
115 | 278 ldd $02,s |
279 ldx ,s | |
280 beq L0154 | |
116 | 281 orcc #Carry |
115 | 282 L0154 leas $08,s |
283 rts | |
284 L0157 mul | |
285 addd $03,s | |
286 std $03,s | |
287 bcc L0160 | |
288 inc $02,s | |
289 L0160 rts | |
290 L0161 pshs y,x,b,a | |
291 ldd ,s | |
292 bne L016B | |
116 | 293 orcc #Carry |
115 | 294 bra L018B |
295 L016B ldd #$0010 | |
296 stb $04,s | |
297 clrb | |
298 L0171 lsl $03,s | |
299 rol $02,s | |
300 rolb | |
301 rola | |
302 subd ,s | |
303 bmi L017F | |
304 inc $03,s | |
305 bra L0181 | |
306 L017F addd ,s | |
307 L0181 dec $04,s | |
308 bne L0171 | |
309 tfr d,x | |
310 ldd $02,s | |
116 | 311 andcc #^Carry |
115 | 312 L018B leas $06,s |
313 rts | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
314 |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
315 * Copy from Y to X until byte zero is encountered |
115 | 316 L018E sta ,x+ |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
317 CopyY2X lda ,y+ |
115 | 318 bne L018E |
319 rts | |
722 | 320 |
115 | 321 L0195 pshs u,y |
322 tfr s,u | |
323 bsr L01A7 | |
116 | 324 andcc #^Carry |
115 | 325 puls pc,u,y |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
326 |
115 | 327 L019F tfr u,s |
116 | 328 orcc #Carry |
115 | 329 puls pc,u,y |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
330 |
115 | 331 L01A5 leax $01,x |
332 L01A7 bsr L01C9 | |
333 pshs b,a | |
334 L01AB bsr L021D | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
335 cmpa #'- subtract? |
115 | 336 bne L01B9 |
337 bsr L01C7 | |
338 nega | |
339 negb | |
340 sbca #$00 | |
341 bra L01BF | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
342 L01B9 cmpa #'+ add? |
115 | 343 bne L01C5 |
344 bsr L01C7 | |
345 L01BF addd ,s | |
346 std ,s | |
347 bra L01AB | |
348 L01C5 puls pc,b,a | |
349 L01C7 leax $01,x | |
350 L01C9 bsr L01FD | |
351 pshs b,a | |
352 L01CD bsr L021D | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
353 cmpa #'* multiply? |
115 | 354 bne L01E2 |
355 bsr L01FB | |
356 pshs x | |
357 ldx $02,s | |
358 lbsr L0130 | |
359 bcc L01F5 | |
722 | 360 ldb #E$MulOvf |
115 | 361 bra L019F |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
362 L01E2 cmpa #'/ divide? |
115 | 363 bne L01C5 |
364 bsr L01FB | |
365 pshs x | |
366 ldx $02,s | |
367 lbsr L0161 | |
368 bcc L01F5 | |
722 | 369 ldb #E$ZerDiv |
115 | 370 bra L019F |
371 L01F5 puls x | |
372 std ,s | |
373 bra L01CD | |
374 L01FB leax $01,x | |
375 L01FD bsr L0222 | |
376 pshs b,a | |
377 L0201 bsr L021D | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
378 cmpa #'& logical and? |
115 | 379 bne L020F |
380 bsr L0220 | |
381 andb $01,s | |
382 anda ,s | |
383 bra L0219 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
384 L020F cmpa #'! logical or? |
115 | 385 bne L01C5 |
386 bsr L0220 | |
387 orb $01,s | |
388 ora ,s | |
389 L0219 std ,s | |
390 bra L0201 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
391 L021D lbra EatSpace |
115 | 392 L0220 leax $01,x |
393 L0222 bsr L021D | |
722 | 394 cmpa #'^ logical not? |
115 | 395 bne L022E |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
396 bsr ParsExp |
722 | 397 comb not B |
398 coma not A | |
115 | 399 bra L0238 |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
400 L022E cmpa #'- negate? |
115 | 401 bne L023B |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
402 bsr ParsExp |
115 | 403 nega |
404 negb | |
405 sbca #$00 | |
406 L0238 rts | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
407 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
408 ParsExp leax $01,x |
115 | 409 L023B bsr L021D |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
410 cmpa #'( open paren? |
115 | 411 bne L0250 |
412 lbsr L01A5 | |
413 pshs b,a | |
414 bsr L021D | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
415 cmpa #') close paren? |
115 | 416 beq L0282 |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
417 ldb #E$RParen |
115 | 418 bra L0265 |
687 | 419 L0250 cmpa #'[ |
115 | 420 bne L026A |
421 lbsr L01A5 | |
422 tfr d,y | |
423 ldd ,y | |
424 pshs b,a | |
425 bsr L021D | |
687 | 426 cmpa #'] |
115 | 427 beq L0282 |
722 | 428 ldb #E$RBrckt |
115 | 429 L0265 leas $02,s |
430 L0267 lbra L019F | |
687 | 431 L026A cmpa #'< |
115 | 432 bne L0286 |
433 lbsr L01A5 | |
434 tfr d,y | |
435 clra | |
436 ldb ,y | |
437 pshs b,a | |
438 bsr L021D | |
687 | 439 cmpa #'> |
115 | 440 beq L0282 |
722 | 441 ldb #E$RABrkt |
115 | 442 bra L0265 |
443 L0282 leax $01,x | |
444 puls pc,b,a | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
445 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
446 L0286 cmpa #C$PERD |
115 | 447 bne L028F |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
448 ldd <curraddr |
115 | 449 leax $01,x |
450 rts | |
722 | 451 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
452 L028F cmpa #'' ASCII byte? |
115 | 453 bne L0297 |
454 ldd ,x++ | |
455 clra | |
456 rts | |
722 | 457 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
458 L0297 cmpa #'" ASCII word? |
115 | 459 bne L02A0 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
460 leax $01,x point past quote char |
115 | 461 ldd ,x++ |
462 rts | |
722 | 463 |
687 | 464 L02A0 cmpa #': |
115 | 465 bne L02B4 |
466 leax $01,x | |
722 | 467 bsr GetReg get register that follows : |
468 bcs L0267 branch if error | |
469 tsta is this byte or word register? | |
470 bmi L02B1 branch if word | |
471 clra else clear hi byte | |
472 ldb ,y and get byte at offset | |
115 | 473 rts |
722 | 474 L02B1 ldd ,y get word at offset |
475 L02B3 rts return | |
476 | |
115 | 477 L02B4 lbsr L006F |
478 bcc L02B3 | |
479 beq L02BF | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
480 ldb #E$OpMsng |
115 | 481 bra L0267 |
722 | 482 L02BF ldb #E$BadCnt |
115 | 483 bra L0267 |
721 | 484 |
485 * Parse individual register | |
486 * Entry: | |
487 * X = address of register to find | |
488 * Exit: | |
489 * A = register offset value in table | |
490 * Y = ptr to register offset in stack | |
491 GetReg ldb #RegEnts get number of register entries | |
115 | 492 pshs b |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
493 ldd ,x get first two chars in D |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
494 cmpd #$7370 sp? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
495 beq L02D5 branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
496 cmpd #$5350 SP? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
497 bne L02E2 branch if not |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
498 L02D5 leax $02,x move past two chars |
115 | 499 ldd #$0002 |
500 tfr dp,a | |
501 tfr d,y | |
502 lda #$80 | |
503 bra L0314 | |
721 | 504 L02E2 leay >RegList,pcr |
505 L02E6 lda ,y get first char of register entry | |
506 ldb $01,y get second char of register entry | |
507 bne L02F8 branch if two chars | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
508 cmpa ,x same as user input? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
509 beq L0307 yes, a match |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
510 adda #$20 make lowercase |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
511 cmpa ,x same as user input? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
512 beq L0307 yes, a match |
115 | 513 bra L0318 |
721 | 514 L02F8 cmpd ,x same as user input? |
515 beq L0305 yes, a match | |
516 addd #$2020 make uppercase | |
517 cmpd ,x same as user input? | |
518 bne L0318 branch if not | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
519 L0305 leax $01,x point X to next char |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
520 L0307 leax $01,x point X to next char |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
521 lda $02,y get offset |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
522 tfr a,b transfer to B |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
523 andb #$0F mask off hi nibble |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
524 ldy <u0002 get stack in Y |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
525 leay b,y move Y to offset in stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
526 L0314 andcc #^Carry clear carry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
527 puls pc,b return |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
528 |
115 | 529 L0318 leay $03,y |
530 dec ,s | |
531 bne L02E6 | |
116 | 532 orcc #Carry |
115 | 533 puls pc,b |
687 | 534 |
721 | 535 * Register list for 6809/6309 |
536 RegList fcc "CC" | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
537 fcb R$CC |
115 | 538 fcc "DP" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
539 fcb R$DP |
115 | 540 fcc "PC" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
541 fcb $80+R$PC |
115 | 542 fcc "A" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
543 fcb $00,R$A |
115 | 544 fcc "B" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
545 fcb $00,R$B |
115 | 546 fcc "D" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
547 fcb $00,$80+R$A |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
548 IFNE H6309 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
549 fcc "E" |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
550 fcb $00,R$E |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
551 fcc "F" |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
552 fcb $00,R$F |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
553 fcc "W" |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
554 fcb $00,$80+R$E |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
555 ENDC |
115 | 556 fcc "X" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
557 fcb $00,$80+R$X |
115 | 558 fcc "Y" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
559 fcb $00,$80+R$Y |
115 | 560 fcc "U" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
561 fcb $00,$80+R$U |
721 | 562 RegEnts equ (*-RegList)/3 |
115 | 563 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
564 start leas >size,u point S to end of memory |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
565 leas -R$Size,s back off size of register stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
566 sts <u0002 save off |
115 | 567 sts <u0004 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
568 leay >DefBrk,pcr |
691 | 569 sty R$PC,s |
570 lda #Entire | |
571 sta R$CC,s | |
572 tfr s,x X = size-R$Size | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
573 leax >-BuffSiz,x back off appropriate byte count |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
574 stx <buffptr and save off ptr for line buffer |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
575 leax <-UnknSiz,x back off more |
115 | 576 stx <u0008 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
577 leax <-NumBrkPt*3,x |
722 | 578 stx <bptable save pointer to breakpoint table |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
579 clr <curraddr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
580 clr <curraddr+1 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
581 clr <isnarrow |
711 | 582 pshs y,x,b,a |
583 lda #$01 stdout | |
584 ldb #SS.ScSiz get screen size | |
722 | 585 os9 I$GetStt do it! |
711 | 586 bcc L0380 |
587 cmpb #E$UnkSvc | |
588 beq L0387 | |
589 puls x,y,b,a | |
590 lbra L0735 | |
591 L0380 cmpx #80 80 columns? | |
592 beq L0387 branch if so | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
593 inc <isnarrow |
711 | 594 L0387 puls x,y,b,a |
722 | 595 * Clear breakpoint table |
115 | 596 L036A clr ,x+ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
597 cmpx <buffptr |
115 | 598 bcs L036A |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
599 leax >IcptRtn,pcr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
600 lda #$01 SSWI Vector 1 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
601 os9 F$SSWi set software interrupt routine |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
602 os9 F$Icpt set intercept routine |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
603 lbsr WritCR write carriage return |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
604 ldx <buffptr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
605 leay >Title,pcr point to title |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
606 * bsr L03C2 print it |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
607 lbsr CopyY2X print it |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
608 lbsr WritCR2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
609 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
610 * Show prompt and get input from standard input to process |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
611 GetInput leay >Prompt,pcr point to prompt |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
612 lbsr PrintY print it |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
613 lbsr ReadLine read line from std input |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
614 leay >CmdTbl,pcr point to command table |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
615 lda ,x get character from read buffer |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
616 cmpa #'a compare against lowercase a |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
617 bcs L03A2 branch if lower |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
618 suba #$20 make uppercase |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
619 sta ,x and save |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
620 L03A2 leay $03,y walk through table |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
621 lda ,y get char to compare against in A |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
622 beq SyntxErr branch if done |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
623 cmpa ,x same? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
624 bne L03A2 if not, get next |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
625 * Here we have a command match, dispatch it |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
626 leax $01,x move past char |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
627 ldd $01,y get handle address |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
628 leau >L0000,pcr point to start of module |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
629 jsr d,u and branch to subroutine |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
630 bra GetInput |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
631 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
632 * Command wasn't recognized |
722 | 633 SyntxErr ldb #E$CmdErr |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
634 bsr ShowErr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
635 bra GetInput |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
636 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
637 ShowErr os9 F$PErr |
115 | 638 rts |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
639 |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
640 *L03C2 lbra CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
641 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
642 * Show byte at current memptr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
643 DotCmd lda ,x get byte after cmd byte |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
644 cmpa #C$PERD is it a period? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
645 bne L03CF branch if not |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
646 ldd <prevaddr else get previous address |
115 | 647 bra L03DC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
648 L03CF cmpa #C$CR cr? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
649 bne L03D7 branch if not |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
650 L03D3 ldd <curraddr |
115 | 651 bra L03DC |
652 L03D7 lbsr L0195 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
653 bcs ShowErr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
654 L03DC ldx <curraddr get current memory loc |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
655 stx <prevaddr store in previous memory loc |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
656 std <curraddr and save D in new memory loc |
115 | 657 pshs b,a |
658 bsr L0415 | |
659 ldd ,s | |
660 lbsr L0013 | |
661 puls y | |
662 ldb ,y | |
663 lbsr L0027 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
664 lbra WritCR2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
665 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
666 * Show previous byte |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
667 PrevByte ldd <curraddr get current memory address |
721 | 668 IFNE H6309 |
669 decd | |
670 ELSE | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
671 subd #$0001 subtract 1 |
721 | 672 ENDC |
115 | 673 bra L03DC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
674 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
675 * Set byte at current location |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
676 SetLoc bsr L043F |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
677 bcs ShowErr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
678 ldx <curraddr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
679 stb ,x store byte at curraddr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
680 cmpb ,x compare (in case it is ROM) |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
681 beq NextByte branch if equal |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
682 ldb #E$NotRAM else load B with error |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
683 bsr ShowErr and show it |
115 | 684 bra L03D3 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
685 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
686 * Show next byte |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
687 NextByte ldd <curraddr get current memory address |
721 | 688 IFNE H6309 |
689 incd | |
690 ELSE | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
691 addd #$0001 add one to it |
721 | 692 ENDC |
115 | 693 bra L03DC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
694 L0415 ldx <buffptr load X with buffer pointer |
115 | 695 pshs b,a |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
696 leay >Spaces,pcr point to spaces |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
697 * bsr L03C2 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
698 lbsr CopyY2X |
115 | 699 puls pc,b,a |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
700 |
722 | 701 * Calc expression |
702 Calc lbsr L0195 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
703 bcs ShowErr |
115 | 704 bsr L0415 |
705 pshs b,a | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
706 lda #'$ hex prefix |
115 | 707 sta ,x+ |
708 lda ,s | |
709 lbsr L0013 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
710 lda #'# decimal prefix |
115 | 711 sta ,x+ |
712 puls b,a | |
713 lbsr L0040 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
714 lbra WritCR2 |
115 | 715 L043F lbsr L0195 |
716 bcs L044B | |
717 tsta | |
718 beq L044B | |
722 | 719 ldb #E$BytOvf |
116 | 720 orcc #Carry |
115 | 721 L044B rts |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
722 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
723 * Show all registers |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
724 ShowRegs lbsr L0512 |
115 | 725 beq L04AF |
721 | 726 lbsr GetReg |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
727 lbcs ShowErr |
721 | 728 pshs y,a save pointer to register and offset |
115 | 729 lbsr L0512 |
730 bne L0475 | |
731 bsr L0415 | |
721 | 732 puls y,a retreive pointer to register and offset |
733 tsta test A | |
734 bpl L046D branch if positive, means one byte3 | |
735 ldd ,y load D with two bytes | |
115 | 736 lbsr L0021 |
737 bra L0472 | |
721 | 738 L046D ldb ,y load B with one byte |
115 | 739 lbsr L0027 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
740 L0472 lbra WritCR2 |
115 | 741 L0475 lda ,s+ |
742 bpl L0485 | |
743 lbsr L0195 | |
744 puls y | |
745 lbcs L054E | |
746 std ,y | |
747 rts | |
748 L0485 bsr L043F | |
749 puls y | |
750 lbcs L054E | |
751 stb ,y | |
752 rts | |
687 | 753 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
754 ShrtHdr fcc "PC=" |
115 | 755 fcb $00 |
756 fcc "A=" | |
757 fcb $00 | |
758 fcc "B=" | |
759 fcb $00 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
760 IFNE H6309 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
761 fcc "E=" |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
762 fcb $00 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
763 fcc "F=" |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
764 fcb $00 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
765 ENDC |
115 | 766 fcc "CC=" |
767 fcb $00 | |
768 fcc "DP=" | |
769 fcb $00 | |
770 fcc "SP=" | |
771 fcb $00 | |
772 fcc "X=" | |
773 fcb $00 | |
774 fcc "Y=" | |
775 fcb $00 | |
776 fcc "U=" | |
777 fcb $00 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
778 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
779 L04AF tst <isnarrow wide screen? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
780 beq WidRegs branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
781 pshs u save U |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
782 ldx <buffptr point to buffer |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
783 leay <ShrtHdr,pcr |
115 | 784 ldu <u0002 |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
785 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
786 ldd R$PC,u |
720 | 787 IFNE H6309 |
788 lbsr L0505 | |
789 ELSE | |
115 | 790 bsr L0505 |
720 | 791 ENDC |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
792 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
793 ldb R$A,u |
720 | 794 IFNE H6309 |
795 lbsr L050F | |
796 ELSE | |
115 | 797 bsr L050F |
720 | 798 ENDC |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
799 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
800 ldb R$B,u |
735
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
801 IFNE H6309 |
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
802 lbsr L050F |
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
803 ELSE |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
804 bsr L050F |
735
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
805 ENDC |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
806 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
807 IFNE H6309 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
808 ldb R$E,u |
115 | 809 bsr L050F |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
810 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
811 ldb R$F,u |
115 | 812 bsr L050F |
721 | 813 pshs y |
814 lbsr WritCR2 | |
815 puls y | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
816 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
817 ENDC |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
818 ldb R$CC,u |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
819 bsr L050F |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
820 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
821 ldb R$DP,u |
115 | 822 bsr L050F |
721 | 823 IFEQ H6309 |
115 | 824 pshs y |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
825 lbsr WritCR2 |
115 | 826 puls y |
721 | 827 ENDC |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
828 lbsr CopyY2X |
115 | 829 tfr u,d |
830 bsr L0505 | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
831 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
832 ldd R$X,u |
115 | 833 bsr L0505 |
735
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
834 IFNE H6309 |
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
835 pshs y |
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
836 lbsr WritCR2 |
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
837 puls y |
98acb7c3a708
Added code to allow printing of registers in 6309 mode on a narrow screen
boisy
parents:
729
diff
changeset
|
838 ENDC |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
839 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
840 ldd R$Y,u |
115 | 841 bsr L0505 |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
842 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
843 ldd R$U,u |
115 | 844 bsr L0505 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
845 lbsr WritCR2 |
115 | 846 puls pc,u |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
847 * Show registers in wide form |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
848 WidRegs lbsr L0415 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
849 leay >RegHdr,pcr |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
850 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
851 lbsr WritCR2 |
711 | 852 lbsr L0415 |
853 ldd <u0002 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
854 bsr L0505 show SP |
711 | 855 ldy <u0002 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
856 bsr L050D show CC |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
857 bsr L050D show A |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
858 bsr L050D show B |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
859 IFNE H6309 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
860 bsr L050D show E |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
861 bsr L050D show F |
711 | 862 ENDC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
863 bsr L050D show DP |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
864 bsr L0550 show X |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
865 bsr L0550 show Y |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
866 bsr L0550 show U |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
867 bsr L0550 show PC |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
868 lbra WritCR2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
869 |
711 | 870 L0550 ldd ,y++ |
115 | 871 L0505 lbra L0013 |
872 L0508 ldd ,y++ | |
873 lbra L0021 | |
711 | 874 L050D ldb ,y+ |
115 | 875 L050F lbra L0017 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
876 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
877 * Eat spaces and compare char with CR |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
878 L0512 lbsr EatSpace |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
879 cmpa #C$CR |
115 | 880 rts |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
881 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
882 * Set/show breakpoints |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
883 SetBkpt bsr L0512 any parameters? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
884 bne L0538 branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
885 * Here we show all breakpoints |
115 | 886 lbsr L0415 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
887 ldy <bptable get breakpoints base |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
888 ldb #NumBrkPt get breakpoint count |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
889 pshs b save on stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
890 L0526 ldd ,y empty? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
891 beq L052D branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
892 lbsr L0013 else show breakpoint at Y |
115 | 893 L052D leay $03,y |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
894 dec ,s dec breakpoint count |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
895 bne L0526 continue searching |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
896 leas $01,s kill byte on stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
897 lbra WritCR2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
898 * Set breakpoint here |
115 | 899 L0538 lbsr L0195 |
900 bcs L054E | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
901 pshs b,a save desired breakpoint address |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
902 bsr SrchBkpt search to see if it is already in table |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
903 beq L0551 if duplicate, just exit |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
904 IFNE H6309 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
905 clrd else load D with empty address |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
906 ELSE |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
907 ldd #$0000 else load D with empty address |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
908 ENDC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
909 bsr SrchBkpt search for empty |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
910 beq L0551 branch if found |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
911 ldb #E$BPTFull else table is full |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
912 leas $02,s clean up stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
913 L054E lbra ShowErr and show error |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
914 L0551 puls b,a get breakpoint address off stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
915 std ,y and save it at breakpoint entry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
916 rts then return |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
917 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
918 * Search for existing breakpoint that matches address in D |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
919 SrchBkpt pshs u save U |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
920 tfr d,u transfer addr to search in U |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
921 ldb #NumBrkPt get number of breakpoints |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
922 ldy <bptable point Y to base of breakpoints |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
923 L055F cmpu ,y match? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
924 beq L056D branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
925 leay $03,y else move to next entry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
926 decb dec couner |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
927 bne L055F if not 0, continue search |
722 | 928 ldb #E$NoBkPt |
116 | 929 andcc #^Zero |
115 | 930 L056D puls pc,u |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
931 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
932 * Kill breakpoint(s) |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
933 KillBkpt bsr L0512 any parameters? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
934 beq KillAll branch if none |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
935 lbsr L0195 else get parameter |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
936 bcs L054E branch if error |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
937 bsr SrchBkpt |
115 | 938 bne L054E |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
939 IFNE H6309 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
940 clrd |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
941 ELSE |
115 | 942 clra |
943 clrb | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
944 ENDC |
115 | 945 std ,y |
946 rts | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
947 * Kill all breakpoints |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
948 KillAll ldy <bptable |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
949 ldb #NumBrkPt*3 |
115 | 950 L0586 clr ,y+ |
951 decb | |
952 bne L0586 | |
953 rts | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
954 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
955 * Go at address |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
956 GoPC bsr L0512 any parameters? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
957 beq L059A branch if none |
115 | 958 lbsr L0195 |
959 bcs L054E | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
960 ldy <u0002 get execution stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
961 std R$PC,y save new PC |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
962 * Now we set up all breakpoints in memory |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
963 L059A ldy <bptable |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
964 ldb #R$Size get register size |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
965 ldx <u0002 point to registers |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
966 ldx R$PC,x get PC |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
967 L05A3 ldu ,y get breakpoint at entry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
968 beq L05B3 branch if empty |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
969 lda ,u get byte at breakpoint address |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
970 sta $02,y save in breakpoint entry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
971 cmpx ,y is breakpoint same as PC? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
972 beq L05B3 branch if so |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
973 lda #$3F else take SWI instruction |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
974 sta ,u and store it at address of breakpoint |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
975 L05B3 leay $03,y move to next breakpoint entry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
976 decb decrement |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
977 bne L05A3 branch if not complete |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
978 lds <u0002 get execution stack |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
979 rti run program |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
980 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
981 MemDump bsr L0613 |
115 | 982 bcs L054E |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
983 tst <isnarrow |
711 | 984 bne L0615 |
985 orb #$0F | |
986 bra L0617 | |
987 L0615 orb #$07 | |
988 L0617 exg d,u | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
989 tst <isnarrow |
711 | 990 bne L0621 |
991 andb #$F0 | |
992 bra L0623 | |
993 L0621 andb #$F8 | |
994 L0623 pshs u,b,a | |
115 | 995 cmpd $02,s |
996 bcc L05D9 | |
997 L05CD ldy ,s | |
998 leay -$01,y | |
999 cmpy $02,s | |
1000 leay $01,y | |
1001 bcs L05DB | |
1002 L05D9 puls pc,u,b,a | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1003 L05DB ldx <buffptr |
115 | 1004 tfr y,d |
1005 lbsr L0013 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1006 tst <isnarrow |
711 | 1007 bne L0647 |
722 | 1008 ldb #8 |
711 | 1009 bra L0649 |
722 | 1010 L0647 ldb #4 |
711 | 1011 L0649 pshs b |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1012 L05E6 tst <isnarrow |
711 | 1013 bne L0654 |
1014 lbsr L0550 | |
1015 bra L0657 | |
1016 L0654 lbsr L0508 | |
1017 L0657 dec ,s | |
115 | 1018 bne L05E6 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1019 tst <isnarrow |
711 | 1020 bne L0663 |
722 | 1021 ldb #16 |
711 | 1022 bra L0668 |
1023 L0663 lbsr L0019 | |
722 | 1024 ldb #8 |
711 | 1025 L0668 stb ,s |
115 | 1026 ldy $01,s |
1027 L05F7 lda ,y+ | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1028 cmpa #'~ |
115 | 1029 bhi L0601 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1030 cmpa #C$SPAC |
115 | 1031 bcc L0603 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1032 L0601 lda #'. |
115 | 1033 L0603 sta ,x+ |
1034 dec ,s | |
1035 bne L05F7 | |
1036 leas $01,s | |
1037 sty ,s | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1038 lbsr WritCR2 |
115 | 1039 bra L05CD |
1040 L0613 lbsr L0195 | |
1041 bcs L061D | |
1042 tfr d,u | |
1043 lbsr L0195 | |
1044 L061D rts | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1045 |
722 | 1046 ClearMem bsr L0613 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1047 lbcs ShowErr |
722 | 1048 pshs b,a save fill word |
115 | 1049 L0626 cmpu ,s |
1050 bls L062D | |
1051 puls pc,b,a | |
1052 L062D ldd #$8008 | |
1053 sta ,u | |
1054 L0632 cmpa ,u | |
1055 bne L063E | |
1056 lsra | |
1057 lsr ,u | |
1058 decb | |
1059 bne L0632 | |
1060 bra L064E | |
1061 L063E lbsr L0415 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1062 ldd #$2D20 dash, space |
115 | 1063 std ,x++ |
1064 tfr u,d | |
1065 lbsr L0021 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1066 lbsr WritCR2 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1067 L064E leau 1,u |
115 | 1068 bra L0626 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1069 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1070 * Intercept routine |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1071 IcptRtn equ * |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1072 IFNE H6309 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1073 tfr 0,dp |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1074 ELSE |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1075 clra |
115 | 1076 tfr a,dp |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1077 ENDC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1078 IFEQ Level-1 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1079 ldx <D.Proc get curr proc ptr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1080 lda P$ADDR,x get hi word of user addr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1081 tfr a,dp transfer it to DP |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1082 ENDC |
711 | 1083 sts <u0002 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1084 ldd R$PC,s |
721 | 1085 IFNE H6309 |
1086 decd | |
1087 ELSE | |
115 | 1088 subd #$0001 |
721 | 1089 ENDC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1090 std R$PC,s |
115 | 1091 lds <u0004 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1092 lbsr SrchBkpt |
115 | 1093 beq L0672 |
722 | 1094 ldb #E$BadSWI |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1095 lbsr ShowErr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1096 * Clear breakpoints in memory |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1097 L0672 ldy <bptable point to break point table |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1098 ldb #NumBrkPt get number of entries |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1099 L0677 ldx ,y get address in entry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1100 beq L067F branch if empty |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1101 lda $02,y get saved byte |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1102 sta ,x restore it |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1103 L067F leay $03,y move to next entry |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1104 decb dec counter |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1105 bne L0677 continue if not zero |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1106 lbsr WritCR |
115 | 1107 lbsr L0415 |
1108 leay >L07A9,pcr | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1109 lbsr CopyY2X |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1110 lbsr WritCR2 |
115 | 1111 lbsr L04AF |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1112 lbra GetInput |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1113 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1114 LinkMod bsr LinkIt link to module |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1115 lbcs ShowErr branch if error |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1116 ldx <buffptr |
115 | 1117 tfr u,d |
1118 pshs u | |
1119 lbsr L03DC | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1120 lbsr WritCR2 |
115 | 1121 puls u |
1122 bra L06CC | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1123 |
721 | 1124 LinkIt lbsr EatSpace skip over blank spaces at X |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1125 * lda #$00 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1126 clra |
721 | 1127 os9 F$Link link to module name at X |
115 | 1128 rts |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1129 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1130 * Prepare module for execution |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1131 PrepMod bsr LinkIt |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1132 lbcs ShowErr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1133 ldd M$Mem,u get memory requirements |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1134 addd #512 add an extra 512 bytes |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1135 os9 F$Mem allocate, Y = upperbound |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1136 bcc UnlinkIt branch if ok |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1137 lbsr ShowErr show error |
711 | 1138 L06CC equ * |
1139 IFEQ Level-1 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1140 os9 F$UnLink |
711 | 1141 ENDC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1142 rts and return |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1143 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1144 UnlinkIt os9 F$UnLink unlink module |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1145 pshs u,y,x save u,y,x |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1146 L06D5 lda ,x+ get next parameter char |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1147 cmpa #C$CR carriage return? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1148 bne L06D5 branch if not |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1149 clrb start at zero |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1150 L06DC lda ,-x get parameter char |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1151 sta ,-y store in buffer |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1152 incb continue |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1153 cmpx ,s reached start of parameter? |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1154 bhi L06DC branch if not |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1155 sty -R$U,y |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1156 leay -R$Size,y |
115 | 1157 sty <u0002 |
1158 clra | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1159 std R$A,y |
115 | 1160 puls u,x,b,a |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1161 stx R$Y,y |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1162 ldd M$Exec,u get exec offset in D |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1163 leax d,u point X to execution address |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1164 stx R$PC,y save at PC |
115 | 1165 tfr cc,a |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1166 ora #Entire |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1167 sta R$CC,y |
115 | 1168 tfr dp,a |
1169 adda #$02 | |
1170 clrb | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1171 std R$U,y |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1172 sta R$DP,y |
115 | 1173 lbra L04AF |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1174 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1175 * Fork program (default is shell) |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1176 ForkPrg lbsr EatSpace skip leading spaces |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1177 IFNE H6309 |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1178 clrd |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1179 ELSE |
115 | 1180 clra |
1181 clrb | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1182 ENDC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1183 tfr x,u move param ptr to U |
115 | 1184 tfr d,y |
1185 L0715 leay $01,y | |
1186 lda ,x+ | |
687 | 1187 cmpa #C$CR |
115 | 1188 bne L0715 |
1189 clra | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1190 leax <ShellNam,pcr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1191 os9 F$Fork fork shell plus any parameters |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1192 bcs L0729 branch if error |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1193 os9 F$Wait wait for shell to finish |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1194 L0729 lbcs ShowErr branch if error |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1195 rts and return |
687 | 1196 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1197 ShellNam fcc "shell" |
687 | 1198 fcb $00 |
1199 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1200 * Exit without error |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1201 ExitOk clrb |
711 | 1202 L0735 os9 F$Exit |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1203 |
722 | 1204 * Search for byte or word from . to end address |
1205 * Syntax: S endaddr byte | |
1206 * S endaddr word | |
1207 SrchMem lbsr L0613 | |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1208 lbcs ShowErr |
115 | 1209 pshs u |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1210 ldx <curraddr |
722 | 1211 tsta byte or word? |
1212 bne L0750 branch if word | |
1213 L0746 cmpb ,x+ byte in B match byte at ,X? | |
1214 beq L075C branch if so | |
1215 cmpx ,s is X equal to end? | |
1216 bne L0746 branch if not | |
1217 puls pc,u else we're done | |
1218 L0750 cmpd ,x+ byte in B match byte at ,X? | |
1219 beq L075C branch if so | |
115 | 1220 cmpx ,s |
722 | 1221 bne L0750 branch if not |
115 | 1222 puls pc,u |
722 | 1223 L075C leax -$01,x back up to mem location found |
1224 tfr x,d put memory location in D | |
1225 leas $02,s wipe out stack | |
115 | 1226 lbra L03DC |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1227 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1228 DefBrk swi |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1229 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1230 Title fcc "Interactive Debugger" |
115 | 1231 fcb $00 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1232 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1233 Prompt fcc "DB: " |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1234 fcb $00 |
721 | 1235 Spaces fcc " " |
115 | 1236 fcb $00 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1237 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1238 IFNE H6309 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1239 RegHdr fcc " SP CC A B E F DP X Y U PC" |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1240 ELSE |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1241 RegHdr fcc " SP CC A B DP X Y U PC" |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1242 ENDC |
115 | 1243 fcb $00 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1244 |
115 | 1245 L07A9 fcc "BKPT" |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1246 CmdTbl fcc ": " |
115 | 1247 fcb $00 |
687 | 1248 fcc /./ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1249 fdb DotCmd |
687 | 1250 fcc /=/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1251 fdb SetLoc |
687 | 1252 fcb C$CR |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1253 fdb NextByte |
687 | 1254 fcb C$SPAC |
722 | 1255 fdb Calc |
687 | 1256 fcc /-/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1257 fdb PrevByte |
687 | 1258 fcc /:/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1259 fdb ShowRegs |
687 | 1260 fcc /K/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1261 fdb KillBkpt |
687 | 1262 fcc /M/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1263 fdb MemDump |
687 | 1264 fcc /C/ |
722 | 1265 fdb ClearMem |
687 | 1266 fcc /B/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1267 fdb SetBkpt |
687 | 1268 fcc /G/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1269 fdb GoPC |
687 | 1270 fcc /L/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1271 fdb LinkMod |
687 | 1272 fcc /E/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1273 fdb PrepMod |
687 | 1274 fcc /$/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1275 fdb ForkPrg |
687 | 1276 fcc /Q/ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1277 fdb ExitOk |
687 | 1278 fcc /S/ |
722 | 1279 fdb SrchMem |
115 | 1280 fcb $00 |
687 | 1281 |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1282 * Append CR and write to std out |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1283 WritCR ldx <buffptr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1284 WritCR2 lda #C$CR |
687 | 1285 sta ,x+ |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1286 ldx <buffptr |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1287 ldy #81 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1288 bra WrStdOut |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1289 |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1290 PrintY tfr y,x |
115 | 1291 tfr y,u |
1292 ldy #$0000 | |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1293 PrintYL ldb ,u+ get next char |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1294 beq WrStdOut write it |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1295 leay $01,y increase Y |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1296 bra PrintYL get more |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1297 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1298 * Write To Standard Output |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1299 * Entry: |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1300 * X = address of buffer to write |
729
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1301 * Exit: |
29036be0e9d8
Bumped to edition 10, made minor optimizations, needs testing
boisy
parents:
722
diff
changeset
|
1302 * X = address of program's buffptr |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1303 WrStdOut lda #$01 stdout |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1304 os9 I$WritLn write it! |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1305 ldx <buffptr |
115 | 1306 rts |
719
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1307 |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1308 * Read From To Standard Input |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1309 * Exit: |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1310 * X = address of buffer to data read |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1311 ReadLine ldx <buffptr point to buffer |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1312 ldy #80 read up to 80 chars |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1313 clra from stdin |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1314 os9 I$ReadLn do it! |
ff559935b40a
Major changes, incorporated ed #9 from Level Two to OS-9 Level One, added
boisy
parents:
711
diff
changeset
|
1315 ldx <buffptr reload X with line |
115 | 1316 rts |
1317 | |
1318 emod | |
1319 eom equ * | |
1320 end |