01.06.2013 Views

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

IPC@CHIP Documentation - SC12 @CHIP-RTOS V1.10

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Top of list<br />

Index page<br />

Get/Set File Attributes<br />

Interrupt 0x21 service 0x42: Set Current File Position<br />

The operating system maintains a 32 bit file pointer that it uses for read or write requests to the<br />

respective file. This service can be used to either read or set this file pointer. The file pointer<br />

associated with handle is set to a new byte position offset relative to the origin of the move.<br />

Parameters<br />

AH<br />

AL<br />

BX<br />

0x42<br />

Origin of move<br />

0x00: Relative to start of file<br />

0x01: Relative to current position<br />

0x02: Relative to end of file<br />

File handle<br />

CX,DX<br />

Offset of the displacement with higher order word in CX.<br />

Return Value<br />

Comments<br />

Success: Carry flag is cleared, DX,AX holds the new position relative to the start of the file with high word<br />

in DX.<br />

Failure: Carry flag is set, AX holds error code:<br />

AX = 0x06: Invalid handle<br />

AX = 0x19: Invalid displacement<br />

If you attempt to seek beyond the end of file, the file pointer will be positioned at the end of the file.<br />

To read current file position without changing it, call with AL=1, CX:DX = 0:0.<br />

Related Topics<br />

Top of list<br />

Index page<br />

Read from File<br />

Write to File<br />

Interrupt 0x21 service 0x43: Get/Set File Attributes<br />

Page 267 / 400

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!