First post, by brazil
Hello, I am using DOSBOX 0.72 to run an small application within XP SP2, that require access to some pins of Serial Interface COM2: (02F8h) and some pins of the Parallel Interface LPT1: (0378h). Up to this point everything is nice, clean and smooth, but it requires the USERPORT.EXE and .SYS so XP would release the I/Os for the DOSBOX, it works.
The problem:
Within this application, an executable code compiled from QBasic to IBM PC DOS Assembly via MASM.EXE, at some point I need to read into an array all specific files from the working directory at the HDD.
When running this application on Microsoft VPC (DOS 6.22), what I was doing was to issuing a "SHELL DIR /B *.XYZ > FILES.TXT" , so the DOS "DIR" command would do the trick, the /B switch tells it to create FILES.TXT with the "bare" names of all files with extension "TXT".
By "bare" names I mean in each line of text appears only the file name in the format nnnnn.eee without anything else, without headers or footers, without file size, attributes, dates, etc.
After issuing the SHELL DIR command, the application opens the FILES.TXT and read all lines (records) one by one, and get the filenames ready to use.
For my surprise, when migrating it to DOSBOX, there is no DIR /B switch. There is the usual switch /p (paging), the /s (should be for sub directories listing, but DOSBOX does nothing with, no error though), and the /w switch for wide format.
But not the /B switch, even so I think this switch is a very clean and easy to do within the DOSBOX, since it is only a piece of code from the normal DIR.
Without the /B, my life is miserable, really. For my dismay the DIR > command only includes 10h (New Line) character at the end of each line, and the old IBM PC Text Screen system understand it as "New Line" AND " Carriage Return" (hex 0Dh), so the file doesn't have CR at the end of each line. So, I needed to write a long code to go over this simple missing (/B) option at the DIR command.
I think this option would make my life less miserable, and will help to solve the average stress level of the World. Considering that this /B option is relatively used in applications that deal with files using strategies like mine.
Question is, what is the possibility for this /B switch been accepted as to make part of the next version of DOSBOX?
Of course, asking a finger really means two of them.
The /a switch would be the best companion, so /ah could be fantastic to find hidden files.
I also see the ATTRIB DOS command is only for compatibility, it really does nothing, but it could really set attributes for hidden, system, read-only, etc.
Thanks for any hopes and for this great program.
WagnerLip