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 >
Assembly Source File  |  1988-04-10  |  1KB  |  21 lines

  1.  
  2. ;************************************************************************
  3. ; Using BIOS to determine amount of installed EGA memory                *
  4. ; Exit: AX - Number of KiloBytes installed                              *
  5. ;       64  =>  64KBytes                                                *
  6. ;       128 => 128KBytes                                                *
  7. ;       256 => 256KBytes                                                *
  8. ;************************************************************************
  9.  
  10.         PUBLIC  _BIOS_get_mem
  11.  
  12. _BIOS_Get_Mem PROC NEAR
  13.         MOV     AH,12H                  ;Select function 12hex
  14.         MOV     BL,10H                  ;       subfunciton 10hex
  15.         INT     10H                     ;Call BIOS to get memory size
  16.         MOV     AL,64                   ;Convert memory size in BL to
  17.         INC     BL                      ; remap BL from 0-3 into 1-4
  18.         MUL     BL                      ; a multiple of 64
  19.         RET
  20. _BIOS_Get_Mem ENDP
  21.