MAXMEM.SYS driver for M$DOS 7.1 (Announce)
I wrote a driver for M$DOS 7.1 which pretends to be QEMM and allows you to transfer some DOS data to UMB memory. After use, my system only uses 8KB of conventional memory. Compile/assemble source code using fasm.
;
; Maximum Memory Driver for QEMM's DOSDATA.SYS/DOS-UP.SYS
;
;My CONFIG.SYS (M$DOS 7.1) looks like:
;DEVICE=UMBPCI.SYS /I=D000-E7FF
;DEVICE=UMBM.EXE /I=D000-E7FF
;DEVICE=D:\QEMM\DOSDATA.SYS
;DEVICEHIGH=D:\QEMM\MAXMEM.SYS
;DEVICEHIGH=D:\QEMM\DOS-UP.SYS
;DEVICEHIGH=XMGR.SYS
;
format binary as 'sys'
;
; Device Driver
;
struc InitRequest
{
.Length db ?
.Unit db ?
.Function db ?
.Status dw ?
.Reserved rb 8
.Units db ?
.EndAddress dd ?
.ParamAddr dd ?
}
virtual at 0
InitRequest InitRequest
end virtual
dd -1
dw 0xC000
dw Strategy
MainDevInt \
dw DevInt1st
MyNewMagic \
db '$MAXMEM' ;7 chars
Counter db 2 ;#2->#0
Strategy:
push es bx
pop [cs:CmdPtr]
retf
DevInt: push ds bx
pushd 0xAAAA5555
label CmdPtr dword at $-4
pop bx ds
mov [bx+InitRequest.Status],0100h
pop bx ds
retf
New2Fh: pushfw
cmp ax,$D200
JumpsA: jz short IsD200
cmp ax,$D201
JumpsB: jz short IsD201
Jmp2Fh: popfw
jmp 0:0
label Old2Fh dword at $-4
IsD200: cmp bx,5144h
jne Jmp2Fh
cmp cx,4D45h
jne Jmp2Fh
cmp dx,4D30h
jnz Jmp2Fh
popf
mov al,-1
mov bx,4D45h
mov cx,4D44h
mov dx,5652h
clc
retfw 2
IsD201: cmp bx,4849h
jnz Jmp2Fh
cmp cx,5241h
jnz Jmp2Fh
cmp dx,4D30h
jnz Jmp2Fh
if 1
dec [cs:Counter]
jnz @F
mov word [cs:JumpsA],9090h
mov word [cs:JumpsB],9090h
@@:
end if
popf
;
push es
mov ah,52h
int 21h
mov cx,[es:008Ch] ;DOS 7.1/8.0 UMB
mov es,cx
inc cx
add cx,[es:3]
pop es
;
mov bx,4F4Bh
xor dx,dx
clc
retfw 2
Resident:
InitFunc:
mov ax,3000h
int 21h
mov ax,8103h
xor dx,dx
cmp bh,-1 ;MS-DOS?
jnz .Exit
push cs
pop ds
mov [MainDevInt],DevInt
mov ax,352Fh
int 21h
push es bx
pop [Old2Fh]
mov ax,252Fh
mov dx,New2Fh
int 21h
mov ax,0100h
mov dx,Resident
.Exit: ret
DevInt1st:
pusha
push ds es
lds bx,[cs:CmdPtr]
cmp [bx+InitRequest.Function],0
jnz OtherCmd
push ds bx
call InitFunc
pop bx ds
mov [bx+InitRequest.Status],ax
push cs dx
pop [bx+InitRequest.EndAddress]
OtherCmd:
pop es ds
popa
retf
Complete thread:
- MAXMEM.SYS driver for M$DOS 7.1 - CandyMan, 03.06.2022, 13:26 (Announce)
- MAXMEM.SYS driver for M$DOS 7.1 - Zyzzle, 04.06.2022, 04:33
- MAXMEM.SYS driver for M$DOS 7.1 - Japheth, 04.06.2022, 09:13
- MAXMEM.SYS driver for M$DOS 7.1 - CandyMan, 04.06.2022, 14:31
- MAXMEM.SYS driver for M$DOS 7.1 - Zyzzle, 04.06.2022, 04:33