Tag Archives: devhelp

DevHlp_QSysState

Description

This devhlp is the equivalent of DosQuerySysState API call. See more details about the data structures, arguments and options there.
Calling convention

  • EAX = function code
  • EBX = argument 1
  • EDI = high 16 bit: argument 2, low 16 bit: argument 3
  • ESI = FLAT (linear) address of a buffer
  • ECX = size of buffer
  • DL = 07eh

Returns

  • CY=0, AX = 0, okay
  • CY=1, AX = APIRET error code

Data structures

See DosQuerySysState

Restrictions

Valid at TASK time only. See DosQuerySysState

Republished without permission from Holger Veit’s long gone webpages – MKG

DevHlp_ReadFile

Description

This devhlp is used to read from a file opened with DevHlp_OpenFile.

Calling convention

Returns

  • CY=0, AX = 0: read okay
  • CY=1, AX = ERROR_BAD_LENGTH: packet is invalid
  • CY=1, AX = <>0: other filesystem related errors

Data structures

; assembler structure

SYIReadFile	struc
length		dw	8	; length of structure (must be 8)
buffer		dd	?	; 16:16 address of a read buffer
size		dd	?	; number of bytes to read
SYIReadFile	ends

Restrictions

Valid at INIT time only. Although the size argument of the data structure implies, I’d recommend to better not read more than 32K at a time. Note that the buffer itself is segmented, so DMA overrun and other effects might apply, depending on the quality of the miniIFS in use.

Bugs

IMHO, the length of structure should be 10, not 8.

Republished without permission from Holger Veit’s long gone webpages – MKG