[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ProDOS Question
In article <32ACBB11.26FC@ccmail.dsccc.com>, Vince Guytan II
<VGUYTAN_at_DSC-OS8@ccmail.dsccc.com> writes:
>
>I have ProDOS 2.0.1 and also have read the ProDOS 1.0.1 book. I cannot
>find any reference on how to switch directories. Can anyone help? On a
>PC you would just type cd [directory name] and it would switch. also,
>how would i create a directory?
>
The ProDOS close-equivalent of PC DOS cd is PREFIX.
For example,
PREFIX /NARF
sets the current default directory to the main directory of the disk (or
volume) named
"NARF". The "/" indicates a volume name.
Note: The disk or volume is, technically, named "NARF". Users often
include the leading slash when labeling a diskette to indicate that the
diskette is in ProDOS format. The pathname prefix would be "/NARF/".
PREFIX /NARF
also sets the default drive (that is, defaults for SLOT and DRIVE) to that
in which the volume named NARF is located.
PREFIX PICS sets current directory to PICS within the current default
directory--
i.e. since there is no leading "/", it adds PICS to the current default
directory pathname.
PREFIX /NARF/PICS is the same as doing
PREFIX /NARF followed by
PREFIX PICS
.
After the above, the pathname prefix would be "/NARF/PICS/". Doing a
CAT would do a short-form catalog of /NARF/PICS. A LOAD, SAVE, etc. would
happen in the /NARF/PICS subdirectory.
PREFIX PROGRAMS,S6,D1
sets the default directory to PROGRAMS in the diskette (or volume) in
Slot 6, Drive 1 plus. If the volume is named "UTILITIES", the default
pathname prefix will be "/UTILITIES/PROGRAMS/".
PREFIX/
is a special prefix command. It wipes the existence of any default
directory from ProDOS's 'memory'.
You can create a subdirectory via the CREATE command.
CREATE DHR,TDIR
would create the DHR directory in the current default directory. For
example, if the current directory is /NARF/PICS, then, the above command
would create /NARF/PICS/DHR.
>....
>Another question is how do I access the floppy drive in slot 6 if I have
>a hard drive in 7 which boots up automatically (instead of typing pr#6)?
>
PR#6 does more than just access the disk in Slot 6; it boots the disk
in Slot 6, Drive 1.
In ProDOS, you can access a disk (or volume) by name.
RUN /GAMES/TRADING/CHINA.SEA
will find the disk (volume) named "GAMES", then, find the subdirectory
"TRADING", and, then, find, load, and run CHINA.SEA. If /GAMES/TRADING is
the current default directory, then
RUN CHINA.SEA
will run the game. ProDOS will automatically add the "/GAMES/TRADING/"
part of the pathname.
You can, also, refer to a disk by its location ...
CAT,S6,D1
will do a short-form catalog of the main directory of the diskette in
DRIVE 1 connected to SLOT 6.
CAT,D1
will do a short-form catalog of the main directory of the diskette in
DRIVE 1 connected to the current default Slot.
Note: If no default directory (default pathname prefix) exists, then,
commands like CAT,D1 and CAT,D2 can change the default drive (that is,
defaults for SLOT and DRIVE). If a default directory exists, these
commands will not change SLOT and DRIVE defaults.
CAT /NARF or
LOAD /GAMES/TRADING/CHINA.SEA
will not change the default directory.
If a default directory exists, the command
PREFIX
outputs the pathname prefix. A program can discover this pathname as
follows:
100 PRINT CHR$(4)"PREFIX": INPUT"";P$
The pathname will be saved in P$.
If a default pathname does not exist, Line 100 will look at the the
current default drive (the drive at default SLOT and DRIVE) and set P$ to
the name of the volume it finds there. There would, still, be no default
directory. You would need to execute something like
110 PRINT CHR$(4)"PREFIX"P$
to set the default directory using the contents of P$.
Overall, ProDOS is fairly flexible about letting you manage program
execution.
A good resource for info on ProDOS commands is the series of six
"Using ProDOS" articles Lee Swoboda did for inCider (Mar-Aug, 1985).
Another good resource is "ProDOS Inside and Out" by Doms and Weishaar
(1986, from TAB Books).
Rubywand
- References:
- ProDOS Question
- From: Vince Guytan II <VGUYTAN_at_DSC-OS8@ccmail.dsccc.com>