site logo  DevHlpOpenFile

HomePage | Categories |* BLOG *| RecentChanges | RecentlyCommented | Login/Register

DevHlp_OpenFile


Description
This devhlp allows to open a file for read access in the Init routine of a BASEDEV.

Calling convention


Returns


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 <65K. IMHO, the length field of the data structure should contain 10, not 8.

Republished without permission from Holger Veit's long gone webpages - MKG

There are no comments on this page. [Add comment]

Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by Wikka Wakka Wiki 1.1.6.7
Page was generated in 0.4712 seconds