25.03.2015 Views

IBM 5150 PC Technical Reference (6025005, August, 1981) (PDF)

IBM 5150 PC Technical Reference (6025005, August, 1981) (PDF)

IBM 5150 PC Technical Reference (6025005, August, 1981) (PDF)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

ROM BIOS<br />

The ROM resident Basic I/O System (BIOS) provides the device<br />

level control of the major I/O devices in the System Unit. The<br />

BIOS routines allow the assembly language programmer to<br />

perform block (diskette and cassette) or character (Video, ~<br />

communications, keyboard and printer) level I/O operations<br />

without any concern for device address and operating characteristics.<br />

Additionally, system services such as time of day and<br />

memory size determination are provided. The goal is to provide<br />

an operational interface to the system and relieve the programmer from<br />

concern over hardware device characteristics.<br />

Finally the BIOS interface· insulates the user from the hardware<br />

allowing new devices to be added to the System Unit, yet<br />

retaining the BIOS level interface to the device. In this manner,<br />

user programs become transparent to hardware modifications<br />

and enhancements. A complete listing of the BIOS is provided<br />

in Appendix "A".<br />

Use of BIOS<br />

Access to the BIOS function is through the 8088 software<br />

interrupts. Each BIOS entry point is available through its own<br />

interrupt, which can be found in the interrupt vector listing.<br />

The software interrupts lOH through lAH each access a<br />

different BIOS routine. For example, to determine the amount<br />

of memory available in the system,<br />

INT 12H<br />

will invoke the memory size determination routine in BIOS<br />

and return the value to the caller.<br />

Parameter Passing<br />

All parameters passed to and from the BIOS routines go through<br />

the 8088 registers. The prologue of each BIOS function indicate<br />

the registers used on the call and the return. For the memory<br />

size example above, no parameters are passed, and the result,<br />

memory size in 1 K Byte increments is returned in the<br />

AX register.<br />

Where a BIOS function has several possible operations, the AH<br />

register is used on input to indicate the desired operation. For<br />

example, to set the time of day, the following code is required.<br />

3-2

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

Saved successfully!

Ooh no, something went wrong!