Parameter Passing - IBM 5170 Technical Reference

Hide thumbs Also See for 5170:
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 1 Kb
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,t
;function is to set time-of-day
MOV CX,HIGH COUNT
;establish the current time
MOV DX.LOW COUNT
INT tAH
;set the time
To read the time of day:
MOV AH,O
;function is to read time-of-day
INT tAH
;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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents