Trixter
Veteran Member
After attempting this stuff on and off for years, dorking around with QRAM, EMS cards, etc. on my 5160, I finally have 704K free in PC-DOS 7 with a lotech RAM card providing 64K at A000 only. My solution? Force it with a hammer:
DOS "MEM" and "CHKDSK" commands recognize the extension, but does it pass muster? CheckIT 2.1 happily recognized that memory went to AFFF and tested all of it, and it passed.
Caveats:
Code:
; Forceably resizes 640K to 704K.
; Only do this on an 8086 system with a known 64K segment of real RAM at A000h.
; Hacked up by trixter@oldskool.org 20201020
numPages EQU 4 ;assume 4 16K "EMS" pages avail
numPara EQU (numPages SHL 10) ;number of paragraphs to add
extraK EQU (numPages SHL 4) ;numer of KB to add
push ds
mov dx,40h
mov ds,dx ;point to BDA segment
mov ax,[13h] ;grab existing BDA memory size
cmp ax,280h ;are we at 640k?
jne exit ;bail if not
add ax,extraK ;increase by KB we're adding
mov [13h],ax ;update BDA with new total count
pop ds
mov dx,ds
mov ax,numPara
add ds:[2],ax ;modify our own PSP to reflect new size
dec dx
mov ds,dx ;point to our MCB
add ds:[3],ax ;adjust it for 704K
exit:
ret
DOS "MEM" and "CHKDSK" commands recognize the extension, but does it pass muster? CheckIT 2.1 happily recognized that memory went to AFFF and tested all of it, and it passed.
Caveats:
- The above code should only be used on systems without an extended BIOS data area, which is typically located at the top of 640K. It can be relocated, and "proper" programs like VIDRAM and EEMRAM do this, but those programs require EGA or VGA hardware (VIDRAM) or an EMS card that can map into A000 (QRAM, EEMRAM), but the above program clearly does not. You only need to worry about this on ATs and later.
- On PC-DOS 2000, the UMB chain suddenly disappears after this is run. Any programs loaded there continue to run, but you can't view it or load/unload there any more. So if that happens to you, don't run this. (It happens to me, so I don't run QRAM any more, and just load everything in the lower 704k -- I still have more free RAM than when I started).