FORMAT FOR THE BSA VE COMMAND
BSAVE "file name" [,Ddrive#] [,Udevice#] [Bbank#]
[,Pstarting address] [TO Pending address
+ I]
where the usual options are the same and bank # is one
of
the
16
banks
of
the C 128. The
addresses to be saved are given in decimal. Note that the ending address must be
I
location beyond the last location to be saved.
To access a built-in monitor, type MONITOR. To exit a monitor, type
X alone on a
line.
FORMAT FOR A MONITOR SAVE
. S "drive # :file name" ,device
#,
starting address ,ending address + I
where "drive
#:"
is
the drive number, 0 on the 1571; "file name"
is
any valid
file
name
up to
14
characters long (leaving 2 for the drive number and colon); "device
#"
is
a two
digit device number, normally 08 on the
1571
(the leading 0 is required); and the
addresses to be saved are given in Hexadecimal (base 16,) but without a leading dollar
sign (for the Plus/4).
On
the C128, the addresses need not be in Hexidecimal. Note that
the ending address listed must be
I location beyond the last location to be saved.
SAVE
WITH REPLACE
If
a
file
already exists, it can't be saved again with the same name because the disk
drive allows only one copy
of
any given
file
name per diskette.
It
is possible to get around
this problem using the RENAME and SCRATCH commands described later in this
chapter.
If
all you wish to
do
is replace a program or data
file
with a revised version,
another command is more convenient. Known
as
SAVE WITH REPLACE, or @SAVE
this option tells the disk drive to replace any
file
it
finds
in the diskette directory with the
same name, substituting the new
file
for the old version.
FORMAT FOR SAVE WITH REPLACE
DSAVE "@file name" [,Ddrive#] [,Udevice#]
The actual procedure is
this-the
new version
is
saved completely, then the old
version is scratched and its directory entry altered to point to the new version. Because it
works this way, there is little danger a disaster such
as
having the power going off midway
through the process would destroy both the old and new copies
of
the file. Nothing
happens to the old copy until after the new copy
is
saved properly.
Caution-do
not use @SAVE on an almost-full diskette. Only use it when you have
enough room on the diskette to hold a second complete copy
of
the program being
replaced. Due to the way @SAVE works, both the old and new versions
of
the
file
are on
disk simultaneously at one point,
as
a way
of
safeguarding against loss
of
the program.
If
there
is
not enough room left on diskette
to
hold the second copy, only
as
much
of
the new
26