Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FileFlopfmt()Flopwr()Protobt() XBIOSSyntaxVOID Protobt( buf, serial, type, execflag )
VOIDP buf;
LONG serial;
WORD type, execflag;
Function Protobt() creates a prototype floppy boot sector in memory
for writing to a floppy drive.
Opcode 18 (0x12)
Availability All TOSversions.
Parameters buf is a 512 byte long buffer where the prototyped buffer
will be written. If you are creating an executable boot
sector, the memory buffer should contain the code you
require. serial can be any of the following values:
Name serial Meaning
SERIAL_NOCHANGE -1 Don't change the serial
number already in memory.
SERIAL_RANDOM >0x01000000 Use a random number for the
serial number
- any other Set the serial number to
positive serial.
number
type defines the type of disk to prototype as follows:
Name type Meaning
DISK_NOCHANGE -1 Don't change disk type.
DISK_SSSD 0 40 Track, Single-Sided (180K)
DISK_DSSD 1 40 Track, Double-Sided (360K)
DISK_SSDD 2 80 Track, Single-Sided (360K)
DISK_DSDD 3 80 Track, Double-Sided (720K)
DISK_DSHD 4 High Density (1.44MB)
DISK_DSED 5 Extra-High Density (2.88MB)
execflag specifies the executable status of the boot sector as
follows:
Name execflag Meaning
EXEC_NOCHANGE -1 Don't alter executable status
EXEC_NO 0 Disk is not executable
EXEC_YES 1 Disk is executable
Binding move.w execflag,-(sp)
move.w type,-(sp)
move.l serial,-(sp)
pea buf
move.w #$12,-(sp)
trap #14
lea 14(sp),sp
Caveats type values of DISK_DSHD and DISK_DSED are only available when
the high byte of the '_FDC' cookie has a value of FLOPPY_DSHD (1) and FLOPPY_DSED (2) respectively.
Comments To create an MS-DOS compatible disk you must set the first
three bytes of the prototyped boot sector to 0xE9, 0x00, and
0x4E.
See Also Flopfmt(), Flopwr()