###   Projekte und Informationen rund um den KC85   ### 

 

CFOG's PIP, May 1989, Volume 8 No. 2, Whole No. 70, page 15

Double Column MS-DOS DIR Listings

by Alan Jay

[Alan Jay is a member of the United Kingdom User Group. This effort of his comes to us by way of the Quad Cities All Computer User Group newsletter which got it from the Boston Computer Society's PC REPORT newsletter.]

Have you ever noticed that when you use the MS-DOS DIR command that it uses only 40 columns? Have you ever wondered why?

Originally IBM designed the PC to work with a television set as a monitor, for home use. [You may remember that the original IBM PC came with a cassette tape drive port, too. IBM really knew how these things were going to be used! -- bhc] This limits display to 40 columns [because 80 columns on a low resolution standard television display is simply unreadable. -- bhc] so DIR only used 40 columns because that's all you might have. [The QCACUG editor notes that this hasn't been true for seven years, but DIR hasn't been changed! We can quibble about the number of years, but the idea is the same, some bad mistakes never get corrected. -- bhc]

Making DOS do double column DIR listings is a lot easier than you might think. While you could get one of the many DOS front ends (shells) or a directory listing utility from the software library, you could also change one byte in COMMAND.COM. A single byte change makes DIR write in two columns. It isn't sorted or anything fancy, but you get twice as many files on the screen at once.

To change to double column DIRectories you must search in (a copy of) COMMAND.COM for the following string:

A8 01 80 01 74 02 B0 05

It's the second 01 that you want to change to 02.

Here's a step by step set of directions:

1. Make a bootable disk with a copy of COMMAND.COM on it.

2. Uses the Norton Utilities (or any other editor with search capability) to find the hex string.

3. Change the designated byte and save the file.

4. Reboot using the disk just changed, and check that it works okay.

The whole thing should take you less than five minutes.

If you don't have a hex editor. you can use DEBUG. After step 1 above, proceed as follows:

2. Enter DEBUG COMMAND.COM<cr>.

3. Use the search command to locate the correct byte to change. Enter:

SCS:0100 9000 AB 01 B0 01 74 02 B0 05<cr>

which should give you the location of the string in which to make the change.

4. Enter the following string to make the change, substituting the address of the byte of the second 01 in the string for "xxxx":

E CS:xxxx<cr>

5. Two more steps are needed to write the file and quit:

W<cr>
Q<cr>

I have tried this on DOS 3.21. [The QCACUG editor notes that it works fine on DOS 3.20 and 3.2 as well. --bhc] Note that the date and time stamp on COMMAND.COM will be changed.