2435
|
1 ********************************************************************
|
|
2 * RFM - Remote File Manager
|
|
3 *
|
2461
|
4 * $Id$
|
2435
|
5 *
|
2461
|
6 * Edt/Rev YYYY/MM/DD Modified by
|
|
7 * Comment
|
|
8 * ------------------------------------------------------------------
|
|
9 * 1 2010/02/20 Aaron Wolfe
|
|
10 * initial version - just sends ops to server
|
2435
|
11
|
2445
|
12 nam RFM
|
|
13 ttl Remote File Manager
|
2435
|
14
|
2445
|
15 ifp1
|
|
16 use defsfile
|
|
17 use rfmdefs
|
|
18 use dwdefs.d
|
|
19 endc
|
2435
|
20
|
2445
|
21 tylg set FlMgr+Objct
|
|
22 atrv set ReEnt+rev
|
|
23 rev set 0
|
|
24 edition equ 1
|
2435
|
25
|
2445
|
26 mod eom,RFMName,tylg,atrv,RFMEnt,size
|
2442
|
27
|
2445
|
28 size equ .
|
|
29
|
|
30
|
|
31 RFMName fcs /RFM/
|
|
32 fcb edition
|
2435
|
33
|
|
34
|
|
35 ******************************
|
|
36 *
|
|
37 * file manager entry point
|
|
38 *
|
2445
|
39 RFMEnt lbra create Create path
|
|
40 lbra open Open path
|
|
41 lbra makdir Makdir
|
|
42 lbra chgdir Chgdir
|
|
43 lbra delete Delete
|
|
44 lbra seek Seek
|
|
45 lbra read Read character
|
|
46 lbra write Write character
|
|
47 lbra readln ReadLn
|
|
48 lbra writln WriteLn
|
|
49 lbra getstt Get Status
|
|
50 lbra setstt Set Status
|
|
51 lbra close Close path
|
|
52
|
2461
|
53
|
|
54 ******************************
|
|
55 *
|
|
56 * Create - creates a file on the remote device
|
|
57 *
|
|
58 * Entry: Y = Path descriptor pointer
|
|
59 * U = Callers register stack pointer
|
|
60 *
|
2445
|
61 create ldb #DW.create
|
|
62 bra create1
|
|
63
|
|
64
|
2461
|
65 ******************************
|
|
66 *
|
|
67 * Open - opens a file on the remote device
|
|
68 *
|
|
69 * Entry: Y = Path descriptor pointer
|
|
70 * U = Callers register stack pointer
|
|
71 *
|
2462
|
72 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
73 * B = error code (if CC.Carry == 1)
|
|
74 *
|
2445
|
75 open ldb #DW.open
|
2447
|
76 create1
|
2453
|
77 ldx PD.DEV,y ; get ptr to our device memory
|
|
78 ldx V$STAT,x ; get ptr to our static storage
|
2450
|
79 pshs x,y,u ; save all on stack
|
|
80 stb V.DWCMD,x
|
|
81
|
2445
|
82 * TODO lets not create multiple buffers when multiple open/create on same path
|
|
83 * get system mem
|
|
84 ldd #256
|
|
85 os9 F$SRqMem ; ask for D bytes (# bytes server said is coming)
|
2450
|
86 lbcs open2
|
2445
|
87 stu V.BUF,x
|
|
88
|
2450
|
89 * use PrsNam to validate pathlist and count length
|
|
90 ldu 4,s ; get pointer to caller's registers
|
|
91 ldy R$X,u
|
|
92 sty V.PATHNAME,x
|
|
93 tfr y,x
|
|
94 prsloop os9 F$PrsNam
|
|
95 bcs open2
|
|
96 tfr y,x
|
|
97 anda #$7F
|
|
98 cmpa #PENTIR
|
|
99 bne chkdelim
|
|
100 ldb #E$BPNam
|
|
101 bra openerr
|
|
102 chkdelim cmpa #PDELIM
|
|
103 beq prsloop
|
|
104 * at this point X points to the character AFTER the last character in the name
|
|
105 * update callers R$X
|
|
106 ldu 4,s ; get caller's registers
|
|
107 stx R$X,u
|
|
108
|
|
109 * compute the length of the pathname and save it
|
|
110 tfr x,d
|
|
111 ldx ,s ; get the device memory pointer
|
|
112 subd V.PATHNAME,x
|
|
113 std V.PATHNAMELEN,x ; save the length
|
|
114
|
|
115 * put command byte & path # on stack
|
|
116 lda V.DWCMD,x
|
2456
|
117 ldy 2,s
|
2447
|
118 ldb PD.PD,y
|
|
119 pshs cc
|
2454
|
120 pshs d ; p# PD.PD Regs
|
2447
|
121
|
|
122 * put rfm op and DW op on stack
|
|
123 lda #OP_VFM
|
2454
|
124 pshs a ; DWOP RFMOP p# PD.PD Regs
|
2447
|
125
|
2445
|
126 leax ,s ; point X to stack
|
|
127 ldy #3 ; 3 bytes to send
|
|
128
|
|
129 ifgt Level-1
|
|
130 ldu <D.DWSubAddr
|
|
131 else
|
|
132 ldu >D.DWSubAddr
|
|
133 endc
|
|
134
|
2447
|
135 orcc #IntMasks
|
2445
|
136 jsr 6,u
|
2454
|
137 leas 3,s ;clean stack PD.PD Regs
|
2445
|
138
|
2462
|
139 ifgt Level-1
|
2445
|
140 * now send path string
|
2450
|
141 * move from caller to our mem
|
2444
|
142
|
2450
|
143 ldx <D.Proc get calling proc desc
|
|
144 lda P$Task,x ; A = callers task # (source)
|
2445
|
145
|
2450
|
146 ldb <D.SysTsk ; B = system task # (dest)
|
2462
|
147 endc
|
|
148
|
2450
|
149 ldx 1,s ; get device mem ptr
|
|
150 ldu V.BUF,x ; get destination pointer in U
|
|
151 ldy V.PATHNAMELEN,x ; get count in Y
|
|
152 ldx V.PATHNAME,x ; get source in X
|
2445
|
153
|
2462
|
154 ifgt Level-1
|
2450
|
155 * F$Move the bytes (seems to work)
|
|
156 os9 F$Move
|
|
157 bcs moverr
|
2462
|
158 endc
|
|
159
|
2450
|
160 * Add carriage return
|
|
161 tfr u,x
|
|
162 tfr y,d
|
|
163 leau d,u
|
|
164 lda #C$CR
|
|
165 sta ,u
|
|
166 leay 1,y
|
2436
|
167
|
2445
|
168 * send to server
|
2450
|
169 ifgt Level-1
|
|
170 ldu <D.DWSubAddr
|
|
171 else
|
|
172 ldu >D.DWSubAddr
|
|
173 endc
|
2445
|
174 jsr 6,u
|
|
175
|
|
176 * read response from server -> B
|
2450
|
177 clr ,-s
|
2445
|
178 leax ,s
|
|
179 ldy #1
|
|
180 jsr 3,u
|
|
181
|
|
182 * pull server's response into B
|
2454
|
183 puls b ; PD.PD Regs
|
2450
|
184 moverr puls cc
|
2445
|
185 tstb
|
|
186 beq open2
|
|
187
|
2450
|
188 openerr coma ; set error
|
2452
|
189 open2 puls x,y,u,pc
|
2445
|
190
|
2462
|
191
|
|
192 ******************************
|
|
193 *
|
|
194 * MakDir - creates a directory on the remote device
|
|
195 *
|
|
196 * Entry: Y = Path descriptor pointer
|
|
197 * U = Callers register stack pointer
|
|
198 *
|
|
199 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
200 * B = error code (if CC.Carry == 1)
|
|
201 *
|
2445
|
202 makdir lda #DW.makdir
|
|
203 lbra sendit
|
2462
|
204
|
|
205 ******************************
|
|
206 *
|
|
207 * ChgDir - changes the data/execution directory on the remote device
|
|
208 *
|
|
209 * Entry: Y = Path descriptor pointer
|
|
210 * U = Callers register stack pointer
|
|
211 *
|
|
212 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
213 * B = error code (if CC.Carry == 1)
|
|
214 *
|
2445
|
215 chgdir lda #DW.chgdir
|
|
216 lbra sendit
|
2462
|
217
|
|
218 ******************************
|
|
219 *
|
|
220 * Delete - delete a file on the remote device
|
|
221 *
|
|
222 * Entry: Y = Path descriptor pointer
|
|
223 * U = Callers register stack pointer
|
|
224 *
|
|
225 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
226 * B = error code (if CC.Carry == 1)
|
|
227 *
|
2445
|
228 delete lda #DW.delete
|
|
229 lbra sendit
|
2460
|
230
|
|
231
|
2461
|
232 ******************************
|
|
233 *
|
|
234 * Seek - seeks into a file on the remote device
|
|
235 *
|
|
236 * Entry: Y = Path descriptor pointer
|
|
237 * U = Callers register stack pointer
|
|
238 *
|
2462
|
239 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
240 * B = error code (if CC.Carry == 1)
|
|
241 *
|
2460
|
242 * seek = send dwop, rfmop, path, caller's X + U
|
2462
|
243 seek pshs y,u
|
2460
|
244
|
|
245 ldx R$U,u
|
|
246 pshs x
|
|
247 ldx R$X,u
|
|
248 pshs x
|
|
249 lda PD.PD,y
|
|
250 pshs a
|
2462
|
251 ldd #OP_VFM*256+DW.seek
|
2460
|
252 pshs d
|
|
253
|
2462
|
254 leax ,s ; point X to stack
|
|
255 ldy #7 ; 7 bytes to send
|
2460
|
256
|
|
257 * set U to dwsub
|
2462
|
258 ifgt Level-1
|
|
259 ldu <D.DWSubAddr
|
|
260 else
|
|
261 ldu >D.DWSubAddr
|
|
262 endc
|
2460
|
263
|
|
264 * send dw op, rfm op, path #
|
2462
|
265 jsr 6,u
|
|
266 leas 7,s ;clean stack - PD.PD Regs
|
2460
|
267
|
2462
|
268 clrb
|
|
269 puls y,u,pc
|
2460
|
270
|
2436
|
271
|
2461
|
272 ******************************
|
|
273 *
|
|
274 * Read - reads data from a file on the remote device
|
|
275 *
|
|
276 * Entry: Y = Path descriptor pointer
|
|
277 * U = Callers register stack pointer
|
|
278 *
|
2462
|
279 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
280 * B = error code (if CC.Carry == 1)
|
|
281 *
|
|
282 read ldb #DW.read
|
|
283 bra read1 ; join readln routine
|
2445
|
284
|
|
285
|
|
286
|
2461
|
287 ******************************
|
|
288 *
|
|
289 * Write - writes data to a file on the remote device
|
|
290 *
|
|
291 * Entry: Y = Path descriptor pointer
|
|
292 * U = Callers register stack pointer
|
|
293 *
|
2462
|
294 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
295 * B = error code (if CC.Carry == 1)
|
|
296 *
|
|
297 write lda #DW.write
|
|
298 lbra sendit
|
2445
|
299
|
|
300
|
|
301
|
2461
|
302 ******************************
|
|
303 *
|
|
304 * ReadLn - reads a line of data from a file on the remote device
|
|
305 *
|
|
306 * Entry: Y = Path descriptor pointer
|
|
307 * U = Callers register stack pointer
|
|
308 *
|
2462
|
309 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
310 * B = error code (if CC.Carry == 1)
|
|
311 *
|
2445
|
312 readln ldb #DW.readln
|
2447
|
313 read1 ldx PD.DEV,y ; to our static storage
|
2454
|
314 ldx V$STAT,x
|
2447
|
315 pshs x,y,u
|
2445
|
316
|
|
317 * put path # on stack
|
2447
|
318 lda PD.PD,y
|
|
319 pshs cc
|
2454
|
320 pshs a ; p# PD.PD Regs
|
2445
|
321
|
|
322 * put rfm op and DW op on stack
|
|
323
|
|
324 lda #OP_VFM
|
2454
|
325 pshs d ; DWOP RFMOP p# PD.PD Regs
|
2445
|
326
|
|
327 leax ,s ; point X to stack
|
|
328 ldy #3 ; 3 bytes to send
|
|
329
|
|
330 * set U to dwsub
|
|
331 ifgt Level-1
|
|
332 ldu <D.DWSubAddr
|
|
333 else
|
|
334 ldu >D.DWSubAddr
|
|
335 endc
|
|
336
|
|
337 * send dw op, rfm op, path #
|
2447
|
338 orcc #IntMasks
|
2445
|
339 jsr 6,u
|
2454
|
340 leas 3,s ;clean stack - PD.PD Regs
|
2445
|
341
|
|
342 * put caller's Y on stack (maximum allowed bytes)
|
2447
|
343 ldx 5,s
|
2445
|
344 ldx R$Y,x
|
|
345 pshs x
|
|
346
|
|
347 * send 2 bytes from stack
|
|
348 leax ,s
|
|
349 ldy #2
|
|
350 jsr 6,u
|
|
351
|
|
352 leas 1,s ; leave 1 byte for server response in next section
|
|
353
|
|
354 * read # bytes coming (0 = eof) from server
|
|
355 leax ,s
|
|
356 ldy #1
|
|
357 jsr 3,u
|
|
358
|
|
359 * store size
|
|
360 clra
|
2454
|
361 puls b ;PD.PD Regs
|
2445
|
362
|
|
363
|
|
364 * check for 0
|
2447
|
365 tstb
|
2445
|
366 beq readln1 ; 0 bytes = EOF
|
|
367
|
|
368 * read the data from server if > 0
|
2454
|
369 go_on pshs d ;xfersz PD.PD Regs
|
2445
|
370
|
|
371 * load data from server into mem block
|
2455
|
372 ldx 3,s ; V$STAT
|
2445
|
373 ldx V.BUF,x
|
|
374 ldy ,s ;xfersz
|
|
375 jsr 3,u
|
|
376
|
|
377 * F$Move
|
|
378 * a = my task #
|
|
379 * b = caller's task #
|
|
380 * X = source ptr
|
|
381 * Y = byte count
|
|
382 * U = dest ptr
|
|
383
|
|
384 * move from our mem to caller
|
|
385
|
2454
|
386 puls y ;Y = byte count (already set?) - PD.PD Regs
|
2447
|
387 puls cc
|
2445
|
388
|
2462
|
389 ifgt Level-1
|
2445
|
390 ldx 4,s
|
|
391 ldu R$X,x ; U = caller's X = dest ptr
|
2450
|
392 sty R$Y,x
|
|
393
|
2445
|
394 lda <D.SysTsk ; A = system task #
|
|
395
|
|
396 ldx <D.Proc get calling proc desc
|
|
397 ldb P$Task,x ; B = callers task #
|
|
398
|
2455
|
399 puls x ; V$STAT - PD Regs
|
2445
|
400 ldx V.BUF,x
|
|
401
|
|
402 * F$Move the bytes (seems to work)
|
|
403 os9 F$Move
|
2462
|
404 endc
|
2445
|
405 * assume everything worked (not good)
|
|
406 clrb
|
|
407 bra readln2
|
|
408
|
2447
|
409 readln1
|
|
410 puls cc
|
|
411 comb
|
|
412 ldb #E$EOF
|
2445
|
413 leas 2,s ; clean stack down
|
2446
|
414 readln2 puls y,u,pc
|
2436
|
415
|
2445
|
416
|
2461
|
417 ******************************
|
|
418 *
|
|
419 * WritLn - writes a line of data to a file on the remote device
|
|
420 *
|
|
421 * Entry: Y = Path descriptor pointer
|
|
422 * U = Callers register stack pointer
|
|
423 *
|
2462
|
424 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
425 * B = error code (if CC.Carry == 1)
|
|
426 *
|
2445
|
427 writln lda #DW.writln
|
|
428 lbra sendit
|
|
429
|
2461
|
430 ******************************
|
2445
|
431 *
|
2461
|
432 * GetStat - obtain status of file on the remote device
|
2445
|
433 *
|
2461
|
434 * Entry: Y = Path descriptor pointer
|
|
435 * U = Callers register stack pointer
|
2445
|
436 *
|
2461
|
437 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
438 * B = error code (if CC.Carry == 1)
|
2445
|
439 *
|
|
440 getstt
|
2463
|
441 lda PD.PD,y
|
2460
|
442 lbsr sendgstt
|
2445
|
443
|
|
444 ldb R$B,u get function code
|
|
445 beq GstOPT
|
|
446 cmpb #SS.EOF
|
|
447 beq GstEOF
|
|
448 cmpb #SS.Ready
|
|
449 beq GstReady
|
|
450 cmpb #SS.Size
|
|
451 beq GstSize
|
|
452 cmpb #SS.Pos
|
|
453 beq GstPos
|
|
454 cmpb #SS.FD
|
|
455 beq GstFD
|
|
456 cmpb #SS.FDInf
|
|
457 beq GstFDInf
|
|
458 comb
|
|
459 ldb #E$UnkSvc
|
|
460 rts
|
|
461
|
|
462 * SS.OPT
|
2462
|
463 * RFM does nothing here, so we do nothing
|
2445
|
464 GstOPT
|
|
465 rts
|
|
466
|
|
467 * SS.EOF
|
|
468 * Entry A = path
|
|
469 * B = SS.EOF
|
|
470 GstEOF
|
|
471 rts
|
|
472
|
|
473 * SS.Ready - Check for data available on path
|
|
474 * Entry A = path
|
|
475 * B = SS.Ready
|
|
476 GstReady
|
|
477 clr R$B,u always mark no data ready
|
|
478 rts
|
|
479
|
|
480 * SS.Size - Return size of file opened on path
|
|
481 * Entry A = path
|
|
482 * B = SS.SIZ
|
|
483 * Exit X = msw of files size
|
|
484 * U = lsw of files size
|
|
485 GstSize
|
|
486 rts
|
|
487
|
|
488 * SS.Pos - Return the current position in the file
|
|
489 * Entry A = path
|
|
490 * B = SS.Pos
|
|
491 * Exit X = msw of pos
|
|
492 * U = lsw of pos
|
|
493 GstPOS
|
|
494 rts
|
|
495
|
|
496 * SS.FD - Return file descriptor sector
|
|
497 * Entry: A = path
|
|
498 * B = SS.FD
|
|
499 * X = ptr to 256 byte buffer
|
|
500 * Y = # of bytes of FD required
|
|
501
|
2463
|
502 * path # and SS.FD already sent to server, so
|
|
503 * send Y, recv Y bytes, get them into caller at X
|
|
504 * Y and U here are still as at entry
|
|
505 GstFD
|
|
506 pshs y,u
|
|
507
|
|
508 * send caller's Y (do we really need this to be 16bit? X points to 256byte buff?
|
|
509 ldx R$X,u
|
|
510 pshs x
|
|
511 leax ,s
|
|
512 ldy #2
|
|
513
|
|
514 * set U to dwsub
|
|
515 ifgt Level-1
|
|
516 ldu <D.DWSubAddr
|
|
517 else
|
|
518 ldu >D.DWSubAddr
|
|
519 endc
|
|
520
|
|
521 jsr 6,u
|
|
522
|
|
523 * recv bytes into v.buf
|
|
524 puls y
|
|
525 ldx ,s ; orig Y
|
|
526 ldx PD.DEV,x
|
|
527 ldx V$STAT,x
|
|
528 ldx V.BUF,x
|
|
529 pshs x
|
|
530
|
|
531 jsr 3,u
|
|
532
|
|
533 * move v.buf into caller
|
|
534
|
|
535 ldx 4,s
|
|
536 ldu R$X,x ; U = caller's X = dest ptr
|
|
537 sty R$Y,x ; do we need to set this for caller?
|
|
538
|
|
539 lda <D.SysTsk ; A = system task #
|
|
540
|
|
541 ldx <D.Proc get calling proc desc
|
|
542 ldb P$Task,x ; B = callers task #
|
|
543
|
|
544 puls x ; V.BUF from earlier
|
|
545
|
|
546
|
|
547 * F$Move the bytes (seems to work)
|
|
548 os9 F$Move
|
|
549
|
|
550 * assume everything worked (not good)
|
|
551 clrb
|
|
552
|
|
553 puls y,u,pc
|
|
554
|
2445
|
555
|
|
556 * SS.FDInf -
|
|
557 * Entry: A = path
|
|
558 * B = SS.FDInf
|
|
559 * X = ptr to 256 byte buffer
|
|
560 * Y = msb - Length of read
|
|
561 * lsb - MSB of LSN
|
|
562 * U = LSW of LSN
|
|
563 GstFDInf
|
|
564 rts
|
|
565
|
|
566
|
|
567
|
2461
|
568 ******************************
|
2445
|
569 *
|
2461
|
570 * SetStat - change status of file on the remote device
|
2445
|
571 *
|
2461
|
572 * Entry: Y = Path descriptor pointer
|
|
573 * U = Callers register stack pointer
|
2445
|
574 *
|
2461
|
575 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
576 * B = error code (if CC.Carry == 1)
|
2445
|
577 *
|
2450
|
578 setstt
|
|
579 lda #DW.setstt
|
2445
|
580 lbsr sendit
|
|
581
|
|
582 ldb R$B,u
|
|
583 beq SstOpt
|
|
584 cmpb #SS.Size
|
|
585 beq SstSize
|
|
586 cmpb #SS.FD
|
|
587 beq SstFD
|
|
588 cmpb #SS.Lock
|
|
589 beq SstLock
|
|
590 cmpb #SS.RsBit
|
|
591 beq SstRsBit
|
|
592 cmpb #SS.Attr
|
|
593 beq SstAttr
|
|
594 cmpb #SS.FSig
|
|
595 beq SstFSig
|
|
596 comb
|
|
597 ldb #E$UnkSvc
|
|
598 rts
|
|
599
|
|
600 SstOpt
|
|
601 SstSize
|
|
602 SstFD
|
|
603 SstLock
|
|
604 SstRsBit
|
|
605 SstAttr
|
|
606 SstFSig
|
|
607 rts
|
|
608
|
|
609
|
2461
|
610 ******************************
|
|
611 *
|
|
612 * Close - close path to file on the remote device
|
|
613 *
|
|
614 * Entry: Y = Path descriptor pointer
|
|
615 * U = Callers register stack pointer
|
|
616 *
|
|
617 * Exit: CC.Carry = 0 (no error), 1 (error)
|
|
618 * B = error code (if CC.Carry == 1)
|
|
619 *
|
2450
|
620 close
|
|
621 pshs y,u
|
2445
|
622
|
|
623 * put path # on stack
|
2450
|
624 lda PD.PD,y
|
2445
|
625 pshs a
|
|
626
|
|
627 * put rfm op and DW op on stack
|
|
628 ldb #DW.close
|
|
629 lda #OP_VFM
|
|
630 pshs d
|
|
631
|
|
632 leax ,s ; point X to stack
|
|
633 ldy #3 ; 3 bytes to send
|
|
634 ifgt Level-1
|
|
635 ldu <D.DWSubAddr
|
|
636 else
|
|
637 ldu >D.DWSubAddr
|
|
638 endc
|
|
639
|
|
640 jsr 6,u
|
|
641 leas 2,s ;clean stack (leave 1 byte)
|
|
642
|
|
643 * read server response
|
|
644 leax ,s
|
|
645 ldy #1
|
|
646 jsr 3,u
|
|
647
|
|
648 * free system mem
|
|
649 ldd #256
|
|
650 ldx 1,s ; orig Y
|
|
651 ldx PD.DEV,x
|
2454
|
652 ldx V$STAT,x
|
2445
|
653 ldu V.BUF,x
|
|
654 os9 F$SRtMem
|
|
655
|
2450
|
656 puls b ; server sends result code
|
|
657 tstb
|
2445
|
658 beq close1
|
2450
|
659 coma ; set error flag if != 0
|
|
660 close1 puls u,y,pc
|
2445
|
661
|
|
662
|
2460
|
663 * send dwop, rfmop, path, set/getstat op (path is in A)
|
|
664 sendgstt pshs x,y,u
|
|
665
|
|
666 ldb R$B,u
|
|
667 pshs d
|
|
668
|
|
669 lda #OP_VFM ; load command
|
|
670 ldb #DW.getstt
|
|
671 pshs d ; command store on stack
|
|
672 leax ,s ; point X to stack
|
|
673 ldy #4 ; 2 byte to send
|
|
674 ifgt Level-1
|
|
675 ldu <D.DWSubAddr
|
|
676 else
|
|
677 ldu >D.DWSubAddr
|
|
678 endc
|
|
679
|
|
680 jsr 6,u
|
|
681 leas 4,s ;clean stack
|
|
682
|
|
683 clrb
|
|
684 puls x,y,u,pc
|
|
685
|
|
686
|
|
687
|
|
688
|
|
689
|
2435
|
690 * just send OP_VMF + vfmop
|
2446
|
691 sendit pshs a,x,y,u
|
2435
|
692
|
2445
|
693 lda #OP_VFM ; load command
|
|
694 pshs a ; command store on stack
|
|
695 leax ,s ; point X to stack
|
|
696 ldy #2 ; 2 byte to send
|
|
697 ifgt Level-1
|
|
698 ldu <D.DWSubAddr
|
|
699 else
|
|
700 ldu >D.DWSubAddr
|
|
701 endc
|
2435
|
702
|
2445
|
703 jsr 6,u
|
|
704 leas 2,s ;clean stack
|
|
705
|
|
706 clrb
|
2446
|
707 puls x,y,u,pc
|
2445
|
708
|
|
709 emod
|
|
710 eom equ *
|
|
711 end
|
|
712
|