chr and blk files -- return the device as the aux type.

This commit is contained in:
Kelvin Sherlock 2015-08-16 16:13:30 -04:00
parent e5d9047073
commit fc29420832
1 changed files with 28 additions and 2 deletions

View File

@ -1,3 +1,5 @@
case on
include 'gsos.equ'
include 'minix.equ'
include 'fst.equ'
@ -101,11 +103,13 @@ do_file_type proc export
lda disk_inode.mode
and #S_IFMT
cmp #S_IFDIR
beq dir
cmp #S_IFREG
beq reg
cmp #S_IFDIR
beq dir
unknown
lda #$00
bra store
@ -129,6 +133,28 @@ store
do_aux_type proc export
with dp,fst_parms
; chr and blk -- return the device type.
lda disk_inode.mode
and #S_IFMT
cmp #S_IFCHR
beq chr
cmp #S_IFBLK
beq blk
lda #0
sta [param_blk_ptr],y
iny
iny
sta [param_blk_ptr],y
rts
chr
blk
lda disk_inode.zone
sta [param_blk_ptr],y
iny
iny
lda #0
sta [param_blk_ptr],y
rts