mirror of
https://github.com/ksherlock/minix.fst.git
synced 2024-12-26 15:29:17 +00:00
get_dev_num (needed for Finder)
This commit is contained in:
parent
73577feb81
commit
fe70a36c67
2
Makefile
2
Makefile
@ -2,7 +2,7 @@
|
||||
|
||||
SOURCES = main.aii volume.aii get_file_info.aii \
|
||||
open.aii get_dir_entry.aii get_mark.aii set_mark.aii get_eof.aii \
|
||||
close.aii read.aii flush.aii judge_name.aii \
|
||||
close.aii read.aii flush.aii judge_name.aii get_dev_num.aii \
|
||||
id_disk.aii stubs.aii tables.aii device.aii params.aii globals.aii \
|
||||
debug.aii
|
||||
|
||||
|
57
get_dev_num.aii
Normal file
57
get_dev_num.aii
Normal file
@ -0,0 +1,57 @@
|
||||
|
||||
string asis
|
||||
|
||||
include 'gsos.equ'
|
||||
include 'minix.equ'
|
||||
include 'records.equ'
|
||||
|
||||
include 'fst.equ'
|
||||
|
||||
include 'fst.macros'
|
||||
|
||||
include 'M16.Debug'
|
||||
|
||||
import volume_by_name
|
||||
|
||||
;
|
||||
; gs/os expands the path provided. that means we'll have
|
||||
; an absolute path or a device number + relative path.
|
||||
;
|
||||
|
||||
get_dev_num procname export
|
||||
|
||||
with dp, fst_parms
|
||||
|
||||
lda dev1_num
|
||||
bne store
|
||||
|
||||
lda span1
|
||||
cmp #30+1
|
||||
bcs bps
|
||||
|
||||
jsr volume_by_name
|
||||
bcs exit
|
||||
|
||||
lda dev_parms.dev_num
|
||||
|
||||
store
|
||||
; a = device number
|
||||
ldx call_class
|
||||
ldy table,x
|
||||
sta [param_blk_ptr],y
|
||||
lda tool_error
|
||||
cmp #1
|
||||
exit
|
||||
rtl
|
||||
|
||||
bps
|
||||
lda #bad_path_syntax
|
||||
sec
|
||||
rtl
|
||||
|
||||
table
|
||||
dc.w DevNumRec.devNum, DevNumRecGS.devNum
|
||||
|
||||
endp
|
||||
|
||||
end
|
@ -446,7 +446,7 @@ done
|
||||
|
||||
endp
|
||||
|
||||
volume_by_name procname
|
||||
volume_by_name procname export
|
||||
;
|
||||
; extract the volume name from path1_ptr and find (or create) a vcr.
|
||||
;
|
||||
@ -490,8 +490,8 @@ done
|
||||
bcs no_vcr
|
||||
|
||||
; store it for later...
|
||||
stx ptr
|
||||
sty ptr+2
|
||||
;stx ptr
|
||||
; sty ptr+2
|
||||
|
||||
jsl deref
|
||||
stx my_vcr
|
||||
@ -523,12 +523,12 @@ done
|
||||
; I suppose reading a block could alloc memory and invalidate the vcr...
|
||||
;
|
||||
|
||||
ldx ptr
|
||||
ldy ptr+2
|
||||
;ldx ptr
|
||||
;ldy ptr+2
|
||||
|
||||
jsl deref
|
||||
stx my_vcr
|
||||
sty my_vcr+2
|
||||
;jsl deref
|
||||
;stx my_vcr
|
||||
;sty my_vcr+2
|
||||
|
||||
; check the volume name here...
|
||||
|
||||
|
11
records.equ
11
records.equ
@ -228,3 +228,14 @@ displacement DS.L 1
|
||||
end_struct
|
||||
|
||||
|
||||
DevNumRecGS begin_struct
|
||||
pCount DS.W 1
|
||||
devName DS.L 1
|
||||
devNum DS.W 1
|
||||
end_struct
|
||||
|
||||
|
||||
DevNumRec begin_struct
|
||||
devName DS.B 4
|
||||
devNum DS.B 2
|
||||
end_struct
|
||||
|
Loading…
Reference in New Issue
Block a user