minix.fst/get_mark.aii

91 lines
1.1 KiB
Plaintext
Raw Normal View History

2015-08-17 14:48:27 +00:00
string asis
include 'gsos.equ'
include 'minix.equ'
include 'records.equ'
2015-08-17 14:48:27 +00:00
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
2015-08-17 14:48:27 +00:00
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
2015-08-21 21:32:33 +00:00
cmp #1
2015-08-17 14:48:27 +00:00
rtl
class0
ldx #get_mark_dcb_0_size-4
dispatch get_mark_dcb_0
lda tool_error
2015-08-21 21:32:33 +00:00
cmp #1
2015-08-17 14:48:27 +00:00
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