-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathget_mark.aii
90 lines (65 loc) · 1.08 KB
/
get_mark.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
string asis
include 'gsos.equ'
include 'minix.equ'
include 'records.equ'
include 'fst.equ'
include 'fst.macros'
include 'M16.Debug'
import do_eof
import do_ignore
import init_fcr
import disk_inode:v1_inode
import disk_super:v1_super
get_mark procname export
with dp, fst_parms
jsr init_fcr
lda disk_inode.mode
and #S_IFMT
cmp #S_IFREG
beq ok
cmp #S_IFLNK ; ehh
beq ok
lda #bad_store_type
sec
rtl
ok
; copy fcr.mark to disk_inode.size to re-use eof code.
ldy #fcr.mark
lda [my_fcr],y
sta disk_inode.size
iny
iny
lda [my_fcr],y
sta disk_inode.size+2
lda <call_class
beq class0
class1
lda [param_blk_ptr] ; pcount
dec a
asl a ; x 2
asl a ; x 4
tax
dispatch get_mark_dcb_1
lda tool_error
cmp #1
rtl
class0
ldx #get_mark_dcb_0_size-4
dispatch get_mark_dcb_0
lda tool_error
cmp #1
rtl
get_mark_dcb_0
with MarkRec
dc.w markRefNum, do_ignore
dc.w position, do_eof
get_mark_dcb_0_size equ *-get_mark_dcb_0
endwith
get_mark_dcb_1
with PositionRecGS
;dc.w pCount, do_ignore
dc.w refNum, do_ignore
dc.w position, do_eof
endwith
endp
end