• Please review our updated Terms and Rules here

DOS Question about memory management.

Lutiana

Administrator
Staff member
Joined
Mar 26, 2009
Messages
3,301
Location
Dublin, CA USA
So I have an older Gateway (PIII-450) and I am running DOS on it. My ultimate goal is to use this machine for creating disks and moving data to the older machines I want to work on.

I have it up and running with MS-DOS 6.22 and it is on my network (via TCP/IP and a 10/100 3COM 3C905-TX). It all works just great.

Here are my problems/questions.

When I run:
Code:
mem /c/p
I notice that there is 384kb of Upper memory that is "reserved", this basically means that I only have about 19k of upper memory available, and as a result I am running out of base memory (only have about 360k free). This is making it very difficult to run anything.

I think the reserved amount is used for the bios to cache itself and I can't work out how to free this memory. If I can, then I can up my free base memory to 500+k. Any ideas? There is no options in the BIOS disabling BIOS caching.

Is there a better memory management system than himem.sys and emm386 that could allow for more upper memory?

Also, the BIOS only supports a single floppy drive but I intend to install a 1.44Mb 3.5" and a 1.2Mb 5.25 drive, so is there a PCI add on controller that you can suggest to handle this?
 
Is there a better memory management system than himem.sys and emm386 that could allow for more upper memory?
I use MS-DOS6.21 which works well for me but I only use the basic OS which is about 125K, although I still haven't gotten around to replacing smartdrive yet. You don't really want to use the MS memory management utilities because they are too bloated for most DOS systems. I recommend using jemmex.exe which replaces both himem.sys and emm386. I can't remember where I got it but it should be on the FreeDOS disk which you might want to use anyway unless you have a good reason for using MS at this point in time.

My config.sys line reads: device=c:\sys\0\jemmex.exe NOEMS I=B000-B7FFX
There are lots of utilities which are smaller than the old ones. An example is SHSUCDX.COM for your CD.

Just so you can see the way that I do it, here is the output of mem /c/p. As you can see, smartdrive is a poor choice but it works for now and I don't need the space up there at the moment.
Code:
Modules using memory below 1 MB:

  Name           Total       =   Conventional   +   Upper Memory
  --------  ----------------   ----------------   ----------------
  MSDOS       21,901   (21K)     21,901   (21K)          0    (0K)
  COMMAND      3,696    (4K)      3,696    (4K)          0    (0K)
  SHSUCDX      5,808    (6K)          0    (0K)      5,808    (6K)
  CRUISE       4,608    (5K)          0    (0K)      4,608    (5K)
  MON          1,056    (1K)          0    (0K)      1,056    (1K)
  NANSI        3,216    (3K)          0    (0K)      3,216    (3K)
  VIDE-CDD     5,024    (5K)          0    (0K)      5,024    (5K)
  RAMDRIVE     3,600    (4K)          0    (0K)      3,600    (4K)
  INTERLNK     9,632    (9K)          0    (0K)      9,632    (9K)
  SMARTDRV    35,168   (34K)          0    (0K)     35,168   (34K)
  DOSED        3,408    (3K)          0    (0K)      3,408    (3K)
  SNIPPER      4,208    (4K)          0    (0K)      4,208    (4K)
  INFOBAR      3,104    (3K)          0    (0K)      3,104    (3K)
  LAN595       3,600    (4K)          0    (0K)      3,600    (4K)
  Free       726,784  (710K)    629,424  (615K)     97,360   (95K)
 
Can we see a dump of your config & autoexec files, so we have a better idea what's going on?

In general, I agree with OJ, you're prolly better off with a DOS other than DOS. I always preferred DRDOS, but it's a matter of personal taste, I don't mean to incite any religious arguments here.

--T
 
Well I went through and replaced all the standard DOS memory management software. I am now using himemx and jemm386. I got the free base RAM upto about 510k (without my network stuff running).

The thing I don't get is that your machine has about 200k of Upper memory available. The most I can get mine to open up is 24k. If I could get that to 200k then I'd have no memory issues and would have more than 600k base free.

I can get a dump of the files in question as soon as I work out a feasible way to get the data from that machine to my main machine as neither machine has a floppy drive at the moment.
 
it's a longshot, but do you have legacy USB turned on on that gateway machine? That uses up a ton of upper memory since it has to run in real mode, and is essentially a giant option rom that is doing USB stuff and handing data to the legacy keyboard/mouse ports.
 
T: Can we see a dump of your config & autoexec files, so we have a better idea what's going on?
For all to see my amateurish blunders. :)

