Topic : TOS - The Operating System Author : Version : tos.hyp (December 19, 2008) Subject : Programmieren/Atari Nodes : 3010 Index Size : 93790 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Title @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File4.13.20 Protobt TOS Name: »prototype boot sector« - Generate a standard boot- sector for a floppy disk. Opcode: 18 Syntax: void Protobt( void *buf, int32_t serialno, int16_t disktype, int16_t execflag ); Description: The XBIOS routine Protobt creates a boot-sector for a floppy disk. The argument buf points to a 512 byte sized buffer holding the contents of the boot-sector. The parameter serialno serves to store a serial number in the boot-sector; if the variable serialno is greater than 0x01000000, then a random number will be stored instead. With disktype one of the following floppy disk types will be selected: disktype Meaning -1 Don't change disk type 0 40 tracks, single-sided (180 kbyte) 1 40 tracks, double-sided (360 kbyte) 2 80 tracks, single-sided (360 kbyte) 3 80 tracks, double-sided (720 kbyte) 4 High Density (1,44 Mbyte) is only supported if the cookie _FDC holds the value for HD support. 5 Extra High Density (2,88 Mbyte) is only supported if the cookie _FDC holds the value for ED support. Finally, the parameter execflag determines whether the information in the boot-sector can be executed as a program. The following apply: execflag Meaning -1 Do not alter boot-sector 0 Boot-sector is not executable 1 Boot-sector is executable Note: So that floppy disks may be read on MS-DOS systems as well, the first 3 bytes of the boot-sector have to have the values 0xE9, 0x00 and 0x4E or 0xEB, 0x34 and 0x90 entered; however, floppy disks of this kind are then no longer bootable under TOS. Return value: The function does not return a result. Availability: All TOS versions. Group: Drive functions See also: Binding Flopfmt