VOGONS


Dos 6 conventional memory tricks

Topic actions

Reply 122 of 298, by MaartenB

User metadata
Rank Newbie
Rank
Newbie

I have a problem with a foxpro2.6 program with Error "too many memory variables" . I think there is not enough environmental space , how can I increase that space ? in config file of DOSBOX?

Reply 123 of 298, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

That is simple, don't use DOSBox. It is for games (not foxpro) and has intentional bugs (which result in more speed), but might mess up your stuff.

Water flows down the stream
How to ask questions the smart way!

Reply 124 of 298, by MaartenB

User metadata
Rank Newbie
Rank
Newbie

OK DOSBOX is very nice, we want to use it just for archiving puposes , we want to use the old Foxpro programs with Windows 7 . We only have this error -: too many memory variables : can you help us ?

Reply 127 of 298, by Sev80

User metadata
Rank Member
Rank
Member

Hey guys,

Ive been having a hell of a time with DOS memory management on my old Pentium 233 system. I finally got everything working but no matter what I do, everything is loading into conventional memory and not into UMB.

I have set all my parameters correctly in config.sys and autoexec.bat, but the problem is that no matter how I load things, including dos=high,umb, any combination of LH or devicehigh, or emm386 settings, when I run mem /c/p, it shows that upper memory is 0k and reserved memory is 384k.

Since I have the system with a CF to IDE adaptor, I can pop it out and put it into my main machine and run the CF card under VMWARE player. When I do so, the system boots, and shows reserved memory is 0k but still shows 0k for upper memory.

Ive spent countless hours messing with this. I thought I narrowed it down to the bios possibly reserving upper memory but Ive turned off the l2 cache, and all the bios caching settings, set the a20 line to normal (instead of fast), no combination of settings changes the reserved memory showing 384k on the physical system.

The P233 system is a VIA apollo chipset, the motherboard is a FIC Vx98 board.

Any help would be appreciated.

Reply 129 of 298, by Sev80

User metadata
Rank Member
Rank
Member
Jorpho wrote:

Posting your autoexec.bat and config.sys would probably be a good start. Note that the order of lines in your config.sys can be important.

Config.sys:

DEVICEHIGH=C:\DOS\HIMEM.SYS
DEVICEHIGH=C:\DOS\EMM386.EXE RAM AUTO HIGHSCAN
BUFFERS=30,0
FILES=40
DOS=HIGH,UMB
LASTDRIVE=E

[MENU]
MENUITEM=NORMAL
MENUITEM=CDROM
MENUDEFAULT=1,05

[NORMAL]
DOS=HIGH
STACKS=9,256
DEVICE=C:\DOS\SETVER.EXE
REM SHELL=C:\DOS\COMMAND.COM C:\DOS\ /p

[CDROM]
REM MEMMAKER DEVICE=C:\DOS\HIMEM.SYS
REM MEMMAKER DEVICE=C:\DOS\EMM386.EXE RAM HIGHSCAN I=B000-B7FF 1024 WIN=B500-B7FF WIN=B200-B4FF
rem DEVICEHIGH=C:\CDPLAY\SGCDU.SYS /D:MSCD000
DEVICEHIGH=C:\oakcdrom.sys /d:mscd000
[COMMON]
rem DEVICE=C:\AWE\DRV\SBCD.SYS /D:MSCD001 /P:220
rem DEVICE=C:\AWE\DRV\CSP.SYS /UNIT=0 /BLASTER=A:220
rem DEVICEHIGH=C:\CTCM\CTCM.EXE

Autoexec.bat:

@ECHO OFF
GOTO %CONFIG%

:NORMAL
@ECHO OFF
LH /L:0;1,45456 /S C:\DOS\SMARTDRV.EXE
PROMPT $p$g
PATH C:\WINDOWS;C:\DOS;C:\compre;C:\;D:\
SET TEMP=C:\DOS
PATH C:\WINDOWS;C:\DOS;C:\compre;C:\;D:\
LH /L:1,22144 C:\mouse\mouse.com
GOTO END

:CDROM
LH /L:0;1,45456 /S C:\DOS\SMARTDRV.EXE
LH C:\DOS\MSCDEX.EXE /D:MSCD000
PATH C:\WINDOWS;C:\DOS;C:\compre;C:\;D:\
LH /l:1,22144 C:\mouse\mouse.com

:END

Reply 130 of 298, by Jorpho

User metadata
Rank l33t++
Rank
l33t++
Sev80 wrote:
DEVICEHIGH=C:\DOS\HIMEM.SYS DEVICEHIGH=C:\DOS\EMM386.EXE RAM AUTO HIGHSCAN BUFFERS=30,0 FILES=40 DOS=HIGH,UMB […]
Show full quote

DEVICEHIGH=C:\DOS\HIMEM.SYS
DEVICEHIGH=C:\DOS\EMM386.EXE RAM AUTO HIGHSCAN
BUFFERS=30,0
FILES=40
DOS=HIGH,UMB

