annotate level1/modules/rfm.asm @ 2438:a0d17254fbb3

rfm continues
author aaronwolfe
date Thu, 25 Feb 2010 00:09:32 +0000
parents d26e96c40194
children d5ba9175a498
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
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
8 nam RFM
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
9 ttl Remote File Manager
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
10
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
11 IFP1
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
12 use defsfile
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
13 use rfmdefs
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
14 use dwdefs.d
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
15 ENDC
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
16
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
17 tylg set FlMgr+Objct
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
18 atrv set ReEnt+rev
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
19 rev set 0
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
20 edition equ 1
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
21
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
22 mod eom,RFMName,tylg,atrv,RFMEnt,size
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
23
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
24 pathtmp rmb 256
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
25 size equ *
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
26
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
27 RFMName fcs /RFM/
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
28 fcb edition
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
29
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 * file manager entry point
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
35 *
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
36 * Entry: Y = Path descriptor pointer
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
37 * U = Callers register stack pointer
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
38 *
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
39
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
40 RFMEnt lbra create Create path
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
41 lbra open Open path
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
42 lbra makdir Makdir
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
43 lbra chgdir Chgdir
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
44 lbra delete Delete
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
45 lbra seek Seek
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
46 lbra read Read character
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
47 lbra write Write character
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
48 lbra readln ReadLn
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
49 lbra writln WriteLn
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
50 lbra getstt Get Status
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
51 lbra setstt Set Status
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
52 lbra close Close path
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
53
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
54 create lda #DW.create
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
55 lbra sendit
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
56
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
57 open pshs u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
58
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
59 * put path # on stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
60 lda ,y
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
61 pshs a
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
62
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
63 * put rfm op and DW op on stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
64 ldb #DW.open
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
65 lda #OP_VFM
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
66 pshs d
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
67
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
68 leax ,s ; point X to stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
69 ldy #3 ; 3 bytes to send
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
70 ifgt Level-1
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
71 ldu <D.DWSubAddr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
72 else
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
73 ldu >D.DWSubAddr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
74 endc
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
75
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
76 jsr 6,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
77 leas 3,s ;clean stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
78
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
79 * now send path string
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
80
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
81 * copy path string
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
82
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
83 ldx <D.Proc get curr proc desc
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
84 ldb P$Task,x get task #
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
85
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
86 ldx ,s ; orig U is on stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
87 ldx R$X,x ; should be X from caller
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
88 leay pathtmp,pcr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
89
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
90 clra
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
91 pshs a
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
92
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
93 open1 os9 f$ldabx
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
94 sta ,y+
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
95 leax 1,x
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
96 inc ,s
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
97 cmpa #$0D
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
98 bne open1
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
99
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
100 * send to server
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
101 clra
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
102 ldb ,s ; leave a byte on stack for response
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
103 tfr d,y
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
104 leax pathtmp,pcr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
105 jsr 6,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
106
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
107 * read response from server -> B
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
108 leax ,s
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
109 ldy #1
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
110 jsr 3,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
111 puls b
2438
a0d17254fbb3 rfm continues
aaronwolfe
parents: 2437
diff changeset
112 cmpb #0
a0d17254fbb3 rfm continues
aaronwolfe
parents: 2437
diff changeset
113 beq open2
a0d17254fbb3 rfm continues
aaronwolfe
parents: 2437
diff changeset
114 orcc #1 ;set error
a0d17254fbb3 rfm continues
aaronwolfe
parents: 2437
diff changeset
115 open2 puls u
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
116 rts
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
117
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
118 makdir lda #DW.makdir
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
119 lbra sendit
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
120 chgdir lda #DW.chgdir
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
121 lbra sendit
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
122 delete lda #DW.delete
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
123 lbra sendit
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
124 seek lda #DW.seek
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
125 lbra sendit
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
126 read lda #DW.read
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
127 lbra sendit
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
128 write lda #DW.write
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
129 lbra sendit
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
130
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
131 readln pshs u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
132
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
133 * put path # on stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
134 lda ,y
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
135 pshs a
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
136
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
137 * put rfm op and DW op on stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
138 ldb #DW.readln
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
139 lda #OP_VFM
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
140 pshs d
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
141
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
142 leax ,s ; point X to stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
143 ldy #3 ; 3 bytes to send
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
144 ifgt Level-1
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
145 ldu <D.DWSubAddr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
146 else
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
147 ldu >D.DWSubAddr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
148 endc
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
149
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
150 jsr 6,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
151 leas 3,s ;clean stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
152
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
153 * send max bytes
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
154 ldx ,s
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
155 ldx R$Y,x
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
156 pshs x
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
157 leax ,s
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
158 ldy #2
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
159 jsr 6,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
160
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
161 leas 1,s
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
162
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
163 * read # bytes (0 = eof)
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
164 leax ,s
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
165 ldy #1
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
166 jsr 3,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
167
2437
d26e96c40194 rfm changes
aaronwolfe
parents: 2436
diff changeset
168 ldb ,s
d26e96c40194 rfm changes
aaronwolfe
parents: 2436
diff changeset
169 * bne readln1
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
170
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
171 * eof
2437
d26e96c40194 rfm changes
aaronwolfe
parents: 2436
diff changeset
172 leas 1,s
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
173 ldb #211
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
174 orcc #1
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
175 puls u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
176 rts
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
177
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
178 * read B chars into mem at addr in caller's X
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
179 * first into our buffer INCOMPLETE/FUBAR
2437
d26e96c40194 rfm changes
aaronwolfe
parents: 2436
diff changeset
180 readln1 puls b
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
181 leax pathtmp,pcr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
182 clra
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
183 tfr d,y
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
184 jsr 3,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
185
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
186 puls u ; done with dwsub
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
187
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
188
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
189
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
190 clrb
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
191 rts
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
192
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
193
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
194 writln lda #DW.writln
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
195 lbra sendit
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
196 getstt lda #DW.getstt
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
197 lbra sendit
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
198 setstt lda #DW.setstt
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
199 lbra sendit
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
200
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
201 close pshs u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
202
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
203 * put path # on stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
204 lda ,y
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
205 pshs a
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
206
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
207 * put rfm op and DW op on stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
208 ldb #DW.close
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
209 lda #OP_VFM
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
210 pshs d
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
211
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
212 leax ,s ; point X to stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
213 ldy #3 ; 3 bytes to send
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
214 ifgt Level-1
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
215 ldu <D.DWSubAddr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
216 else
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
217 ldu >D.DWSubAddr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
218 endc
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
219
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
220 jsr 6,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
221 leas 3,s ;clean stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
222
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
223 clrb
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
224 puls u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
225 rts
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
226
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
227
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
228 * just send OP_VMF + vfmop
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
229 sendit pshs u
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
230
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
231 pshs y
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
232 pshs a
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
233
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
234 lda #OP_VFM ; load command
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
235 pshs a ; command store on stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
236 leax ,s ; point X to stack
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
237 ldy #2 ; 2 byte to send
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
238 ifgt Level-1
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
239 ldu <D.DWSubAddr
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
240 else
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
241 ldu >D.DWSubAddr
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
242 endc
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
243
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
244 jsr 6,u
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
245 leas 2,s ;clean stack
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
246
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
247 puls x
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
248 ldy #107
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
249 jsr 6,u
2436
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
250
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
251
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
252 * copy path string
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
253
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
254 ldx <D.Proc get curr proc desc
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
255 ldb P$Task,x get task #
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
256
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
257 ldx ,s
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
258 ldx R$X,x ; should be X from caller
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
259 leay pathtmp,pcr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
260
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
261 clra
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
262 pshs a
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
263
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
264 send1 os9 f$ldabx
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
265 sta ,y+
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
266 leax 1,x
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
267 inc ,s
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
268 cmpa #$0D
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
269 bne send1
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
270
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
271 * send to server
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
272 clra
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
273 puls b
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
274 tfr d,y
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
275 leax pathtmp,pcr
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
276 jsr 6,u
ca3aa5472761 RFM can simulate open,readln,close
aaronwolfe
parents: 2435
diff changeset
277
2435
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
278 puls u
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
279 clrb
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
280 rts
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
281
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
282
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
283 emod
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
284 eom equ *
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
285 end
f3f09398780b initial RFM
aaronwolfe
parents:
diff changeset
286