home *** CD-ROM | disk | FTP | other *** search
-
- *************************** EXPANDED MEMORY ********************************
-
- ASMLIB's EMS subroutines detect and manipulate Expanded Memory hardware
- and software. Expanded memory, when installed in any PC, can help solve
- many memory limitation problems. Call IsEMS before using any other
- ASMLIB EMS subroutines.
-
- NOTE: ASMLIB's EMS subroutines are under development. Additional EMS
- subroutines may be available by the time this message reaches you.
-
- EMS memory is allocated in blocks of 16k pages
-
- Error codes returned by EMS functions are:
-
- AH = 0 no error
- AH = 80h error in memory manager software
- AH = 81h error in expanded memory hardware
- AH = 84h bad function code passed to memory manager
- AH = 85h no EMM handles available
- AH = 89h you tried to allocate zero pages
-
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
-
- EMMVER: determines EMS driver version
- Source: emmver.asm
-
- Call with: no parameters
- Returns: if CF = 1, AH = EMS error code
- if CF = 0, AH = major version number
- AL = minor version number
- Uses: AX, flags
- Example:
-
- include asm.inc
-
- extrn isems:proc, emmver:proc
-
- .code
- .
- .
- .
- call isems
- jc no_ems
- or ah,ah ; test for EMM error
- jnz ems_error
- call emmver ; get emm version
- jc ems_error
- cmp ah,4 ; version 4.x?
- jb version3x ; nope, an older EMM version
-
-
-
- ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
-
- ISEMS: detects EMS driver
- Source: isems.asm
-
- Call with: no parameters
- Returns: if CF = 1, no Expanded Memory manager installed
- if CF = 0, AH = EMM error code
- if AH = 0, BX = page frame segment address
- Uses: AX, BX, CF
- Example:
-
- include asm.inc
-
- extrn isems:proc
-
- .code
- .
- .
- .
- call isems
- jc no_ems ; CF = 1 if no EMS memory
- or ah,ah ; test for EMM error
- jnz ems_error
-
-