Well, HIMEM and EMM386 can't be loaded high, because those are the memory managers. It might not make a difference, but try making your first three lines
DEVICE=C:\DOS\HIMEM.SYS
DOS=HIGH,UMB
DEVICE=C:\DOS\EMM386.EXE RAM

I'm not sure HIGHSCAN and AUTO are necessary; it is certainly worth trying without them.

Reply 132 of 298, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Are you leaving the other lines the same? You should probably take out the "/L" and "/S" switches in the LH lines as well.

I would be concerned about having accidentally changed some mysterious setting in the BIOS and forgetting about it. It might be useful to reset the settings to default. (If there's no specific option by that name, there's probably a "Clear CMOS" jumper on your motherboard, or you can take the battery out.)

Reply 134 of 298, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

Just to note, in DOS 6.22 its been my experience that SMARTDRV.EXE does a better job loading itself high than using LH.

Next, you could change the order in which you load things. Programs have 2 memory footprints that are important here. How much memory is needed to load the program and start it, and how much it takes up after the load. If there is not enough high RAM for either value, it will pop back down to loading low instead. What causes problems is when the first number is larger. Mainly because that number isn't given to you. MEMMAKER can measure that, and there are other tools as well that do so. However, I usually just move things around until they load better.

All the /L values can be removed for now. They were placed there by MEMMAKER, and I've found they usually end up causing more problems than they solve.

Looking at your boot sequence, I think the following might help you out a bit:

CONFIG.SYS

[MENU]
MENUITEM=NORMAL
MENUITEM=CDROM
MENUDEFAULT=1,05

[COMMON]
DOS=HIGH,UMB
DEVICE=C:\DOS\HIMEM.SYS
DEVICE=C:\DOS\EMM386.EXE RAM I=B000-B7FF
DEVICE=C:\CTCM\CTCM.EXE
BUFFERS=30
FILES=40
LASTDRIVE=E
STACKS=9,256
DEVICEHIGH=C:\DOS\SETVER.EXE

[NORMAL]

[CDROM]
DEVICEHIGH=C:\OAKCDROM.SYS /D:MSCD000

CTCM just initializes a PnP Sound Blaster card, it doesn't stay in memory. SETVER takes up a huge amount of RAM during load, but once loaded shrinks down to an extremely small amount. The I=B000-B7FF range is only used by a MDA card (Monochrome Display Adapter.) Might as well free it up as part of your upper memory pool. I took out all the REM statements as well, feel free to put them back in if you want 😀

AUTOEXEC.BAT

@ECHO OFF
PROMPT $p$g
PATH C:\WINDOWS;C:\DOS;C:\compre;C:\;D:\
SET TEMP=C:\DOS

C:\DOS\SMARTDRV.EXE
C:\MOUSE\MOUSE.COM
IF "%CONFIG%" == "CDROM" LH C:\DOS\MSCDEX.EXE /D:MSCD000

By using an IF instead of GOTO for loading MSCDEX.EXE, you can move the load order around easier. With only 3 items loading in AUTOEXEC.BAT, things actually get easier. I'm loading 4 in CONFIG.SYS and 5 in AUTOEXEC.BAT. That was a fun time of BOOT, re-order, BOOT, re-order, etc.... I can say, with quite a bit of confidence, that you probably won't have to change anything in CONFIG.SYS.

