Category : System Diagnostics for your computer
Archive   : EMMVERS.ZIP
Filename : EMMVERS.ASM

 
Output of file : EMMVERS.ASM contained in archive : EMMVERS.ZIP

TITLE EMMVERS

; William C. Parke, Dec.,1987

CODE SEGMENT
ASSUME CS:CODE,DS:CODE,ES:CODE,SS:CODE
CIRET EQU 0CFH
ORG 100H
EMM: XOR AX,AX
MOV ES,AX
MOV BX,4*67H ; vector to EMM driver
LES DI,ES:[BX] ; get int 67h vector
ASSUME ES:NOTHING
MOV AX,ES
OR AX,DI ; see if 0 vector
JZ EMMZ ; no EMM vector
CMP ES:BYTE PTR [DI],CIRET ; iret ?
JZ EMMZ ; if so, must be do-nothing int 67h
MOV DI,0AH ; displacement to driver name
MOV SI,OFFSET EMMST
MOV CX,9
REPZ CMPSB
AND CX,CX
JNZ EMMZ ; driver name string not found
MOV AH,46H
INT 67H ; get version number
AND AH,AH
JZ EMMV ; got a version number
EMMZ: XOR AX,AX ; no version number
EMMV: MOV BX,CS
MOV ES,BX
ASSUME ES:CODE
AND AX,AX
JZ EMME
MOV AH,AL
MOV CX,4
SHR AL,CL ; get major number
AND AH,0FH ; isolate minor number
ADD AX,3030H ; convert to ascii
MOV BYTE PTR DVER,AL
MOV BYTE PTR DVER+2,AH
EMMS: MOV DX,OFFSET DEMMV
MOV AH,9
INT 21H ; send out string
INT 20H ; exit
EMME: MOV SI,OFFSET DEMME
MOV DI,OFFSET DVER
MOV CX,3
REP MOVSW
JMP SHORT EMMS

EMMST DB 'EMMXXXX0',0
DEMMV DB 0DH,0AH,'EMM driver '
DVER DB ' . is installed.',0DH,0AH,'$'
DEMME DB 'is not',0
CODE ENDS
END EMM