Interrupt 67h Expanded Memory Specification

Function 46h Return Version Number

entry AH 46h

return AH status

00h successful completion

AL version number

32h EMS 3.2

40h EMS 4.0

REF: Programmers Journal Vol 9.2 Pg 75

A program cannot assume that a PC supports EMS until it checks for a driver. In

an assembly language program, the check is easy: grab interrupt vectory 67h,

use 000Ah instead of the offset from the interrupt vector, and then look for

the eight-character tag EMMXXXX0.

If the tag is there, invoke interrupt 67h with AH=46h. If AH equals zero on

return from the interrupt, then register AL holdes the EMS driver version

number. The two common version are 32h and 40h.

GetEMSVer Proc

mov al, 67h

call GetVector ;Int\21f\35

mov ax, es

mov ds, ax

mov si, 0Ah

lodsw

cmp ax, 'ME'

jne gev1

lodsw

cmp ax, 'XM'

jne gev1

lodsw

cmp ax, 'XX'

jne gev1

lodsw

cmp ax, '0X'

jne gev1

mov ah,46h

call DoEMSFunc ;Int\67 -Function 46h

jnc gev2

gev1:

xor ax,ax

stc

gev2:

ret

GetEMSVer endp