CONFIG.SYS
Code:
rem              ANA          ms-dos 6.22 config

device=c:\sys\0\jemmex.exe NOEMS I=B000-B7FFX

BUFFERS=20,4
FILES=50
FCBS=8,0
STACKS=9,256
lastdrive=Z
dos=UMB
dos=HIGH

shell=c:\sys\ms\command.com c:\sys\ms /e:1024 /p /f
switches=/f

DEVICEHIGH = c:\sys\0\nansi.sys
DEVICEHIGH = c:\sys\0\VIDE-CDD.SYS /D:MTMIDE01

DEVICEHIGH = c:\sys\ms\RAMDRIVE.SYS 16383 512 1024 /E
DEVICEHIGH = c:\sys\ms\RAMDRIVE.SYS 16383 512 1024 /E
DEVICEHIGH = c:\sys\ms\RAMDRIVE.SYS 32767 512 1024 /E

DEVICEHIGH = c:\sys\ms\INTERLNK.EXE   /NOSCAN /NOPRINTER /DRIVES:5
AUTOEXEC.BAT
Code:
@echo off
echo.
echo                 **** ANA MS-DOS 6.22 SETUP ****
echo ----------------------------------------------------------------------
break on
path m:\no;c:\sys\0;c:\sys\f;c:\sys\1;c:\sys\2;c:\sys\ms;c:\
prompt $e[31;40;1m$p $$$e[32;40;1m
SET TEMP=C:\TMP
SET wattcp.cfg=d:\comm\wattcp
SET ednoscan=u m n o
subst b: k:\work
subst x: k:\ftp
echo.
c:\sys\0\SHSUCDX.COM /D:MTMIDE01 /M:8 /L:U
LH SMARTDRV.EXE 6144
LH c:\sys\0\dosed /i
LH c:\sys\0\cruise/#6/@3/0/w2/s8
LH c:\sys\0\snipper
LH c:\sys\0\mon
LH c:\sys\0\infobar
LH c:\sys\1\lan595.com 0x60
call c:\sys\f\nohd.bat
o:
cls
MEM
Code:
Memory Type        Total  =   Used  +   Free
----------------  -------   -------   -------
Conventional         640K       25K      615K
Upper                176K       81K       95K
Reserved             384K      384K        0K
Extended (XMS)    129,872   71,905K   57,967K
----------------  -------   -------   -------
Total memory      131,072   72,395K   58,677K

Total under 1 MB     816K      106K      710K

Largest executable program size       615K (629,328 bytes)
Largest free upper memory block        38K  (38,608 bytes)
MS-DOS is resident in the high memory area.
 
Wow, not amateurish at all. So many questions...

Here goes...
Code:
device=c:\sys\0\jemmex.exe NOEMS I=B000-B7FFX

The memory range at the end is it a standard range, if not how do I work this one out?

Code:
shell=c:\sys\ms\command.com c:\sys\ms /e:1024 /p /f

Why?

Code:
DEVICEHIGH = c:\sys\ms\RAMDRIVE.SYS 16383 512 1024 /E
DEVICEHIGH = c:\sys\ms\RAMDRIVE.SYS 16383 512 1024 /E
DEVICEHIGH = c:\sys\ms\RAMDRIVE.SYS 32767 512 1024 /E

Why the need for 3 ram drives? Speed?

Now onto the autoexec.bat

Code:
prompt $e[31;40;1m$p $$$e[32;40;1m

Why the funny prompt?

The rest are simply questions about what the programs are that you are running and what they do. What are:

dosed
cruise
snipper
mon
infobar


Your config and autoexec have reminded me that there is alot of things I need to brush up on with these files and how they work.
 
The memory range statement I=B000-B7FFX is to regain the monochrome area. That's pretty standard DOS practice if you're not using a mono monitor. I can't remember why is chose the last part of the range (it was a while ago) so that might be changable by a few bytes.

The shell statement is to avoid having everything in my root directory and to just make it easy to change shells, not that I normally do that. The shell also belongs in my MS directory and not with other files. It's just clean that way. A lot of stuff like that is in the MS-DOS help file. Type "help" if you have all the normal files in MS-DOS 6.*. Actually, I really recommend reading all of that help file.

I use different drives (such as the three ram drives) to keep files and work areas neat. It is also easier to type O: than C:\blablabla\etc\. That is the reason for using substitute drives as well. You'll see that B: is used instead of K:\work (a kinda home dir) in order to cut down on typing. The SUBST command is also worth using on the fly to cut down on typing. Most of my work is done in O: so my HDD doesn't start up. When I feel a need to backup my work, I do "cp file b:". BTW, it's worth installing a command completion utility so you only type the first couple of letters. The same goes for directory changes. I have thousands of directories over two machines and I only need to type a few letters to get anywhere. (I wish Linux was that versatile -/sigh)

The prompt is not "funny". It is an absolute necessety. The normal prompt is very poor because the prompt is the same colour as the screen text. That is the wrong way to do it. Try my prompt and you'll know what I mean. It needs ANSI.SYS in your config.sys, or any of the smaller and faster ones like NANSI.

Regarding the utilities:

dosed - is a command completion utilty. Just type the first letter or two and hit TAB.

cruise - Speeds up the prompt. No more waiting. It needs to be set up carefully though because you can hold down the delete button and it will start slowly and then all of a sudden eat up the whole page. Speed kills! ... but it is oh so enticing. :) Cruise also inserts time and date and stuff. It's one of those utilities I can't do without.

snipper - Cut and Paste from anywhere to anywhere.

mon - Screen buffer. Hit F11 to remember the screen and start a new one. F12 to go back, or either one to cycle through the 8 buffers. Very handy for someone like me with a short term memory problem - just flick back and forth.

infobar - Just a bit of fluff. It brings up a movable bar which shows the numbers of the columns as you move your cursor. Also shows the ascii number of the letter under the cursor.

More about directories and drives. On a modern machine drive size is unlimited from a DOS point of view so I do a series of 2 meg partitions and utilize as many letters as I can. Actually, this post is too long anyway, I might as well show the layout. :)

Code:
ANA floppy 1.44  -     A
ANA substitute   -     B  >  K:\~
ANA winchester   -     C D E F G H I J K L
ANA ramdrive     -     M N O
ANA interlnk     -     P >  MAR B: Floppy  1.2Mb
                 -     Q >  MAR C: (210Mb) MARASMIUS
                 -     R >  MAR D: (420Mb) MAR-D
                 -     S >  MAR E: (420Mb) MAR-E
                 -     T >  MAR F: (569Mb) MAR-F
ANA CD-rom       -     U
ANA available    -     V W
ANA substitute   -     X >  K:\FTP
ANA available    -     Y Z
To access another computer called MAR, I type "lnk" and then have access to those drives including MAR's b drive which is a 5 1/4.

I hope this is useful and not too verbose. :)
 
This is the first time I have used DOS since about 2000 and I can see that it has come alone way....

I will investigate those utilities as they sounds VERY useful. Do you have any linkes etc on where I can get them? I tried googeling some of them to no avail.

You use Interlnk to access the other machine, is this via null-modem or ethernet? Is the other machine also a DOS box?

On a modern machine drive size is unlimited from a DOS point of view so I do a series of 2 meg partitions and utilize as many letters as I can.

Did you mean 2gig?

I hope this is useful and not too verbose.

Heck no, I am absorbing this information like a sponge.
 
lutiana: ... "I can see that it has come alone way...."
hehe Actually, that's the way it was done in the old PC-Mag days. :) Many of the utilities I use are from Zif Davies (sp?) and were written by Michael Mefford who I refer to as the "master of assembler". Those utilities have been scrubbed from the interner because PC-Mag doesn't want people using them any more. I have also been collecting utilities since the beginning although I've lost a lot too. You know, you should probably PM me and we'll see what we can do. :) Perhaps I can put together a little goodie package.

