WikiPendium

(beta)

XHReadWrite()

WikiPendium :: RecentChanges :: RecentlyCommented :: UserSettings :: You are 216.73.216.179

XHReadWrite()


LONG XHReadWrite( major, minor, rwflag, recno, count, buf );

UWORD major, minor, rwflag;
ULONG recno;
UWORD count;
VOIDP buf;

Read or write physical blocks on a mass media device.

Opcode

10 (0x0A)

Availability

This function is available when the XHDI_Cookie is present. XHReadWrite() is defined in all version of XHDI.

Parameters

rwflag specifies if data should be read from the device or be written to the device.

rwflag bits Meaning
0..2 as defined in the AHDI Release Notes (3.00, April 18, 1990).
StabyloRmv: the exact definition should be retrieved here later.
3 (physical mode) is ignored.
4..15 Reserved and should be set to zero.

recno identifies the first block to be read (resp. written).
count is the number of blocks to be read (resp. written) by XHReadWrite().
buf is a pointer to the destination (resp. source) buffer in central memory where data will be written to (resp. read from)

Binding

	pea	buf
	move.w	#count,-(sp)
	move.l	#recno,-(sp)
	move.w	#rwflag,-(sp)
	move.w	#minor,-(sp)
	move.w	#major,-(sp)
	move.w	#10,-(sp)
	move.l	xhdi_handler,a0
	jsr	(a0)
	lea	18(sp),sp


Return Value

XHReadWrite() returns E_OK (0) if no error occured, and a negative error code otherwise. See XHDIErrorCodes for more details.

See Also

XHDI

Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]