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.

BX<br />

DX<br />

Handle<br />

Device data<br />

Return Value<br />

Comments<br />

Top of list<br />

Index page<br />

Success: Carry flag cleared, Device data in DX.<br />

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

AX=1: Invalid function (wrong value in AL)<br />

AX=6: Invalid handle<br />

If bit 7 of the data is 1, the handle refers to a device and data bit assignments are as follows:<br />

Bit Meaning when bit is set to '1'<br />

B15 Reserved<br />

B14 Device can handle function 0x44, codes 2 and 3<br />

B13 Device supports output until busy<br />

B12 Reserved<br />

B11 Device understands open/close<br />

B10-8 Reserved<br />

B7 '1' indicates handle refers to a device<br />

B6 Not "end of file" on input<br />

B5 Don't check for control characters<br />

B4 Reserved<br />

B3 Clock device<br />

B2 Null device<br />

B1 Console Output device<br />

B0 Console Input device<br />

If bit 7 of the data is 0, the handle refers to a file and data bit assignments are as follows:<br />

Bit Meaning<br />

B15-8 Reserved<br />

B7 Set to '0' to indicate handle refers to a file.<br />

B6 Set to '0' when the file has been written<br />

B0-5 Drive number (0=A, 1=B, etc)<br />

The first three file handles are used for the stdio devices:<br />

0: Input<br />

1: Output<br />

2: Error<br />

This service was implemented to be compatible with the older DOS compilers. The data is saved when<br />

you issue a write, but the data is not used by the <strong>@CHIP</strong>-<strong>RTOS</strong>. Control characters are not recognized<br />

as such. Function 0x44 codes 2 and 3 are not supported.<br />

Interrupt 0x21 service 0x47: Get Current Working Directory<br />

Gets the current working directory for a drive.<br />

Page 269 / 400

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

Saved successfully!

Ooh no, something went wrong!