Parameter Passing
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
AU,l
;function
is
to
set time
of
day.
MOV CX,UIGU
_COUNT
;establish the current time.
MOV
DX,LOW_COUNT
INT
lAU
;set the time.
To read the time of day:
MOV
AU,O
;function is to read time of day.
INT
lAU
;read the timer.
Generally, 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 is in the
prologue
of
each BIOS function.
5-4
System BIOS