ibm PCjr — 5-05

BIOS Usage Access to BIOS is through the software interrupts. Each BIOS entry-point is available through its own interrupt, which can be found in "Personal Computer BIOS Interrupt Vectors", later in this section. The software interrupts, hex 10 through hex lA, each access a different BIOS-routine. For example, to determine the amount of memory available in the system, INT hex 12 invokes the BIOS routine for determining memory size and returns the value to the caller. All parameters passed to and from the BIOS routines go through the 8088 registers. The prologue of each BIOS function indicates the registers used on the call and the return.

For the memory size example, no parameters are passed. The memory size, in lK byte increments, is returned in the AX register. If a BIOS function has several possible operations, the AH register is used at input to indicate the desired operation. For example, to set the time-of-day, the following code is required: MOV AH,l ;function is to set time-of-day. MOV CX,HIGH_COUNT ;establish the current MOV DX,LOW_COUNT INT lAH ;set the time. To read time-of-day: MOV AH,O INT lAH ;function is to read time of day. ;read the timer. BIOS USAGE 5-5