Recipes
Outcome: five small jobs, each done with parts this guide has already proven.
1. A self-opening workbench. A
config file whose [autoexec] mounts
your DOS folder, steps into it, and sets
a working PATH:
[autoexec]
mount c /home/you/doswork
c:
path c:\;c:\tools;z:\
Keep a copy per project and start with
dosbox -conf project.conf: each
project gets its own machine. Chapter
7's marker trick — have the section
echo a line into a file — settles any
doubt about which config was read.
2. Run headless, keep the output.
Any command-line DOS work can be driven
unattended the way the lab was: -c
flags for commands, > for output, a
mounted folder as the mailbox, and
exit last:
dosbox -c "mount c /home/you/doswork" -c "c:" \
-c "report > C:\OUT.TXT" -c "exit"
Remember chapter 8's trap: if report
is a batch file, it must be the last
real command, or run under CALL, or
the exit never happens — end a driver
batch with EXIT instead.
3. Back up a DOS tree, from inside.
FreeDOS XCOPY (chapter 9) with /E
copies a tree with its subdirectories.
Copy the FreeDOS utilities you use into
a TOOLS folder on your mounted drive
and add it to the PATH; the lab's
backup of its UTILS folder is two
files and one line in t05.
4. Compare before you overwrite.
FreeDOS FC old new shows what actually
differs between two versions of a text
file — kinder than overwriting on a
hunch, and its output saves to a file
with > for the record.
5. Two machines, two speeds. Keep
two config files identical except for
[cpu] cycles: one slow (cycles=4000)
for the program that runs away, one
fast (cycles=max) for the compiler or
archiver that should hurry. CONFIG
-GET "cpu cycles" inside each confirms
which machine you booted — measured,
not remembered.