Atari ST series Technical Reference Manual page 59

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

XBIOS Device and System Functions
Disktype
Value
0
40 tracks, single sided (180K)
1
40 tracks, double sided (360K)
2
80 tracks, single sided (360K)
3
80 tracks, double sided (720K)
Formats 2 and 3 are normally used for ST 3V2-inch
disks. Some 5VWnch drives for the ST are formatted as
type 1.
The last parameter, execflag, is used to indicate whether
the disk is used to execute some boot code at startup time.
This code consists of up to 480 bytes of machine language in­
structions, starting at byte 30 ($1E) of the boot sector. Most
of the time, you'll place a 0 in this variable to show that the
boot sector is not executable. If you place machine language
instructions that you want executed at power up, indicate
this by placing a one in execflag.
Protobt() can be used not only to create a new boot sec­
tor from scratch, but to modify an existing one as well. To
use it this way, you could read an existing boot sector into
the buffer with Floprd() (see below) and then call Protobt()
with one or more parameters set to - 1 . If serialnum, disktype,
or execflag are set to — 1, Protobt() will leave that value as it
currently exists is in the buffer and only change the other
specified values.
Once Protobt() has been used to create the boot sector,
all that remains is to write it to the first side 0, track 0, sector
one of the disk. The XBIOS call Flopwr() should be used for
this purpose and not the similar BIOS call Rwabs(). For
more information on the contents of a boot sector, see Ap­
pendix H.
The two remaining XBIOS disk functions are used to
verify a floppy disk sector and to read one or more sectors
from a floppy disk. Both are almost identical to Flopwr() in
format. The verify function is called Flopver(), and it's called
as follows:
int status devnum, secnum, tracknum, sidenum, numsecs;
long buf, resvd;
status = Floprd(buf, resvd, devnum, secnum, tracknum,
sidenum, numsecs);
Disk Format
51

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents