Description
This devhlp allows to open a file for read access in the Init routine of a BASEDEV.
Calling convention
ES:DI = point to a SYIOpenFile structure
- DL = 07fh
Returns
- CY=0, AX = 0: okay, structure pointed to by ES:DI is modified
- CY=1, AX = ERROR_BAD_LENGTH: packet is invalid
- CY=1, AX = <>0: other filesystem related errors
Data structures
; assembler structure
SYIOpenFile struc
length dw 8 ; length of structure, must contain value 8
name dd ? ; 16:16 ASCIZ pathname
fsize dd ? ; returned: size of file
SYIOpenFile ends
Restrictions
Valid at INIT time only. This routine is not handle based, so it is only possible to have only one file at a time open. This routine uses the corresponding function of the miniFSD, not normal file I/O, thus access is restricted. At this phase of boot, drive letters do not yet exist, and IFSs/DMDs might not yet have been initialized, so you can only open files on the boot drive. Depending on the type of IPL (e.g. loading from a network file system), other restrictions might apply.
Bugs
The returned file size is unreliable, the value returned is always
Republished without permission from Holger Veit’s long gone webpages – MKG