Another thing you can do to help, is to do "mem /d > mem.txt" and post that text file. All I need is the part between "Upper Memory Detail:" and "Memory Summary:". This shows what is loading where. It can help plan out when to load what, and if you want or need to use a memory target (adding /L:# to load in a specific block.)

*edit* Oh, what Motherboard are you using, and what is your BIOS version? May not make a difference, but some really mess around with available upper memory. One of the motherboards I tried while building my last system literally froze all but 32K of the upper memory area. Nothing I could do would free it up. Most BIOS have an option to reserve memory, this one had that locked "ON" with every page. Knowing your BIOS, I could look up the settings myself, or you could look to see if memory is being reserved yourself. In my case it's under "Resource Management" IIRC.

Feeding Dragon

Reply 136 of 298, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

OK, on your MB, from what I can find. Under "BIOS Features Setup" on the right side are the memory pages that BIOS can reserve to shadow legacy expansion cards. Most likely, none of your cards need any of them. So you might be able to free up some reserved upper RAM for setting them to disabled. From what I can find, that is the main thing in BIOS that you will need to check for freeing up upper RAM. Beyond that, try the boot I provided and let me know how the mem.txt file comes out 😀

Feeding Dragon

Reply 137 of 298, by Sev80

User metadata
Rank Member
Rank
Member

So I tried your config.sys and autoexec.bat, no difference 🙁

I have disabled all shadowing int he bios, still showing 384k reserved, I even pulled out my PCI video card and put in a ISA one, same thing.

Here are my mem /c and mem /d results

Mem /c :

Modules using memory below 1 MB:

Name Total = Conventional + Upper Memory
-------- ---------------- ---------------- ----------------
MSDOS 16,029 (16K) 16,029 (16K) 0 (0K)
HIMEM 1,168 (1K) 1,168 (1K) 0 (0K)
EMM386 3,120 (3K) 3,120 (3K) 0 (0K)
COMMAND 2,976 (3K) 2,976 (3K) 0 (0K)
MOUSE 17,072 (17K) 17,072 (17K) 0 (0K)
SMARTDRV 29,024 (28K) 29,024 (28K) 0 (0K)
Free 555,456 (542K) 555,456 (542K) 0 (0K)

Memory Summary:

Type of Memory Total = Used + Free
---------------- ---------- ---------- ----------
Conventional 655,360 99,904 555,456
Upper 0 0 0
Reserved 393,216 393,216 0
Extended (XMS)* 32,505,856 2,768,896 29,736,960
---------------- ---------- ---------- ----------
Total memory 33,554,432 3,262,016 30,292,416

Press any key to continue . . .
Total under 1 MB 655,360 99,904 555,456

Total Expanded (EMS) 32,833,536 (32,064K
Free Expanded (EMS)* 29,982,720 (29,280K

* EMM386 is using XMS memory to simulate EMS memory as needed.
Free EMS memory may change as free XMS memory changes.

Largest executable program size 555,360 (542K)
Largest free upper memory block 0 (0K)
MS-DOS is resident in the high memory area.

Mem /d

Conventional Memory Detail:

Segment Total Name Type
------- ---------------- ----------- --------
00000 1,039 (1K) Interrupt Vector
00040 271 (0K) ROM Communication Area
00050 527 (1K) DOS Communication Area
00070 2,656 (3K) IO System Data
CON System Device Driver
AUX System Device Driver
PRN System Device Driver
CLOCK$ System Device Driver
A: - C: System Device Driver
COM1 System Device Driver
LPT1 System Device Driver
LPT2 System Device Driver
LPT3 System Device Driver
COM2 System Device Driver
COM3 System Device Driver
COM4 System Device Driver
00116 5,072 (5K) MSDOS System Data
00253 10,688 (10K) IO System Data
1,152 (1K) XMSXXXX0 Installed Device=HIMEM
3,104 (3K) EMMXXXX0 Installed Device=EMM386
2,080 (2K) FILES=40
256 (0K) FCBS=4
512 (1K) BUFFERS=30
448 (0K) LASTDRIVE=E
3,008 (3K) STACKS=9,256
004EF 80 (0K) MSDOS System Program
004F4 48 (0K) COMMAND Data
004F7 2,656 (3K) COMMAND Program
0059D 80 (0K) MSDOS -- Free --
005A2 272 (0K) COMMAND Environment
005B3 144 (0K) MOUSE Environment
005BC 29,024 (28K) SMARTDRV Program
00CD2 16,928 (17K) MOUSE Program
010F4 144 (0K) MEM Environment
010FD 88,992 (87K) MEM Program
026B7 466,384 (455K) MSDOS -- Free --

Memory Summary:

Type of Memory Total = Used + Free
---------------- ---------- ---------- ----------
Conventional 655,360 99,904 555,456
Upper 0 0 0
Reserved 393,216 393,216 0
Extended (XMS)* 32,505,856 2,768,896 29,736,960
---------------- ---------- ---------- ----------
Total memory 33,554,432 3,262,016 30,292,416

Total under 1 MB 655,360 99,904 555,456

Handle EMS Name Size
------- -------- ------
0 060000

Total Expanded (EMS) 32,833,536 (32,064K
Free Expanded (EMS)* 29,982,720 (29,280K

* EMM386 is using XMS memory to simulate EMS memory as needed.
Free EMS memory may change as free XMS memory changes.

Memory accessible using Int 15h 0 (0K)
Largest executable program size 555,360 (542K)
Largest free upper memory block 0 (0K)
MS-DOS is resident in the high memory area.

XMS version 3.00; driver version 3.16
EMS version 4.00

Reply 138 of 298, by FeedingDragon

User metadata
Rank Oldbie
Rank
Oldbie

Something is blocking you from using any upper memory. From reading the MEM report, you have 0 bytes of upper memory used and 0 bytes of upper memory free. With the boot sequence you are using, there is nothing I can find that could be causing this. I haven't been able to find anything on the net about it either.

Feeding Dragon

Reply 139 of 298, by Jorpho

User metadata
Rank l33t++
Rank
l33t++

Maybe there's just some kind of weird hardware fault in the motherboard.

The only other thing I can think of trying at this point is to try substituting HIMEM with HIMEMX, a free open-source replacement that under some conditions seems to work better than HIMEM.

Or, since this is a Pentium, it might be worthwhile to see if UMBPCI does anything.