Interlnk works with serial and parallel. Serial is slow and I don't recommend it if you can use parallel which goes (depending on your UART) at 115200. Both machines have to run interlnk. Actually INTERLNK on the client, and INTERSVR on the server. I think I wrote a "quick start" on that a while ago here. I'll find the link and post it later. Regarding my "lnk" command, that is just a batch file of my own.

EDIT: The link is: http://www.vintage-computer.com/vcforum/showpost.php?p=79774&postcount=10

Did you mean 2gig?
Oops, yes. Actually, there is rarely any advantage to a 2gig partition because of the cluster size. DOS utilities and text files can't take advantage of that size unless you make many larger archives, which is not a bad idea. My current drive is 6gig and it looks like this:
Code:
VOLINFO       TOTAL     CLUSTER

C:ANA          250.7     4096
D:ANA-D        509.6     8192
E:ANA-E        509.6     8192
F:ANA-F        509.6     8192
G:ANA-G        509.6     8192
H:ANA-H        509.6     8192
I:ANA-I        509.6     8192
J:ANA-J        509.6     8192
K:ANA-K        509.6     8192
L:ANA-L       1019.5    16384
 
Last edited:
Ok, so I disabled the legacy USB support, this did not seem to make a difference. I then altered my config.sys and autoexec.bat and I have managed to gain some extra memory.

