-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfst_open.aii
113 lines (88 loc) · 1.29 KB
/
fst_open.aii
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
include 'gsos.equ'
include 'fst.equ'
include 'fst.macros'
include 'records.equ'
open proc
with dp, fst_parms
jsr check_path
bcs exit
jsr build_vcr
bcs exit
lda #invalid_fst_op
ldx call_number
sec
wdm #$ff
bcs exit
stx cookie
sty scratch ; actual read/write access
; build the fcr.
lda #fcr.__sizeof
ldx #host
ldy #^host
jsl alloc_fcr
bcs close
jsl deref
stx my_fcr
sty my_fcr+2
; need to re-deref the vcr?
ldy #vcr.open_count
lda [my_vcr],y
inc a
sta [my_vcr],y
lda scratch
ldy #fcr.access
sta [my_fcr],y
lda #fst_id
ldy #fcr.fst_id
sta [my_fcr],y
ldy #vcr.id
lda [my_vcr],y
ldy #fcr.vcr_id
sta [my_fcr],y
exit_ok
lda #0
clc
exit
rtl
close
;; oops! close it!
lda #0
ldx #$2014
ldy cookie
wdm #$ff
sec
lda #out_of_mem
rtl
host str.w ":Host"
endp
path_op proc
create entry
destroy entry
get_file_info entry
set_file_info entry
clear_backup entry
with fst_parms
jsr check_path
bcs exit
; hmmm - don't really need a vcr for this...
;jsr build_vcr
;bcs exit
lda #invalid_fst_op
ldx call_number
sec
wdm #$ff
exit
rtl
endp
change_path proc
; special since there are two pathnames.
lda #invalid_fst_op
sec
rtl
endp
judge_name proc
lda #0
clc
rtl
endp
end