Download AMOS Basic XCALL subs

Transcript
CHAPTER 7
XMOUNT — XCALL. SUBROUTINE TO MOUNT A DISK
XMOUNT is an XCALL subroutine that allows you to mount a disk from within an
You should call it whenever
AIphaBASIC program without Leaving AIphaBASIC.
tiles or
going to sort
AIphaBASIC
program
is
you change a disk and your
(You must always mount a disk
create new files on the newly changed disk.
after you've changed It and before you write to it; otherwise the system
When it comes time to
will
think that the old disk is stilt in the drive.
and
write information out to the new disk, the disk's bitmap wilt, be wrong,
wilt try to write to the new disk as if it had the same areas
the system
memory the proper bitmap,
into
free as the old one.) Besides bringing
in the alternate track table, if any, for the specified
loads
XMOUNT
also
device.
NEVER mount or unmount a disk while someone
IMPORTANT NOTE:
Doing
so may corrupt the data on the disk.
that disk.
is
accessing
Load the XMOUNT subroutine into system or user
necessary to
fully re—entrant, so for
is
However, the XMOUNT subroutine
memory.
increased access speed you may load it into system memory via the SYSTEM
command in your system initialization command file. (See the AMOS System
Operator's Guide, DSS—10001—OO, or the AMOS/I System Operator's Guide,
DSS—1000Z—OO for information on the system initialization command file.)
It
7.1
is
not
THE XMOUNT SUBROUTINE
You can call XMOUNT to mount a disk via:
XCALL XMOUNT,DEVICE,VOLUME' ID
Where:
DEVICE
device
a
String variable or expression that represents
You may optionally
specification
(e.g., "DSKl:").
follow the device specification with "IU" to unmount the
device (e.g., "DSKO:/U").