Here is a dump of my files:

Config.sys
Code:
DEVICE=C:\APPS\JEMM\JEMMEX.EXE NOEMS I=B000-B7FF

BUFFERS=20,4
FILES=50
FCBS=8,0
STACKS=9,256
LASTDRIVE=Z
DOS=HIGH
DOS=UMB

DEVICEHIGH=c:\APPS\JEMM\JLOAD.EXE c:\APPS\JEMM\XCDROM32.DLL /D:MSCD001
DEVICEHIGH /L:1,4656 =C:\NET\IFSHLP.SYS

Autoexec.bat
Code:
LH /L:0;1,12416 /S C:\NET\net initialize
@echo off
path=c:\dos;c:\nc;c:\network;c:\net;c:\net\netprog;c:\dos\suppl;

REM CD Driver
LH c:\apps\shcd\SHSUCDX.com /C /D:mscd001 /L:d

REM Mouse Driver
lh c:\dos\mouse\ctmouse.exe

REM MS Network Client
REM --------------------------------------
C:\NET\netbind.com
LH /L:0;1,736 /S C:\NET\umb.com
C:\NET\tcptsr.exe
DNR
C:\NET\tinyrfc.exe
C:\NET\nmtsr.exe
LH /L:0;1,1184 /S C:\NET\emsbfr.exe
rem C:\NET\net start
REM --------------------------------------

REM Load Norton Commander 5.0
LH NC

And this produces the following mem/c

Code:
Modules using memory below 1 MB:

  Name           Total       =   Conventional   +   Upper Memory
  --------  ----------------   ----------------   ----------------
  MSDOS       20,701   (20K)     20,701   (20K)          0    (0K)
  COMMAND      3,008    (3K)      3,008    (3K)          0    (0K)
  PROTMAN        400    (0K)        400    (0K)          0    (0K)
  EL90X       27,792   (27K)     27,792   (27K)          0    (0K)
  NDISHLP      1,440    (1K)      1,440    (1K)          0    (0K)
  PROTMAN      2,560    (3K)      2,560    (3K)          0    (0K)
  COMMAND      3,072    (3K)      3,072    (3K)          0    (0K)
  UMB            960    (1K)        272    (0K)        688    (1K)
  TCPTSR      77,056   (75K)        272    (0K)     76,784   (75K)
  DNR         14,512   (14K)     14,512   (14K)          0    (0K)
  TINYRFC     18,512   (18K)        272    (0K)     18,240   (18K)
  NMTSR        6,160    (6K)      6,160    (6K)          0    (0K)
  IFSHLP       4,000    (4K)          0    (0K)      4,000    (4K)
  TCPDRV       1,328    (1K)          0    (0K)      1,328    (1K)
  NEMM           672    (1K)          0    (0K)        672    (1K)
  NC           5,600    (5K)          0    (0K)      5,600    (5K)
  CTMOUSE      3,104    (3K)          0    (0K)      3,104    (3K)
  JLOAD           96    (0K)          0    (0K)         96    (0K)
  SHSUCDX      5,872    (6K)          0    (0K)      5,872    (6K)
  Free       579,728  (566K)    573,712  (560K)      6,016    (6K)

Memory Summary:

  Type of Memory       Total   =    Used    +    Free
  ----------------  ----------   ----------   ----------
  Conventional         654,336       80,624      573,712
  Upper                122,400      116,384        6,016
  Reserved                   0            0            0
  Extended (XMS)    68,914,656    1,806,816   67,107,840
  ----------------  ----------   ----------   ----------
  Total memory      69,691,392    2,003,824   67,687,568

  Total under 1 MB     776,736      197,008      579,728

  Largest executable program size        573,488   (560K)
  Largest free upper memory block          4,096     (4K)
  MS-DOS is resident in the high memory area.

One thing I notice is that my memory managers only maps 64Mb of RAM, yet yours shows 128Mb (I have 256mb installed in the machine).

I cannot work out why command is loaded twice. Thats 3k of RAM wasted.

I am doing much better, I cannot get the MS networking stuff to load in upper memory, so I think I am going to delegate these to a second batch file and only call on them when I want to copy files to or from the machine, I may do this in a menu system via the config.sys and autoexec.bat

