home *** CD-ROM | disk | FTP | other *** search
- DDIR5
- =====
-
- DDIR4 was made by Harron K. Appleman from the original DDIR program by
- Charles Petzold. As part of the message exchange between these two
- programmers contained in the DDIR4.DOC file, Charles suggested that
- DDIR be modified to accommodate screens longer than 25 lines.
-
- I have made some quick (and dirty?) patches to the code of Charles and
- Harron, to include a computation of the number of lines on the current
- screen. This can be done by dividing the number of _words_ of screen
- memory by the number of characters per line. Characters per line and
- _#bytes_ per screen are stored in the ROM communication area at 40:4A
- and 40:4C respectively, so the computation is relatively simple. Then,
- changing the screen-full-sensing code to compare with the stored
- linecount will pause the screen when full.
-
- I have tested this on two computers with 25 lines and 40 lines. Please
- give it a try on your computer and let me know if you find a problem.
- DDIR5 should print out a full screen of directory and pause, regardless
- of the number of screen lines in use at the moment.
-
- Joseph "Skip" Reymann,
-
-
- The following is the .DOC file which was included with DDIR4.
-
- DDIR4
- =====
-
- DDIR by Charles Petzold has become another one of those PCMAG utilities that
- I use daily. It resides on my system path, I use it routinely in place of
- DOS DIR, and I've come to take it for granted that it will always be there.
- Imagine my surprise, then, when it became yet another casualty under DOS 4.0.
-
- With help from Charles over at the PROGRAMMING/Environments forum I was able
- to modify DDIR so it would work under DOS 4.0 (MS-DOS 4.01 in my case). It
- should still be compatible with previous versions of DOS.
-
- This archived file contains DDIR4.COM, an immediately executable version of
- the new program; DDIR4.ASM, the modified source code; and, of course, this
- DOC file. A copy of the communication between Mr. Petzold and me follows for
- those who are interested in what transpired.
-
- Harron K. Appleman 73047,576
-
-
- -----------------------------------------------------------------------------
-
- #: 14086 S2/Environments [P]
- 03-Apr-89 15:15:37
- Sb: #DDIR Weirdness
- Fm: Harron K. Appleman 73047,576
- To: Charles Petzold
-
- Charles,
- As I recently related to you (when I had the problem with Key-Fake), I
- have switched from a vintage IBM PC running PC-DOS 3.3 to a Northgate 386
- running MS-DOS 4.01. Another minor problem has cropped up, and I'd
- appreciate your help. As I recall you also authored DDIR. Look what DDIR
- does under my new system:
-
- . <DIR> 03-23-89 10:05a | PCMGNT ARC 23103 11-16-88 12:30a
- .. <DIR> 03-23-89 10:05a | PCP ARC 30745 03-21-89 11:41a
- BS BAT 2827 03-23-89 2:07a | PKATZCON ZIP 18048 03-31-89 9:50p
- COMPAT SCR 8656 01-04-89 11:09p | PKZ-OPT ZIP 8320 03-31-89 9:47p
- Directory of D:\COMM\DNLD | Volume Serial Number is 2268-10F
- EXECPC ARC 4728 03-30-89 2:59a | Volume in drive D is HARRON386_1
- 9 File(s) 18089984 bytes free
-
- I've replaced the vertical bar extended character with "|" for this
- transmission, but the console output is otherwise intact. Everything is
- there, just a bit scrambled.
-
- Any ideas?
-
- -- Harron
-
-
- #: 14092 S2/Environments [P]
- 03-Apr-89 17:48:58
- Sb: #14086-#DDIR Weirdness
- Fm: Charles Petzold [PCMAG] 72241,56
- To: Harron K. Appleman 73047,576 (X)
-
- Prior to DOS 4.0, the information that preceded the directory list was indented
- by one space. That's how DDIR was able to exclude it when it accumulated all
- the file names and sorted them. Under DOS 4.0, this information is not
- indented, so DDIR thinks those are more files.
-
- The only solution to this is extensive revisions to DDIR that would recognize
- these non-filename strings and exclude them from the sort. At any rate, it
- seems to me that programs like DDIR are not required under DOS 4.0 because the
- shell provides similar capabilities.
-
- Charles
-
-
- #: 14116 S2/Environments [P]
- 04-Apr-89 04:07:38
- Sb: #14092-DDIR Weirdness
- Fm: Harron K. Appleman 73047,576
- To: Charles Petzold [PCMAG] 72241,56 (X)
-
- Charles,
-
- Thanks for the info. I had a feeling DOS 4 was responsible for the
- mess-up with DDIR.
-
- My upgrade to MS-DOS 4.01 was not a deliberate choice. It came with my
- new computer. I haven't even tried loading the shell because I've assumed,
- correctly or not, fairly or not, that it's just another attempt to make DOS
- palatable to the micro-illiterate. I'd rather type in a command (e.g., "DD" --
- my DDIR is named DD.COM) at the prompt than deal with menus. Users like me may
- soon be dinosaurs with the onslaught of GUI, but that's the way I am.
-
- I'm going to peruse through your DDIR source code. I think it would be a
- good programming exercise to see if I can make DDIR work under DOS 4. Your
- input has, at least, given me a headstart.
-
- -- Harron
-
-
- #: 14117 S2/Environments [P]
- 04-Apr-89 05:21:32
- Sb: #14092-DDIR Weirdness
- Fm: Harron K. Appleman 73047,576
- To: Charles Petzold [PCMAG] 72241,56
-
- Charles,
-
- It was pretty easy. Fortunately, all filenames are all caps, whereas
- non-filename strings are initial caps only. So I just decided to check for a
- lower case letter in the second position. Luck would have it that any other
- possible character in the second position, e.g. "." or any numeral, are all
- lower in ASCII value than lower case letters, which start at 61H.
-
- YOUR ORIGINAL CODE
- ==================
-
- Cmp Byte Ptr DS:[SI],' ' ; See if first char is blank
- Jne ItsAFile ; If not, it's a file line
-
- Cmp CS:[WithinFileList],1 ; See if doing file listing
- Jne AllowTransfer ; If not, just print stuff
-
- Call SortAndList ; Files done -- sort and list
- Mov CS:[WithinFileList],0 ; Not doing files now
- Jmp Short AllowTransfer ; So just print the stuff
-
- ItsAFile: Cmp CS:[FileCounter],528 ; See if 11 buffer filled up
- Jb NotTooManyFiles ; If not just continue
-
-
- MY MODIFICATION
- ===============
-
- Cmp Byte Ptr DS:[SI],' ' ; See if first char is blank
- Jne CheckForFile ; If not, check 2nd char
-
- Resume: Cmp CS:[WithinFileList],1 ; See if doing file listing
- Jne AllowTransfer ; If not, just print stuff
-
- Call SortAndList ; Files done -- sort and list
- Mov CS:[WithinFileList],0 ; Not doing files now
- Jmp Short AllowTransfer ; So just print the stuff
-
- CheckForFile: Cmp Byte Ptr DS:[SI+1],61H ; See if 2nd char is lower
- Jge Resume ; case -- if so, not a file
-
- ItsAFile: Cmp CS:[FileCounter],528 ; See if 11 buffer filled up
- Jb NotTooManyFiles ; If not just continue
-
-
- This may be simplistic, but it's two additional lines of code plus a label,
- and it seems to work.
-
- -- Harron
-
-
- #: 14125 S2/Environments [P]
- 04-Apr-89 14:55:36
- Sb: #14117-DDIR Weirdness
- Fm: Charles Petzold [PCMAG] 72241,56
- To: Harron K. Appleman 73047,576
-
- OK, looks good. I hope you're going to upload the new DDIR (call it DDIR4 or
- something like that) so others can use it.
-
- Now how about modifying the program so it works right with 43 and 60 line
- screens? <grin>
-
- Charles
-
-
- Charles,
-
- Hey, look, I like this stuff, but I'm no masochist. I'll leave the
- DDIR4_43_60 exercise for someone else with more knowledge and time and on
- their hands.
-
- In the meantime I'll upload DDIR4.ARC (DDIR4.ASM, DDIR.COM, and a copy
- of this thread) over at UTILFORUM.
-
- Thanks for the assistance.
-
- -- Harron