Category : Files from Magazines
Archive   : ISSUE-37.ZIP
Filename : MEMORY37.FIG
EM_NAME DB 'EMMXXXX0', 0
FIND_EM:
;Out: NC indicates expanded memory driver installed and functioning.
; BX = EM base segment if EMM installed
; C set if expanded memory can not be used.
PUSH DS
PUSH DX
PUSH AX
MOV AX, CS
MOV DS, AX ;Use DOS open handle call to determine whether
MOV DX, OFFSET EM_NAME ;EM driver is installed.
MOV AH, 3DH ;Open handle function code.
MOV AL, 0
INT 21H ;Dos function.
JC FE_00 ;C set if open fails.
MOV BX, AX ;Device handle
MOV AH, 44H ;IOCTL call
MOV AL, 0 ;Device info subfunction
MOV DX, 0
INT 21H ;Call DOS
JC FE_00 ;Exit, C set if error
TEST DL, 80H ;Is it a device?
STC
JZ FE_00 ;Exit with C set if not device.
MOV AH, 44H ;DOS IOCTL call
MOV AL, 7 ;Output status
INT 21H
JC FE_00 ;Exit, C set if error.
OR AL, AL ;Is it ready?
STC
JZ FE_00 ;Error exit if not.
MOV AH, 3EH ;Close handle
INT 21H
JC FE_00
MOV AH, 41H ;Get EM base address.
INT EM_INT
MOV EM_BASE, BX
FE_00:
POP AX
POP DX
POP DS
RET
Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!
This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.
But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/