Is WATTCP a better option to use? Is there an app that can map a share from a win95 machine via TCP/IP that has a smaller footprint and uses WATTCP?
 
I don't recall what JLOAD.EXE does. When I installed JEMMEX last year, it worked like a charm and I stopped lookin into it any more. lol

Yes, the two "command" entries is strange. I assume that one of the networking executables wants to work in another shell. What happens when you type "EXIT"?

Regarding WATTCP, it's the only networking that I've used extensively. There is a small collection of wattcp apps floating around the net but not a lot. I find it convenient. The network commands that I use are FTP, PING, DNS, HTGET, TELNET, and TROUT. DNS gives reverse dns and TROUT is a traceroute utilility and I find it handy that those are always available at my fingertips. There is also RSH, GOPHER, IRC, and numerous MAIL transports. The real killer app though, is FTP. That is how I move files in and out of "dosworld". I put an FPP server on my Linux box (proftpd) and with a couple of batch files to automatically log into specifc directories, things run smooth and fast around here. :) I don't know how others view it, but toTo me FTP basically appends the file system of a remote computer. Actually, I just put up a home page for personal contacts, and that is accessed via an automatic FTP batchfile on my dosbox. Anyways ... I have to profess ignorance because I don't know anything about Windows shares (or the stockmarket - lol) that's why I use FTP. It works on all my machines and all over the internet, so I never had a need for any other way to do it. I would guess that an FTP server would be trivial in MS-WIN too.
 
Ok, so I added a Jaz Drive into the mix and it shot the memory through the floor.

I then got to thinking that I did not need the network up all the time, and that I could simply reboot when I did, so I re-wrote my entire config.sys and autoexec.bat. They are now menu driven.

Here they are:

Config.sys
Code:
[menu]
menuitem=NETWORKJAZ, Start computer with MS CLIENT 3.0 and JAZ
menuitem=NETWORK, Network Only
menuitem=JAZ, Jaz Only
menuitem=NONE, Neither
menudefault=NONE,30
menucolor=2,0

[NETWORKJAZ]
DEVICEHIGH /L:1,4656 =C:\NET\IFSHLP.SYS

[NETWORK]
DEVICEHIGH /L:1,4656 =C:\NET\IFSHLP.SYS

[JAZ]

[NONE]

[COMMON]
DEVICE=C:\APPS\JEMM\JEMMEX.EXE NOEMS I=B000-B7FF

DEVICEHIGH=c:\APPS\JEMM\JLOAD.EXE c:\APPS\JEMM\XCDROM32.DLL /D:MSCD001

BUFFERS=20,4
FILES=50
FCBS=8,0
STACKS=9,256
LASTDRIVE=Z
DOS=HIGH
DOS=UMB

Autoexec.bat
Code:
@echo off
path=c:\dos;c:\nc;c:\network;c:\net;c:\net\netprog;c:\dos\suppl;

REM CD Driver
LH c:\apps\shcd\SHSUCDX.com /C /D:mscd001 /L:e

REM Mouse Driver
lh c:\dos\mouse\ctmouse.exe

IF "%config%"=="NETWORKJAZ" GOTO NET
IF "%config%"=="NETWORK" GOTO NET
IF "%config%"=="JAZ" GOTO JAZ
IF "%config%"=="NONE" GOTO END

:NET
REM MS Network Client
REM --------------------------------------
LH /L:0;1,12416 /S C:\NET\net initialize
C:\NET\netbind.com
LH /L:0;1,736 /S C:\NET\umb.com
C:\NET\tcptsr.exe
DNR
C:\NET\tinyrfc.exe
C:\NET\nmtsr.exe
LH /L:0;1,1184 /S C:\NET\emsbfr.exe
C:\NET\net start
REM --------------------------------------
IF "%config%"=="NETWORKJAZ" GOTO JAZ
Goto END


:JAZ
LH c:\apps\iomega\guest
goto END

:END
REM Load Norton Commander 5.0
LH NC

With everything loaded I have 385k base and 47k upper free.
With just the network I have 406k base and 66k upper free.
With just the jaz drive I have 605k base and 84k upper free
and the "bare" boot gives me 627k base and 103k upper free.

I believe this is the best option, and gives me a ton of memory to do all the things I may need to do. I figure once I am ready to copy something on or off I can simply reset the machine. I might drop the "bare" option and simply have the Jaz only as the default.
 
Back
Top