More on BATch
files
Before the days of Windows, with its efficient installations,
drive and memory management and simple double-click-the-icon to
run capabilities in MS-DOS you had to push things around yourself.
Which was fine. If you knew what to do!
We've already established that you can't run the
Psion emulators from Windows (not even in a DOS Command Promt).
So what do you do to get these emulators up-and-running?
Batch files
Microsoft were aware when they were developing DOS
that users wouldn't always remember the exact commands to type
in to get things up-and-running, or they would make typing errors.
So they included in MS-DOS the ability to write simple text files
containing a list of commands that you wanted DOS to carry out.
These text files were called BATCH files because they could carry
out a batch of commands, and carried the suffix .BAT.
Batch files make running the Psion emulators much
easier. I include a sample batch file in the download sections
above, and discuss it further below.
SUBST
One of the commands that you will see used quite
a lot in the batch file is the DOS command 'SUBST'.
SUBST is a terminate-and-stay resident (TSR) command,
which associates a drive letter with a directory path. Drive letters
used this way are called virtual drives.
This is a highly useful command when used with the
Psion emulators as the SIBO emulators (as the actual machines
themselves) expect the Internal drive to have the drive letter
M.
If your computer is partitioned in such a way that
you have installed the emulators on drive M: then you won't need
to bother with the SUBST command. However, in the likely situation
that you don't have 13 partitioned drives on your PC you'll find
that you need to tell DOS to regard the directory that you have
the emulator files copied into as drive M: (or virtual drive M:).
Example
On my PC I have the Series 3a emulator installed into the directory
C:\PSIEMUL\S3A\. The emulator expects this root directory to be
drive M: so in my batch file I issue the command:
SUBST M: C:\PSIEMUL\S3A
The syntax of this command is
SUBST newdrive:
drive:\existing path
The colon after the newdrive letter is important.
Issuing the command SUBST on its own outputs to the screen a lists
of all currently SUBSTituted drives.
Deleting SUBSTituted drives
To change a SUBST, you first have to "delete" it using
the switch /D, for example
SUBST M: /D
LASTDRIVE
Note that before you can SUBST to M:, the LASTDRIVE setting
in CONFIG.SYS must be set at least as high as M. (If you have
to change your CONFIG.SYS, you will have to reboot your PC before
this takes any effect.)
A and B Drives too
The emulator, like the Psion machines themselves
can also use drives A and B. On the Psion these are Solid State
Disks (SSDs); on the emulator these are, by default, mapped to
the A: and B: floppy drives on your PC.
You may find it convenient to
SUBST A: or B: whilst the emulator is running, to lessen the amount
of access made by the emulator to your floppy disk drives.
I find it useful to SUBST A:
and B: to either the C: drive, a folder containing other SIBO
software (for quick installation purposes), or my PsiWin 1.1 backups.
Sample Batch file
Here is the batch file I use for the S3a which is
saved as "C:\S3A.BAT" so that when I reboot to DOS I
can simply type S3A at the C:> prompt (or C:\S3A from any prompt).
C:
CD C:\PSIEMUL\S3A
@ECHO Creating Virtual Drives for Series 3a Emulator
SUBST
SUBST M: C:\PSIEMUL\S3A
SUBST A: C:\PSIEMUL
SUBST B: C:\PSIEMUL
C:\PSIEMUL\S3A\S3AEMUL.EXE
REM This section runs after
the Emulator has exited
@ECHO Deleting Virtual Drives and returning PC to normal
SUBST M: /D
SUBST A: /D
SUBST B: /D
SUBST
CD C:\
Note that the actual emulator
is called with the line "S3AEMUL" and that the lines
after that will be run when you exit the emulator. |