home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QBasic & Borland Pascal & C
/
Delphi5.iso
/
C
/
Samples
/
C-ASM_VI.ARJ
/
PROGASM.ZIP
/
PROG029.ASM
< prev
next >
Wrap
Assembly Source File
|
1988-04-10
|
1KB
|
21 lines
;************************************************************************
; Using BIOS to determine amount of installed EGA memory *
; Exit: AX - Number of KiloBytes installed *
; 64 => 64KBytes *
; 128 => 128KBytes *
; 256 => 256KBytes *
;************************************************************************
PUBLIC _BIOS_get_mem
_BIOS_Get_Mem PROC NEAR
MOV AH,12H ;Select function 12hex
MOV BL,10H ; subfunciton 10hex
INT 10H ;Call BIOS to get memory size
MOV AL,64 ;Convert memory size in BL to
INC BL ; remap BL from 0-3 into 1-4
MUL BL ; a multiple of 64
RET
_BIOS_Get_Mem ENDP