annotate level1/modules/rfm.asm @ 2456:4440d608386b

Fixed bug -- list works again
author boisy
date Sat, 27 Feb 2010 00:55:27 +0000
parents f90849557586
children c840e05abdac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
1 ********************************************************************
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
2 * RFM - Remote File Manager
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
3 *
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
4 *
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
5 * 1 2010/02/20 AAW
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
6 * first version - just send ops
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
7
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
8 nam RFM
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
9 ttl Remote File Manager
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
10
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
11 ifp1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
12 use defsfile
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
13 use rfmdefs
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
14 use dwdefs.d
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
15 endc
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
16
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
17 tylg set FlMgr+Objct
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
18 atrv set ReEnt+rev
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
19 rev set 0
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
20 edition equ 1
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
21
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
22 mod eom,RFMName,tylg,atrv,RFMEnt,size
2442
8f5daacfb035 RFM: oh the humanity
aaronwolfe
parents: 2441
diff changeset
23
8f5daacfb035 RFM: oh the humanity
aaronwolfe
parents: 2441
diff changeset
24
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
25 size equ .
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
26
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
27
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
28 RFMName fcs /RFM/
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
29 fcb edition
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
30
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
31
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
32
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
33 ******************************
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
34 *
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
35 * file manager entry point
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
36 *
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
37 * Entry: Y = Path descriptor pointer
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
38 * U = Callers register stack pointer
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
39 *
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
40
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
41 RFMEnt lbra create Create path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
42 lbra open Open path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
43 lbra makdir Makdir
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
44 lbra chgdir Chgdir
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
45 lbra delete Delete
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
46 lbra seek Seek
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
47 lbra read Read character
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
48 lbra write Write character
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
49 lbra readln ReadLn
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
50 lbra writln WriteLn
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
51 lbra getstt Get Status
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
52 lbra setstt Set Status
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
53 lbra close Close path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
54
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
55 create ldb #DW.create
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
56 bra create1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
57
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
58
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
59 open ldb #DW.open
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
60 create1
2453
3bb4f67bc934 Load V$STAT properly
boisy
parents: 2452
diff changeset
61 ldx PD.DEV,y ; get ptr to our device memory
3bb4f67bc934 Load V$STAT properly
boisy
parents: 2452
diff changeset
62 ldx V$STAT,x ; get ptr to our static storage
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
63 pshs x,y,u ; save all on stack
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
64 stb V.DWCMD,x
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
65
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
66 * TODO lets not create multiple buffers when multiple open/create on same path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
67 * get system mem
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
68 ldd #256
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
69 os9 F$SRqMem ; ask for D bytes (# bytes server said is coming)
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
70 lbcs open2
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
71 stu V.BUF,x
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
72
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
73 * use PrsNam to validate pathlist and count length
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
74 ldu 4,s ; get pointer to caller's registers
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
75 ldy R$X,u
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
76 sty V.PATHNAME,x
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
77 tfr y,x
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
78 prsloop os9 F$PrsNam
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
79 bcs open2
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
80 tfr y,x
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
81 anda #$7F
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
82 cmpa #PENTIR
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
83 bne chkdelim
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
84 ldb #E$BPNam
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
85 bra openerr
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
86 chkdelim cmpa #PDELIM
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
87 beq prsloop
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
88 * at this point X points to the character AFTER the last character in the name
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
89 * update callers R$X
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
90 ldu 4,s ; get caller's registers
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
91 stx R$X,u
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
92
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
93 * compute the length of the pathname and save it
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
94 tfr x,d
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
95 ldx ,s ; get the device memory pointer
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
96 subd V.PATHNAME,x
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
97 std V.PATHNAMELEN,x ; save the length
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
98
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
99 * put command byte & path # on stack
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
100 lda V.DWCMD,x
2456
4440d608386b Fixed bug -- list works again
boisy
parents: 2455
diff changeset
101 ldy 2,s
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
102 ldb PD.PD,y
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
103 pshs cc
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
104 pshs d ; p# PD.PD Regs
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
105
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
106 * put rfm op and DW op on stack
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
107 lda #OP_VFM
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
108 pshs a ; DWOP RFMOP p# PD.PD Regs
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
109
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
110 leax ,s ; point X to stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
111 ldy #3 ; 3 bytes to send
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
112
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
113 ifgt Level-1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
114 ldu <D.DWSubAddr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
115 else
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
116 ldu >D.DWSubAddr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
117 endc
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
118
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
119 orcc #IntMasks
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
120 jsr 6,u
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
121 leas 3,s ;clean stack PD.PD Regs
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
122
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
123 * now send path string
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
124 * move from caller to our mem
2444
597d98fc261e RFM: never say die
aaronwolfe
parents: 2442
diff changeset
125
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
126 ldx <D.Proc get calling proc desc
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
127 lda P$Task,x ; A = callers task # (source)
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
128
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
129 ldb <D.SysTsk ; B = system task # (dest)
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
130
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
131 ldx 1,s ; get device mem ptr
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
132 ldu V.BUF,x ; get destination pointer in U
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
133 ldy V.PATHNAMELEN,x ; get count in Y
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
134 ldx V.PATHNAME,x ; get source in X
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
135
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
136 * F$Move the bytes (seems to work)
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
137 os9 F$Move
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
138
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
139 bcs moverr
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
140
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
141 * Add carriage return
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
142 tfr u,x
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
143 tfr y,d
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
144 leau d,u
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
145 lda #C$CR
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
146 sta ,u
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
147 leay 1,y
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
148
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
149 * send to server
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
150 ifgt Level-1
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
151 ldu <D.DWSubAddr
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
152 else
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
153 ldu >D.DWSubAddr
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
154 endc
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
155 jsr 6,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
156
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
157 * read response from server -> B
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
158 clr ,-s
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
159 leax ,s
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
160 ldy #1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
161 jsr 3,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
162
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
163 * pull server's response into B
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
164 puls b ; PD.PD Regs
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
165 moverr puls cc
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
166 tstb
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
167 beq open2
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
168
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
169 openerr coma ; set error
2452
ed77cceb175c Almost there
boisy
parents: 2450
diff changeset
170 open2 puls x,y,u,pc
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
171
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
172 makdir lda #DW.makdir
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
173 lbra sendit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
174 chgdir lda #DW.chgdir
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
175 lbra sendit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
176 delete lda #DW.delete
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
177 lbra sendit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
178 seek lda #DW.seek
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
179 lbra sendit
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
180
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
181 read ldb #DW.read
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
182 bra read1 ; join readln routine
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
183
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
184
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
185
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
186 write lda #DW.write
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
187 lbra sendit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
188
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
189
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
190
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
191 readln ldb #DW.readln
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
192 read1 ldx PD.DEV,y ; to our static storage
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
193 ldx V$STAT,x
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
194 pshs x,y,u
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
195
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
196 * put path # on stack
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
197 lda PD.PD,y
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
198 pshs cc
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
199 pshs a ; p# PD.PD Regs
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
200
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
201 * put rfm op and DW op on stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
202
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
203 lda #OP_VFM
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
204 pshs d ; DWOP RFMOP p# PD.PD Regs
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
205
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
206 leax ,s ; point X to stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
207 ldy #3 ; 3 bytes to send
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
208
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
209 * set U to dwsub
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
210 ifgt Level-1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
211 ldu <D.DWSubAddr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
212 else
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
213 ldu >D.DWSubAddr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
214 endc
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
215
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
216 * send dw op, rfm op, path #
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
217 orcc #IntMasks
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
218 jsr 6,u
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
219 leas 3,s ;clean stack - PD.PD Regs
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
220
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
221 * put caller's Y on stack (maximum allowed bytes)
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
222 ldx 5,s
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
223 ldx R$Y,x
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
224 pshs x
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
225
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
226 * send 2 bytes from stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
227 leax ,s
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
228 ldy #2
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
229 jsr 6,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
230
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
231 leas 1,s ; leave 1 byte for server response in next section
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
232
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
233 * read # bytes coming (0 = eof) from server
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
234 leax ,s
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
235 ldy #1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
236 jsr 3,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
237
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
238 * store size
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
239 clra
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
240 puls b ;PD.PD Regs
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
241
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
242
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
243 * check for 0
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
244 tstb
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
245 beq readln1 ; 0 bytes = EOF
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
246
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
247 * read the data from server if > 0
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
248 go_on pshs d ;xfersz PD.PD Regs
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
249
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
250 * load data from server into mem block
2455
f90849557586 Fixed comments
boisy
parents: 2454
diff changeset
251 ldx 3,s ; V$STAT
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
252 ldx V.BUF,x
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
253 ldy ,s ;xfersz
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
254 jsr 3,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
255
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
256 * F$Move
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
257 * a = my task #
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
258 * b = caller's task #
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
259 * X = source ptr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
260 * Y = byte count
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
261 * U = dest ptr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
262
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
263 * move from our mem to caller
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
264
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
265 puls y ;Y = byte count (already set?) - PD.PD Regs
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
266 puls cc
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
267
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
268 ldx 4,s
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
269 ldu R$X,x ; U = caller's X = dest ptr
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
270 sty R$Y,x
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
271
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
272 lda <D.SysTsk ; A = system task #
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
273
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
274 ldx <D.Proc get calling proc desc
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
275 ldb P$Task,x ; B = callers task #
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
276
2455
f90849557586 Fixed comments
boisy
parents: 2454
diff changeset
277 puls x ; V$STAT - PD Regs
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
278 ldx V.BUF,x
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
279
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
280 * F$Move the bytes (seems to work)
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
281 os9 F$Move
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
282
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
283 * assume everything worked (not good)
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
284 clrb
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
285 *ldy xfersz,pc ; Y is supposed to be set to bytes read.. do we need to set this in the caller's regs?
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
286 bra readln2
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
287
2447
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
288 readln1
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
289 puls cc
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
290 comb
adfd8492a455 Updated
boisy
parents: 2446
diff changeset
291 ldb #E$EOF
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
292 leas 2,s ; clean stack down
2446
0ae4857f8f82 Save registers in 'sendit'
boisy
parents: 2445
diff changeset
293 readln2 puls y,u,pc
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
294
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
295
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
296 writln lda #DW.writln
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
297 lbra sendit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
298
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
299 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
300 * I$GetStat Entry Point
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
301 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
302 * Entry:
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
303 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
304 * Exit:
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
305 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
306 * Error: CC Carry set
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
307 * B = errcode
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
308 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
309 getstt
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
310 lda #DW.getstt
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
311 lbsr sendit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
312
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
313 ldb R$B,u get function code
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
314 beq GstOPT
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
315 cmpb #SS.EOF
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
316 beq GstEOF
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
317 cmpb #SS.Ready
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
318 beq GstReady
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
319 cmpb #SS.Size
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
320 beq GstSize
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
321 cmpb #SS.Pos
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
322 beq GstPos
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
323 cmpb #SS.FD
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
324 beq GstFD
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
325 cmpb #SS.FDInf
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
326 beq GstFDInf
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
327 comb
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
328 ldb #E$UnkSvc
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
329 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
330
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
331 * SS.OPT
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
332 * RBF does nothing here, so we do nothing
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
333 GstOPT
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
334 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
335
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
336 * SS.EOF
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
337 * Entry A = path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
338 * B = SS.EOF
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
339 GstEOF
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
340 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
341
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
342 * SS.Ready - Check for data available on path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
343 * Entry A = path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
344 * B = SS.Ready
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
345 GstReady
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
346 clr R$B,u always mark no data ready
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
347 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
348
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
349 * SS.Size - Return size of file opened on path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
350 * Entry A = path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
351 * B = SS.SIZ
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
352 * Exit X = msw of files size
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
353 * U = lsw of files size
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
354 GstSize
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
355 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
356
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
357 * SS.Pos - Return the current position in the file
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
358 * Entry A = path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
359 * B = SS.Pos
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
360 * Exit X = msw of pos
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
361 * U = lsw of pos
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
362 GstPOS
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
363 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
364
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
365 * SS.FD - Return file descriptor sector
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
366 * Entry: A = path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
367 * B = SS.FD
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
368 * X = ptr to 256 byte buffer
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
369 * Y = # of bytes of FD required
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
370
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
371 GstFD
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
372 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
373
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
374 * SS.FDInf -
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
375 * Entry: A = path
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
376 * B = SS.FDInf
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
377 * X = ptr to 256 byte buffer
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
378 * Y = msb - Length of read
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
379 * lsb - MSB of LSN
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
380 * U = LSW of LSN
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
381 GstFDInf
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
382 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
383
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
384
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
385
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
386 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
387 * I$SetStat Entry Point
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
388 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
389 * Entry:
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
390 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
391 * Exit:
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
392 *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
393 * Error: CC Carry set
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
394 * B = errcode
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
395 *
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
396 setstt
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
397 lda #DW.setstt
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
398 lbsr sendit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
399
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
400 ldb R$B,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
401 beq SstOpt
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
402 cmpb #SS.Size
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
403 beq SstSize
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
404 cmpb #SS.FD
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
405 beq SstFD
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
406 cmpb #SS.Lock
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
407 beq SstLock
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
408 cmpb #SS.RsBit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
409 beq SstRsBit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
410 cmpb #SS.Attr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
411 beq SstAttr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
412 cmpb #SS.FSig
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
413 beq SstFSig
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
414 comb
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
415 ldb #E$UnkSvc
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
416 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
417
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
418 SstOpt
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
419 SstSize
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
420 SstFD
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
421 SstLock
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
422 SstRsBit
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
423 SstAttr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
424 SstFSig
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
425 rts
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
426
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
427
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
428 close
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
429 pshs y,u
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
430
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
431 * put path # on stack
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
432 lda PD.PD,y
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
433 pshs a
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
434
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
435 * put rfm op and DW op on stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
436 ldb #DW.close
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
437 lda #OP_VFM
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
438 pshs d
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
439
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
440 leax ,s ; point X to stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
441 ldy #3 ; 3 bytes to send
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
442 ifgt Level-1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
443 ldu <D.DWSubAddr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
444 else
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
445 ldu >D.DWSubAddr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
446 endc
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
447
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
448 jsr 6,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
449 leas 2,s ;clean stack (leave 1 byte)
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
450
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
451 * read server response
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
452 leax ,s
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
453 ldy #1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
454 jsr 3,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
455
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
456 * free system mem
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
457 ldd #256
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
458 ldx 1,s ; orig Y
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
459 ldx PD.DEV,x
2454
790eee2f8ad6 Further fixes
boisy
parents: 2453
diff changeset
460 ldx V$STAT,x
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
461 ldu V.BUF,x
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
462 os9 F$SRtMem
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
463
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
464 puls b ; server sends result code
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
465 tstb
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
466 beq close1
2450
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
467 coma ; set error flag if != 0
a4ac68ad79e4 Added PrsNam support... crashes at the moment
boisy
parents: 2447
diff changeset
468 close1 puls u,y,pc
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
469
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
470
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
471 * just send OP_VMF + vfmop
2446
0ae4857f8f82 Save registers in 'sendit'
boisy
parents: 2445
diff changeset
472 sendit pshs a,x,y,u
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
473
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
474 lda #OP_VFM ; load command
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
475 pshs a ; command store on stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
476 leax ,s ; point X to stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
477 ldy #2 ; 2 byte to send
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
478 ifgt Level-1
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
479 ldu <D.DWSubAddr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
480 else
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
481 ldu >D.DWSubAddr
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
482 endc
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
483
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
484 jsr 6,u
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
485 leas 2,s ;clean stack
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
486
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
487 clrb
2446
0ae4857f8f82 Save registers in 'sendit'
boisy
parents: 2445
diff changeset
488 puls x,y,u,pc
2445
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
489
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
490 emod
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
491 eom equ *
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
492 end
6231225a182e Updated with SetStat and GetStat op entry points
boisy
parents: 2444
diff changeset
493