annotate level2/modules/scf.asm @ 372:b3bfa479f8d0

scfdefs is now included from level2v3/defsfile and all references to it in sources have been removed
author boisy
date Fri, 23 Aug 2002 19:14:07 +0000
parents 6641a883d6b0
children 2e62fb1ec356
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
1 ********************************************************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
2 * SCF - Sequential Character file manager
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
3 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
4 * $Id$
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
5 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
6 * This contains an added SetStat call to allow placing prearranged
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
7 * data into the keyboard buffer of ANY SCF related device.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
8 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
9 * This also includes Kevin Darlings SCF Editor patches.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
10 * This means windows, VDG screens, terminals, etc.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
11 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
12 * Remember to have a Carriage Return ($0D) at the end of the buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
13 * to terminate it without having trailing garbage (this will be fixed
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
14 * to be automatic in a future version).
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
15 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
16 * ENTRY PARAMETERS:
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
17 * x = Address of string to place in buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
18 * y = Length of the string to place in buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
19 * a = Path number (usually 0)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
20 * b = $A0 (syscall SETSTAT function call number)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
21 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
22 * Ed. Comments Who YY/MM/DD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
23 * ------------------------------------------------------------------
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
24 * 13 Obtained from L2 Upgrade archive
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
25 * 16 Updated to Curtis Boyle's version, contains BGP 98/10/20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
26 * several optimizations and new SetStat to
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
27 * stuff any string in the input buffer.
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
28
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
29 nam SCF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
30 ttl Sequential Character file manager
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
32 * Disassembled 98/08/24 22:11:42 by Disasm v1.6 (C) 1988 by RML
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
33
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
34 ifp1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
35 use defsfile
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
36 endc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
37
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
38 tylg set FlMgr+Objct
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
39 atrv set ReEnt+rev
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
40 rev set $00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
41 edition set 16
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
42
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
43 mod eom,name,tylg,atrv,start,size
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
44
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
45 u0000 rmb 0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
46 size equ .
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
47
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
48 name fcs /SCF/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
49 fcb edition
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
50
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
51 start lbra Create
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
52 lbra Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
53 lbra MakDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
54 lbra ChgDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
55 lbra Delete
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
56 lbra Seek
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
57 lbra Read
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
58 lbra Write
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
59 lbra ReadLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
60 lbra WriteLn
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
61 lbra GetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
62 lbra SetStat
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
63 lbra Term
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
64
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
65 L0038 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
66
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
67 * ChgDir/Makdir entry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
68 ChgDir
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
69 MakDir comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
70 ldb #E$BPNam
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
71 L003D rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
72
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
73
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
74 ******************************
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
75 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
76 * Create or open a path to device
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
77 *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
78 * Entry: Y = Path descriptor pointer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
79 * U = Callers register stack pointer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
80
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
81 * Check for pathname legality
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
82 Open
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
83 Create ldx PD.DEV,y get device table entry pointer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
84 stx <PD.TBL,y save copy of pointer in path desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
85 ldu PD.RGS,y get caller's regs
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
86 pshs y save pointer to path desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
87 ldx R$X,u get caller's X (device name)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
88 os9 F$PrsNam parse name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
89 bcs L0038 branch if error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
90 tsta end of pathname?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
91 bmi L0058 yes, go on
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
92
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
93 * We're not at the end of the pathname parse it again
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
94
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
95 leax ,y point to actual device name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
96 os9 F$PrsNam get next pathlist element
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
97 bcc L0038 if valid, branch to error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
98
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
99 * Legal pathname detected let's keep going
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
101 L0058 sty R$X,u save updated pathlist pointer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
102 puls y retrieve path desc pointer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
103
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
104 * Allocate input buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
105
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
106 ldd #256 get size of input buffer in bytes
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
107 os9 F$SRqMem allocate path desc buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
108 bcs L003D can't allocate it, return with error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
109 stu PD.BUF,y save off in path desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
110
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
111 * Preload buffer with string & CR's
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
112
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
113 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
114 bsr FillBuf
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
115
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
116 * cute message
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
117 fcc /by K.Kaplan, L.Crane, R.Doggett/
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
118 fcb C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
119
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
120 * put cute message into our newly allocated PD buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
121 FillBuf puls x get PC into X (points to cute message)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
122 L008D lda ,x+ get byte of string, XOR it
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
123 sta ,u+ store it in buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
124 decb dec count
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
125 cmpa #C$CR carriage return?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
126 bne L008D nope, continue
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
127 putcr sta ,u+ continue putting C$CRs...
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
128 decb in buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
129 bne putcr until we've reached end
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
130
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
131 * Set up lines per page
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
132
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
133 ldu PD.DEV,y get device table entry ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
134 beq MakDir if none, branch to error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
135 ldx V$STAT,u X = static storage ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
136 lda <PD.PAG,y get page len from dev desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
137 sta V.LINE,x store in static
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
138
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
139 * Attach to device by name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
140
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
141 ldx V$DESC,u get pointer to dev desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
142 ldd <PD.D2P,y get pointer to dev2 name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
143 beq L00CF branch if none
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
144 leax d,x else X = addr of name
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
145 lda PD.MOD,y get dev mode
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
146 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
147 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
148 lsra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
149 rolb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
150 rola
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
151 rorb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
152 rola
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
153 pshs y save path desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
154 ldy <D.Proc get current proc desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
155 ldu <D.SysPrc get system proc desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
156 stu <D.Proc make system current process
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
157 os9 I$Attach attach to dev2 on behalf of system
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
158 sty <D.Proc restore old current proc desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
159 puls y restore path desc ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
160 bcs L0111 branch if error
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
161
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
162 * Device attached update pointers
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
163
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
164 stu PD.DV2,y else save dev tbl ptr to dev2 in path desc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
165 ldu PD.DEV,y get our dev's dev table addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
166 L00CF ldu V$STAT,u get static storage pointer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
167 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
168 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
169 std <PD.PLP,y clear path desc list ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
170 sta <PD.PST,y and path status
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
171 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
172 ldx <V.PDLHd,u get pointer to path desc head ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
173 bne L00E8 branch if not zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
174 sty <V.PDLHd,u else save our path desc ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
175 bra L00F8 and branch
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
176
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
177 L00E6 tfr d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
178 L00E8 ldb <PD.PST,x get path status
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
179 bne L00EF branch if not zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
180 inc 1,s else inc b on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
181 L00EF ldd <PD.PLP,x get path desc list ptr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
182 bne L00E6 branch if not zero
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
183 sty <PD.PLP,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
184 L00F8 lda #$29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
185 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
186 inc $02,s inc B on stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
187 lbsr L025B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
188 lda $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
189 leas $03,s clean up stack
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
190 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
191 bcs L010F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
192 bne L010D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
193 lbra L0250
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
194
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
195 L010D clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
196 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
197
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
198 L010F bsr L0149
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
199 L0111 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
200 bsr L0136
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
201 puls pc,b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
202
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
203 Term pshs cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
204 orcc #IntMasks
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
205 ldx PD.DEV,y get dev table entry addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
206 bsr L0182
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
207 ldx $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
208 bsr L0182
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
209 puls cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
210 tst $02,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
211 beq L012B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
212
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
213 Delete
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
214 Seek clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
215 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
216
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
217 L012B bsr L0149
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
218 lda #$2A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
219 pshs x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
220 lbsr L025B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
221 leas $03,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
222 L0136 ldu $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
223 beq L013D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
224 os9 I$Detach
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
225 L013D ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
226 beq L0147
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
227 ldd #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
228 os9 F$SRtMem
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
229 L0147 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
230 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
231
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
232 L0149 ldx #$0001
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
233 pshs u,y,x,b,a,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
234 ldu $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
235 beq L017B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
236 ldu $02,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
237 beq L017B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
238 ldx <$16,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
239 beq L017B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
240 ldd <$3D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
241 cmpy <$16,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
242 bne L0172
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
243 std <$16,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
244 bne L017B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
245 clr $04,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
246 bra L017B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
247 L016D ldx <$3D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
248 beq L0180
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
249 L0172 cmpy <$3D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
250 bne L016D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
251 std <$3D,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
252 L017B clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
253 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
254 std <$3D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
255 L0180 puls pc,u,y,x,b,a,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
256
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
257 L0182 leax V$DRIV,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
258 beq Delete
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
259 ldx $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
260 ldb PD.PD,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
261 lda PD.CPR,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
262 pshs y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
263 cmpa $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
264 bne L01CA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
265 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
266 leax <P$Path,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
267 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
268 L0198 cmpb a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
269 beq L01CA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
270 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
271 cmpa #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
272 bcs L0198
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
273 pshs y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
274 ldd #$1B0C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
275 bsr L01FA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
276 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
277 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
278 lda P$PID,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
279 sta ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
280 os9 F$GProcP
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
281 leax <$30,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
282 ldb $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
283 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
284 L01B9 cmpb a,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
285 beq L01C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
286 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
287 cmpa #$10
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
288 bcs L01B9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
289 clr ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
290 L01C4 lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
291 ldx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
292 sta $03,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
293 L01CA puls pc,y,x,b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
294
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
295 GetStat lda <$3F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
296 lbne L04C6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
297 ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
298 lda R$B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
299 bne L01F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
300 pshs y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
301 lda #$28
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
302 sta R$B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
303 ldu R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
304 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
305 bsr L01F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
306 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
307 puls y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
308 sta R$B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
309 ldd R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
310 stu R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
311 bcs L01F6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
312 std <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
313 L01F6 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
314 L01F7 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
315
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
316 L01F8 ldb #$09
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
317 L01FA pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
318 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
319 ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
320 ldu V$STAT,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
321 ldx V$DRIV,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
322 addd $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
323 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
324 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
325 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
326 jsr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
327 puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
328
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
329 SetStat lbsr L04A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
330 L0212 bsr L021B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
331 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
332 lbsr L0453
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
333 puls pc,b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
334
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
335 * Place data in keyboard buffer
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
336
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
337 putkey cmpa #$A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
338 bne L01FA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
339 pshs x,y,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
340 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
341 lda P$Task,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
342 ldb <D.SysTsk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
343 ldx R$X,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
344 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
345 ldx R$Y,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
346 ldu PD.BUF,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
347 tfr x,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
348 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
349 os9 F$Move
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
350 tfr y,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
351 leau d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
352 lda #C$CR
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
353 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
354 puls x,y,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
355 bcs L01F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
356 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
357
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
358 L021B ldb #$0C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
359 lda $02,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
360 bne putkey
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
361 ldx <$27,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
362 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
363 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
364 lda P$Task,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
365 ldb <D.SysTsk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
366 ldx $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
367 leau <$20,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
368 ldy #$001A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
369 os9 F$Move
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
370 puls y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
371 bcs L01F7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
372 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
373 ldd <$27,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
374 cmpd ,s++
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
375 beq L0250
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
376 ldu $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
377 ldu $02,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
378 beq L0250
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
379 stb $07,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
380 L0250 ldx <$34,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
381 lda #$28
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
382 pshs x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
383 bsr L025B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
384 puls pc,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
385
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
386 L025B pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
387 ldx PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
388 ldu R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
389 lda R$B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
390 pshs u,y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
391 ldd <$10,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
392 std R$Y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
393 lda $0F,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
394 sta R$B,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
395 ldb #$0C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
396 lbsr L04A7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
397 lbsr L0212
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
398 puls u,y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
399 stu $06,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
400 sta $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
401 bcc L0282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
402 cmpb #$D0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
403 beq L0282
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
404 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
405 L0282 puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
406
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
407 * Device Read routine
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
408
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
409 Read lbsr L04A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
410 bcc L028A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
411 L0289 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
412
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
413 L028A inc PD.RAW,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
414 ldx R$Y,u get character count from callers Y register
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
415 beq L02DC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
416 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
417 lbsr L03B5 get buffer address
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
418 lbsr L03E2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
419 bcs L02A4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
420 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
421 beq L02C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
422 cmpa <PD.EOF,y end of file character?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
423 bne L02BC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
424 L02A2 ldb #E$EOF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
425 L02A4 leas 2,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
426 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
427 bsr L02D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
428 comb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
429 puls pc,b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
430
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
431 L02AD tfr x,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
432 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
433 bne L02B7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
434 lbsr L042B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
435 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
436 L02B7 lbsr L03E2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
437 bcs L02A4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
438 L02BC tst <PD.EKO,y echo turned on?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
439 beq L02C4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
440 lbsr L0565
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
441 L02C4 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
442 sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
443 beq L02CF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
444 cmpa <PD.EOR,y end of record character?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
445 beq L02D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
446 L02CF cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
447 bcs L02AD
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
448 L02D3 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
449 L02D5 lbsr L042B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
450 ldu $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
451 stx $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
452 L02DC lbra L0453
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
453
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
454 ReadLn lbsr L04A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
455 bcs L0289
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
456 ldx $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
457 beq L02D5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
458 tst $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
459 beq L02EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
460 ldx #$0100
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
461 L02EF pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
462 ldd #$FFFF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
463 std $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
464 lbsr L03B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
465 L02F9 lbra L05F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
466 bcs L0370
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
467 L02FE tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
468 beq L030C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
469 ldb #$29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
470 L0303 cmpa b,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
471 beq L032C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
472 incb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
473 cmpb #$31
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
474 bls L0303
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
475 L030C cmpx $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
476 bls L0312
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
477 stx $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
478 L0312 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
479 cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
480 bcs L0322
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
481 lda <$33,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
482 lbsr L0565
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
483 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
484 bra L02F9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
485 L0322 lbsr L0403
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
486 sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
487 lbsr L0413
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
488 bra L02F9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
489 L032C pshs pc,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
490 leax >L033F,pcr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
491 subb #$29
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
492 lslb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
493 leax b,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
494 stx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
495 puls x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
496 jsr [,s++]
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
497 bra L02F9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
498 L033F bra L03BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
499 bra L03A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
500 bra L0351
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
501 bra L0366
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
502 bra L0381
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
503 bra L038B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
504 puls pc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
505 bra L03A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
506 bra L03A5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
507 L0351 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
508 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
509 lbsr L0413
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
510 ldu $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
511 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
512 stx $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
513 lbsr L042B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
514 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
515 lbra L0453
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
516 L0366 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
517 leax ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
518 lbeq L02A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
519 bra L030C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
520 L0370 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
521 lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
522 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
523 bsr L037D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
524 puls b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
525 lbra L02A4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
526 L037D lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
527 bra L03D7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
528 L0381 lda <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
529 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
530 bsr L03B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
531 L0388 lbsr L0418
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
532 L038B cmpx $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
533 beq L03A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
534 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
535 cmpx $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
536 bcc L03A0
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
537 lda ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
538 beq L0388
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
539 cmpa <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
540 bne L0388
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
541 leau -$01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
542 L03A0 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
543 L03A2 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
544
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
545 L03A3 bsr L03BF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
546 L03A5 leax ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
547 beq L03B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
548 tst <$23,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
549 beq L03A3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
550 tst <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
551 beq L03B5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
552 bsr L037D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
553 L03B5 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
554 ldu $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
555 L03BA rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
556 L03BB leax ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
557 beq L03A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
558 L03BF leau -$01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
559 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
560 tst <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
561 beq L03BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
562 tst <$22,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
563 beq L03D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
564 bsr L03D4
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
565 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
566 lbsr L0565
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
567 L03D4 lda <$32,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
568 L03D7 lbra L0565
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
569 L03DA pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
570 ldx $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
571 ldu $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
572 bra L03EA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
573
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
574 L03E2 pshs u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
575 ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
576 ldu PD.DV2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
577 beq L03F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
578 L03EA ldu V$STAT,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
579 ldb <PD.PAG,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
580 stb V.LINE,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
581 L03F1 leax ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
582 beq L0401
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
583 tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
584 ldu V$STAT,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
585 std V.DEV2,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
586 ldu #$0003
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
587 lbsr L05CC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
588 L0401 puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
589
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
590 L0403 tst <$21,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
591 beq L0412
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
592 cmpa #$61
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
593 bcs L0412
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
594 cmpa #$7A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
595 bhi L0412
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
596 suba #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
597 L0412 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
598
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
599 L0413 tst <$24,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
600 beq L0412
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
601 L0418 cmpa #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
602 bcc L0420
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
603 cmpa #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
604 bne L0423
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
605 L0420 lbra L0565
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
606 L0423 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
607 lda #$2E
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
608 bsr L0420
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
609 puls pc,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
610
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
611 L042B pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
612 ldd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
613 beq L0451
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
614 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
615 bne L0435
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
616 deca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
617 L0435 clrb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
618 ldu $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
619 ldu $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
620 leau d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
621 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
622 ldb $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
623 bne L0442
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
624 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
625 L0442 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
626 lda <D.SysTsk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
627 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
628 ldb P$Task,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
629 ldx P$User,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
630 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
631 os9 F$Move
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
632 L0451 puls pc,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
633
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
634 L0453 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
635 lda P$ID,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
636 ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
637 bsr L045D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
638 ldx PD.FST,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
639 L045D beq L0467
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
640 ldx V$STAT,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
641 cmpa V.BUSY,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
642 bne L0467
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
643 clr V.BUSY,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
644 L0467 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
645
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
646 L0468 pshs x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
647 ldx V$STAT,x get dev static storage addr
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
648 lda V.BUSY,x get active proc ID
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
649 beq L048A it's not busy, go on
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
650 cmpa ,s same process?
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
651 beq L049F yes...
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
652 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
653 bsr L0453
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
654 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
655 os9 F$IOQu
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
656 inc PD.MIN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
657 ldx <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
658 ldb <P$Signal,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
659 puls x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
660 beq L0468
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
661 coma
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
662 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
663
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
664 L048A lda ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
665 sta V.BUSY,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
666 sta V.LPRC,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
667 lda <PD.PSC,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
668 sta V.PCHR,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
669 ldd <PD.INT,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
670 std V.INTR,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
671 ldd <PD.XON,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
672 std V.XON,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
673 L049F clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
674 puls pc,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
675
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
676 L04A2 lda <PD.PST,y get path status
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
677 bne L04C4 exit if anything there
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
678 L04A7 ldx <D.Proc get process ID
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
679 lda P$ID,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
680 clr PD.MIN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
681 ldx PD.DEV,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
682 bsr L0468
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
683 bcs L04C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
684 ldx PD.DV2,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
685 beq L04BB
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
686 bsr L0468
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
687 bcs L04C1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
688 L04BB tst PD.MIN,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
689 bne L04A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
690 clr PD.RAW,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
691 L04C1 ldu PD.RGS,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
692 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
693
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
694 L04C4 leas $02,s purge return address
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
695 L04C6 ldb #E$HangUp
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
696 cmpa #S$Abort
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
697 bcs L04D3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
698 lda PD.CPR,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
699 ldb #S$Kill
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
700 os9 F$Send
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
701 L04D3 inc <PD.PST,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
702 orcc #Carry
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
703 rts
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
704
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
705 WriteLn bsr L04A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
706 bra L04E1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
707 Write bsr L04A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
708 inc $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
709 L04E1 ldx $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
710 beq L055A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
711 pshs x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
712 ldx #$0000
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
713 bra L04F1
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
714 L04EC tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
715 tstb
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
716 bne L0523
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
717 L04F1 pshs y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
718 ldd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
719 ldu $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
720 ldx $04,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
721 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
722 ldd $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
723 subd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
724 cmpd #$0020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
725 bls L0508
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
726 ldd #$0020
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
727 L0508 pshs b,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
728 ldd $08,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
729 inca
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
730 subd ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
731 tfr d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
732 lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
733 sta -$01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
734 ldy <D.Proc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
735 lda P$Task,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
736 ldb <D.SysTsk
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
737 puls y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
738 os9 F$Move
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
739 puls y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
740 L0523 lda ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
741 tst $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
742 bne L053D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
743 lbsr L0403
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
744 cmpa #$0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
745 bne L053D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
746 lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
747 tst <$25,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
748 bne L053D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
749 bsr L0573
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
750 bcs L055D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
751 lda #$0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
752 L053D bsr L0573
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
753 bcs L055D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
754 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
755 cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
756 bcc L0554
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
757 lda -$01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
758 beq L04EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
759 cmpa <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
760 bne L04EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
761 tst $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
762 bne L04EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
763 L0554 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
764 L0556 ldu $06,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
765 stx $06,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
766 L055A lbra L0453
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
767 L055D leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
768 pshs b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
769 bsr L0556
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
770 puls pc,b,cc
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
771
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
772 L0565 pshs u,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
773 ldx $0A,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
774 beq L0571
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
775 cmpa #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
776 beq L05A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
777 L056F bsr L05C9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
778 L0571 puls pc,u,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
779
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
780 L0573 pshs u,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
781 ldx $03,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
782 cmpa #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
783 bne L056F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
784 ldu $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
785 tst $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
786 bne L0590
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
787 tst $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
788 bne L05A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
789 tst <$27,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
790 beq L05A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
791 dec $07,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
792 bne L05A2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
793 bra L059A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
794 L0590 lbsr L03DA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
795 bcs L059A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
796 cmpa <$2F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
797 bne L0590
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
798 L059A lbsr L03DA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
799 cmpa <$2F,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
800 beq L059A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
801 L05A2 ldu $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
802 clr $08,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
803 lda #$0D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
804 bsr L05C9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
805 tst $0C,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
806 bne L05C7
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
807 ldb <$26,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
808 pshs b
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
809 tst <$25,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
810 beq L05BE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
811 lda #$0A
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
812 L05BA bsr L05C9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
813 bcs L05C5
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
814 L05BE lda #$00
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
815 dec ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
816 bpl L05BA
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
817 clra
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
818 L05C5 leas $01,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
819 L05C7 puls pc,u,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
820
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
821 L05C9 ldu #$0006
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
822 L05CC pshs u,y,x,a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
823 ldu $02,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
824 clr $05,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
825 ldx ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
826 ldd $09,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
827 addd $05,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
828 leax d,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
829 lda ,s+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
830 jsr ,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
831 puls pc,u,y,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
832 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
833 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
834 nop
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
835
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
836 L05E3 lbra L02FE
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
837 L05E6 lbra L03E2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
838 L05E9 lbra L0370
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
839 L05EC lbra L038B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
840 L05EF lbra L0565
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
841 L05F2 lbra L0418
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
842 lbra L030C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
843
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
844 L05F8 bsr L05E6
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
845 bcs L05E9
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
846 tsta
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
847 beq L05E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
848 ldb <$2D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
849 cmpb #$04
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
850 beq L05E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
851 cmpa <$2D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
852 bne L0629
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
853 cmpx $0D,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
854 beq L0622
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
855 leax $01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
856 cmpx ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
857 bcc L0620
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
858 lda ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
859 beq L0624
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
860 cmpa <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
861 bne L0624
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
862 leau -$01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
863 L0620 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
864 L0622 bra L05F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
865 L0624 lbsr L05F2
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
866 bra L05F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
867
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
868 * Line editor functions
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
869
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
870 L0629 cmpa #$13 cntrl-up arrow? (print rest of line)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
871 bne L0647
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
872 L062D pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
873 bsr L05EC
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
874 lda <$32,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
875 L0634 cmpu ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
876 beq L0642
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
877 leau -$01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
878 leax -$01,x
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
879 lbsr L05EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
880 bra L0634
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
881 L0642 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
882 lbra L05F8
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
883
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
884 L0647 cmpa #$11 cntrl-right arrow? (insert character)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
885 bne L0664
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
886 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
887 tfr u,d
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
888 ldb #$FF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
889 tfr d,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
890 L0653 lda ,-u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
891 sta $01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
892 cmpu ,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
893 bne L0653
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
894 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
895 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
896 leas $02,s
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
897 bra L062D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
898
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
899 L0664 cmpa #$10 cntrl-left arrow? (Delete character)
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
900 bne L068B
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
901 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
902 lda ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
903 cmpa <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
904 beq L0687
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
905 L0671 lda $01,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
906 cmpa <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
907 beq L067C
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
908 sta ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
909 bra L0671
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
910 L067C lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
911 cmpa ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
912 bne L0685
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
913 lda <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
914 L0685 sta ,u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
915 L0687 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
916 bra L062D
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
917 L068B cmpa <$2B,y
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
918 lbne L05E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
919 pshs u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
920 bra L069F
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
921 L0696 pshs a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
922 lda #$20
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
923 lbsr L05EF
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
924 puls a
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
925 L069F cmpa ,u+
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
926 bne L0696
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
927 puls u
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
928 lbra L05E3
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
929
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
930 emod
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
931 eom equ *
6641a883d6b0 Initial revision
boisy
parents:
diff changeset
932 end