Example
MOV
MOV
INT
DEC
DEC
DEC
CMP
JA
BP, V_SYSTEM
AH, F_RAM_GET
HP_ENTRY
BX
BX
BX
BX,OX
OK
,. How much memory available in
: EX-BIOS data area?
,. F_RAM_GET returns:
BX
=
"Iast used OS"
OX
=
"Max OS"
,. AI/ocate
3
paragraphs
(48
bytes)
,. application requires
44
bytes but
,. must allocate in full paragraphs
" New "Iast used OS"- "Max OS"
,
NOT_ENOUGH_RAM:
MOV
BL, 15H
MOV
AH, F_CMOS_GET
MOV
BP, V_SYSTEM
INT
HP_ENTRY
" CMOS bytes 16H, 15H contain
,. "top of memory"
,. value (in
1
KB units)
" Get least significant byte
DEC
PUSHF
MOV
MOV
MOV
INT
AL
BL, 15H
AH, F_CMOS_RET
BP, V_SYSTEM
HP_ENTRY
,. Free up
1
KB memory for
,. EX-BIOS data area
,. Store new "top of memory" in CMOS
POPF
JNC
RESET_PROCESSOR
MOV
MOV
MOV
INT
DEC
MOV
MOV
MOV
INT
266
System Drivers
BL, 16H
AH, F_CMOS_GET
BP, V_SYSTEM
HP_ENTRY
AL
BL, 16H
AH, F_CMOS_RET
BP, V_SYSTEM
HP_ENTRY
" If necessary, decrement most
" significant byte
Need help?
Do you have a question about the Vectra and is the answer not in the manual?
Questions and answers