Parameter Passing - IBM AT 5170 Technical Reference

Table of Contents

Advertisement

Parameter Passing
All parameters passed to and from the BIOS routines go through
the 80286 registers. The prolog of each BIOS function indicates
the registers used on the call and return. For the memory size
example, no parameters are passed. The memory size, in lK
r"...
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.1
; function is to set time-of-day
MOV
CX,HIGH_COUNT
; establish the current time
MOV
OX,LOW_COUNT
INT
1AH
; set the time
To read the time of day:
MOV
AH,O
; function is to read time-of-day
INT
1AH
; read the timer
The BIOS routines save all registers except for AX and the flags.
Other registers are modified on return only if they are returning a
value to the caller. The exact register usage can be seen in the
prolog of each BIOS function.
5-4
System BIOS

Advertisement

Table of Contents
loading

Table of Contents