Freeing up conventional memory for dos in windows 98.

Grminalac

Golden Member
Aug 25, 2000
1,149
1
0
A friend of mine owns a business and the very outdated program they use has to run in dos. Previously they used windows 95 and ran the program in a dos box without problem. He since upgraded to windows 98 and now gets out of memory messages. i believe he has 434 free and needs about 540. I remember tweaking dos back in the day using memmaker as well as adding lines such as dos=high and devicehighs to the config.sys and autoexec.bat. If he tweaks those lines under windows98 will it add more conventional memory to a dos box, or will he have to find a way to do it through dos?
Thanks for any help.
 

bacillus

Lifer
Jan 6, 2001
14,517
0
71
if I remember correctly,hit Ctrl+F5,when you see "Windows Starting".This temporarily prevents Drvspace.bin from loading-making 108K more Memory available. that should get him past 540K. :)
 

obenton

Platinum Member
Oct 11, 1999
2,012
0
0
Loading device drivers and TSRs into upper memory will make more conventional memory available. Any DOS manual will explain the devicehigh and loadhigh commands which are used in config.sys and autoexec.bat to do this. Also, to enable upper memory loading you have to configure himem.sys and emm386.exe in config.sys. You can do all of this in the Properties for the command.com shortcut that opens the DOS window that is being used to run the DOS program. There's an on-line DOS manual at http://www.csulb.edu/~murdock/easydos.html
 

Modus

Platinum Member
Oct 9, 1999
2,235
0
0
Wow, I could write for hours on this :)

I remember when it was a struggle just to get simple DOS games and applications to run. I think part of the fun of those old days was just tweaking your CONFIG.SYS and AUTOEXEC.BAT until you squeezed enough conventional memory out of them. When you finally got the darn thing to run, you weren't really paying attention to how primitive stuff was back then -- you were just happy to be running it :)

The secret to getting enough conventional memory for really hungry DOS games is a little device driver called EMM386.EXE. This program loads in your CONFIG.SYS. For some reason Microsoft decided to have it perform two completely separate tasks at the same time: allow DOS programs access to Expanded Memory (simulated by using extended memory from HIMEM.SYS), and allow small programs like device drivers and even parts of DOS itself to be loaded into Upper Memory Blocks (UMBs) in the region of main memory between 640k and 1M, some of which is usually reserved for system and video BIOS.

With DOS 6 and above, MemMaker allowed people to automatically configure EMM386 to load their device drivers into UMBs in the most effecient way possible, so as to free up maximum conventional memory. MemMaker is still around, and you could probably get it to work under Win 9x, however it poses two problems: it will modify the CONFIG.SYS and AUTOEXEC.BAT that load with Windows, which will interfere with the way Windows manages your memory for the benefit of Windows programs, and it is just not as good as manually tweaking the AUTOEXEC.BAT and CONFIG.SYS. I once got 624k of free conventional memory after loading SmartDrive, Doskey, my sound card and CDROM drivers, and the the mouse driver.

Simply "Restarting to MS-DOS mode" under Win 9x is usually not sufficient for demanding DOS games, as you cannot easily modify the CONFIG.SYS that is invoked. A better approach is to create a Windows .PIF shortcut which will automatically reboot your machine to DOS and execute the desired CONFIG.SYS and AUTOEXEC.BAT functions.

Here is a procedure to do that. This is a very general configuration, so remember to substitute your own sound card, CDROM and mouse drivers in where I have listed them. Many modern sound cards do not ship with separate DOS drivers, instead loading them into your CONFIG.SYS and AUTOEXEC.BAT as well as \WINDOWS\DOSSTART.BAT. Examine these files and determine which lines correspond to necessary drivers. Include them in the .PIF.

1) Right click on the Desktop. Click New > Shortcut. Type COMMAND, click Next, call it "DOS Games" or whatever you want. Finish.

2) Right click on the new shortcut created on your desktop, click Properties. Click Program, Advanced, check MS-DOS mode, and select "Specify a new configuration."

3) For CONFIG.SYS, something like this should work well:

DEVICE=C:\WINDOWS\HIMEM.SYS
DEVICE=C:\WINDOWS\EMM386.EXE
DOS=HIGH,UMB,NOAUTO
STACKSHIGH=0,0
BUFFERSHIGH=10,0
FCBSHIGH=1
FILESHIGH=30
DEVICEHIGH=C:\WINDOWS\IFSHLP.SYS <- Windows may need it, it's small
DEVICEHIGH=C:\CDROM\ATAPICD.SYS /D:CDROM <- assuming you have a DOS CDROM driver there
DEVICEHIGH=C:\AUDIO\SNDINIT.SYS <- you may not have a DOS driver like this for your sound card

4) For AUTOEXEC.BAT, try this:

@ECHO OFF
LH C:\WINDOWS\COMMAND\MSCDEX.EXE /D:CDROM

(load MSCDEX before SmartDrv or your CDROM won't be cached, also make sure the name after /D: is the same as the one you used in CONFIG.SYS for your CDROM device driver)

LH C:\WINDOWS\SMARTDRV.EXE
LH C:\MOUSE\MOUSE <- assuming you have a DOS mouse driver in such a folder
LH C:\WINDOWS\COMMAND\DOSKEY /INSERT <- cute and helpful DOS utility
SET DIRCMD=/OGE <- makes DIR listing look prettier
SET BLASTER=A220 I5 D1 P330 T6 <- typical for an SB16

5) Click OK and save the settings to the shortcut. When you run the shortcut, Windows will reboot to DOS mode and execute those startup files. Type EXIT to reboot and return to normal Windows.

The same stuff could be copied onto a boot disk, but I find this shortcut more convinient.

Modus