17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

GW-BASIC <strong>User's</strong> Guide<br />

ERDEV and ERDEV$ Variables<br />

Purpose:<br />

To return the actual value (ERDEV) of a device error, and the name of the device (ERDEV$)<br />

causing the error.<br />

Syntax:<br />

ERDEV<br />

ERDEV$<br />

Comments:<br />

ERDEV will contain the error code from interrupt 24H in the lower 8 bits. Bits 8 to 15 from the<br />

attribute word in the Device Header Block are mapped directly into the upper 8 bits.<br />

ERDEV$ will contain the 8-byte character device name if the error was on a character device. It<br />

will contain the 2 byte block device name (A:, B:, etc.) if the device was not a character device.<br />

Examples:<br />

Installed device driver lpt2: caused a "Printer out of paper" error via INT 24H.<br />

ERDEV contains the error number 9 in the lower 8 bits, while the upper 8 bits contain the upper<br />

byte of the Device Header word attributes.<br />

ERDEV$ contains "LPT2: ".<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/ERDEV.html28/03/2004 21.29.25

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

Saved successfully!

Ooh no, something went wrong!