Skipping AUTOEXEC.BAT

RetroViator

Tinkerer
Oct 30, 2021
82
101
33
retroviator.com
I've been plugging away on my IBM 5160. It is configured with an XT-IDE and a Gotek, and aside from media upgrades, I would like to keep the experience as vintage as possible. I have other XT-class computers I can max out, and I have an IBM 5150 I'll leave completely stock, but I'm hoping to strike a happy balance with this 5160, so I have a usable vintage experience. With that vintage theme, I decided to use PC-DOS 2.11. My first DOS version was 3.0 or 3.3, and I had not spent quality time with earlier versions of DOS.

PC-DOS 2.0 shipped with the IBM XT, but 2.1 was released a few months later. While DOS 2.0 added support for 360K floppies, device drivers, hard drives with subdirectories, and other critical features, DOS 2.1 added support for the PCjr. I have learned that while DOS 1 was a repackaging of Seattle Computer Products' (SPC) 86-DOS, and its similarities to CP/M are obvious, DOS 2 built on this foundation and added influences from XENIX, a UNIX variant. These influences can be seen in how subdirectories are handled, piping was added, and daemons (or background processes aka TSRs) could run in the background. This version also added support for device drivers--with ANSI.SYS the first, to provide ANSI terminal emulation.

When setting up the hard drive, I was surprised that my autoexec.bat file was not loading. No errors; it was just being ignored. I double-checked to ensure DOS 2.11 used config.sys and autoexec.bat (I learned even DOS 1.0 used autoexec.bat), and I was stumped. I reached out on Mastodon, and @vrus jumped in and shared that it could be the environment running out of memory or a device driver crashing in the config.sys. This prompted me to investigate my config.sys. I started by simply renaming it so it would not load at boot. Upon rebooting, the autoexec.bat ran perfectly. So I went back and looked at my very simple config.sys. I changed each line, and the one that made the difference was BUFFERS. I had it set for BUFFERS=20, and once removed, everything worked. DOS 2 supported buffers, and the documentation talks about it at length, but everything worked when I reduced the number from 20 to 10. I also had FILES=40, and I reduced that to 20 for good measure.

My 5160 has 640K of RAM, so I never suspected a memory allocation error, but this may be an early software limitation or just a glitch with DOS 2.
 
Last edited:

RetroViator

Tinkerer
Oct 30, 2021
82
101
33
retroviator.com
As far as I remember, with such an early release of DOS and 640k you would be limited to BUFFERS=15.
That would track. Each buffer takes 528 bytes of memory. The PC-DOS 2.1 manual states that, “if you use data-base applications, or run programs that perform a lot of random reads and writes of records… a value between 10 and 20 buffers will usually provide the best results.” But 20 was a problem for me. The default is 2, but they recommended 3 for computers with fixed disks.