• DMAread | Reads sectors from hard drive. |
• DMAwrite | Writes sectors to hard drive. |
• Flopfmt | Formats track on floppy disk. |
• Floprate | Sets seekrate and timeout of floppy drive. |
• Floprd | Reads individual sectors from floppy disk. |
• Flopver | Verifies sectors of a floppy disk. |
• Flopwr | Writes sectors on floppy disk. |
• Metaclose | Releases a MetaDOS device. |
• Metadiscinfo | Obtains current status information. |
• Metagettoc | Returns the table of contents of a device. |
• Metainit | Obtains information about MetaDOS version. |
• Metaioctl | Sends GEMDOS opcodes to a MetaDOS device. |
• Metaopen | Initializes a MetaDOS device. |
• Metaread | Reads data from a MetaDOS device. |
• Metaseek | Seeks to a physical address. |
• Metasetsongtime | Starts audio playback of a timed portion of a track. |
• Metastartaudio | Starts audio playback of one or more songs. |
• Metastatus | Obtains the status of a MetaDOS device. |
• Metastopaudio | Stops audio playback. |
• Metawrite | Writes data to a MetaDOS device. |
• Protobt | Generates a boot-sector for a diskette. |
See also: GEMDOS file functions GEMDOS directory functions
Name: | »DMA read« - Read individual sectors from a DMA device.
| ||||||||||||||||||
Opcode: | 42
| ||||||||||||||||||
Syntax: | int16_t DMAread( int32_t sector, int16_t count, void *buffer,
int16_t devno );
| ||||||||||||||||||
Description: | The XBIOS routine DMAread reads single or multiple sectors
from an ACSI or SCSI device. The following apply:
Note: In many cases it is more sensible to use Rwabs in place of this function. The specified memory block must be capable of being written to for the hardware used (catchword: Fast-RAM buffer). On the TT030, SCSI devices are handled by this function not via DMA but via handshaking to transfer individual bytes, so alternative RAM may be used. But the Falcon uses DMA for SCSI transfers, so cannot use alternative RAM for this. | ||||||||||||||||||
Return value: | The function returns 0 if the operation was successful and no
error occurred, else a negative error-code.
| ||||||||||||||||||
Availability: | This function is only available from TOS 2.00 onwards.
| ||||||||||||||||||
Group: | Drive functions
| ||||||||||||||||||
See also: | Binding DMAwrite Floprd Flopwr Rwabs
|
C: | #include <tos.h>
int16_t DMAread( int32_t sector, int16_t count, void *buffer, int16_t devno ); |
Assembler: |
move.w devno,-(sp) ; Offset 12 pea buffer ; Offset 8 move.w count,-(sp) ; Offset 6 move.l sector,-(sp) ; Offset 2 move.w #42,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $E(sp),sp ; Correct stack |
Name: | »DMA write« - Write individual sectors to a DMA device.
| ||||||||||||||||||
Opcode: | 43
| ||||||||||||||||||
Syntax: | int16_t DMAwrite( int32_t sector, int16_t count, void *buffer,
int16_t devno );
| ||||||||||||||||||
Description: | The XBIOS routine DMAwrite writes single or multiple sectors
to an ACSI or SCSI device. The following apply:
Note: In many cases it is more sensible to use Rwabs in place of this function. The specified memory block must be capable of being read from for the hardware used (catchword: Fast-RAM buffer). SCSI devices are operated by this function not via DMA but via handshaking. | ||||||||||||||||||
Return value: | The function returns 0 if the operation was successful and no
error occurred, else a negative error-code.
| ||||||||||||||||||
Availability: | This function is only available from TOS 2.00 onwards.
| ||||||||||||||||||
Group: | Drive functions
| ||||||||||||||||||
See also: | Binding DMAread Floprd Flopwr Rwabs
|
C: | #include <tos.h>
int16_t DMAwrite( int32_t sector, int16_t count, void *buffer, int16_t devno ); |
Assembler: |
move.w devno,-(sp) ; Offset 12 pea buffer ; Offset 8 move.w count,-(sp) ; Offset 6 move.l sector,-(sp) ; Offset 2 move.w #43,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $E(sp),sp ; Correct stack |
Name: | »Floppy format« - Format specific tracks on a floppy
| ||||||||||||||||||||
Opcode: | 10
| ||||||||||||||||||||
Syntax: | int16_t Flopfmt( void *buf, int32_t filler, int16_t devno,
int16_t spt, int16_t trackno, int16_t sideno, int16_t interlv, int32_t
magic, int16_t virgin );
| ||||||||||||||||||||
Description: | The XBIOS routine Flopfmt formats one or more tracks on a
floppy disk. The following apply:
Note: As of the Blitter-TOS, the desktop allows a list of sector numbers to be passed to arrange tracks in a spiral format in such a way that the least possible time is lost at track changes waiting for the next sector. For a normal format (9 sectors per track) the memory segment specified with the parameter buf must have a size of at least 8 kbyte; in other cases the buffer may have to be increased above this. | ||||||||||||||||||||
Return value: | The function returns 0 when no error has occurred in formatting
the track. Otherwise a NULL-terminated list of the faulty sectors will
be written as a int16_t array into the buffer buf.
| ||||||||||||||||||||
Availability: | All TOS versions.
| ||||||||||||||||||||
Group: | Drive functions
| ||||||||||||||||||||
See also: | Binding Flopwr
|
C: | #include <tos.h>
int16_t Flopfmt( void *buf, int32_t filler, int16_t devno, int16_t spt, int16_t trackno, int16_t sideno, int16_t interlv, int32_t magic, int16_t virgin ); |
Assembler: |
move.w virgin,-(sp) ; Offset 24 move.l magic,-(sp) ; Offset 20 move.w interlv,-(sp) ; Offset 18 move.w sideno,-(sp) ; Offset 16 move.w trackno,-(sp) ; Offset 14 move.w spt,-(sp) ; Offset 12 move.w devno,-(sp) ; Offset 10 move.l filler,-(sp) ; Offset 6 pea buf ; Offset 2 move.w #10,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $1A(sp),sp ; Correct stack |
GFA-Basic |
Fehler%=Xbios(10,L:buf%,L:filler%,W:devno%,W:spt%,W:trackno%,W:sideno%,W:interlv%,L:magic%,W:virgin%)
|
Name: | »Floppy rate« - Read or set the seek rate of a floppy drive.
| |||||||||||||||||||||||||||||||||||||||
Opcode: | 41
| |||||||||||||||||||||||||||||||||||||||
Syntax: | int16_t Floprate( int16_t devno, int16_t newrate );
| |||||||||||||||||||||||||||||||||||||||
Description: | The XBIOS routine Floprate returns or sets the current seek
rate. The following apply:
Note: As of MagiC 3, one can additionally use Floprate (-1, newrate) to set the timeout for the floppy; a value of 300 means 1.5 seconds) this is the value that is set by default at booting). With older ROM-TOS versions one has to use the previously undocumented system variables:
For portable setting one can use the following sample routine. The MilanTOS 4.08 (2003.09.03) do nothing and returns always null. | |||||||||||||||||||||||||||||||||||||||
Return value: | The function returns the prior seek rate for the drive.
| |||||||||||||||||||||||||||||||||||||||
Availability: | The function is only available as of TOS 1.04.
| |||||||||||||||||||||||||||||||||||||||
Group: | Drive functions
| |||||||||||||||||||||||||||||||||||||||
See also: | Binding Flopwr Floprd Flopver Flopfmt
|
C: | #include <tos.h>
int16_t Floprate( int16_t devno, int16_t newrate ); |
Assembler: |
move.w newrate,-(sp) ; Offset 4 move.w devno,-(sp) ; Offset 2 move.w #41,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #6,sp ; Correct stack |
/* Portable setting of the floppy seek rate for all TOS versions (except RAM-TOS 1.00). Parameters: As for the XBIOS function "Floprate" */ int16_t SeekRate ( int16_t devno, int16_t newrate ) { int32_t stack; int16_t version; OSHEADER *sys; /* Get pointer to OS-header */ stack = Super (0L); sys = *((OSHEADER **) 0x4f2); version = sys->os_version; Super ((void *)stack); /* With newer TOS simply call "Floprate" */ if ( version >= 0x0104 ) return Floprate ( devno, newrate ); else { /* otherwise calculate pointer to internal GEMDOS variables */ int16_t *sk, merk; if ( version == 0x0102 ) sk = (int16_t *) 0x0a4e; else sk = (int16_t *) 0x0a08; /* Drive B: 2 int16_t follows */ if ( devno ) sk = &(sk[2]); merk = *sk; /* enter value only if not -1 */ if ( newrate != -1 ) *sk = newrate; /* always return old value */ return merk; } }
Name: | »Floppy read« - Read individual sectors from floppy disk.
| ||||||||||||||||||
Opcode: | 8
| ||||||||||||||||||
Syntax: | int16_t Floprd( void *buf, int32_t filler, int16_t devno,
int16_t sectno, int16_t trackno, int16_t sideno, int16_t count );
| ||||||||||||||||||
Description: | The XBIOS routine Floprd reads one or more physical sectors
from a floppy disk. The following apply:
| ||||||||||||||||||
Return value: | The function returns 0 if the operation was successful or a
non-zero error-code if not.
| ||||||||||||||||||
Availability: | All TOS versions.
| ||||||||||||||||||
Group: | Drive functions
| ||||||||||||||||||
See also: | Binding DMAread DMAwrite Flopwr Rwabs
|
C: | #include <tos.h>
int16_t Floprd( void *buf, int32_t filler, int16_t devno, int16_t sectno, int16_t trackno, int16_t sideno, int16_t count ); |
Assembler: |
move.w count,-(sp) ; Offset 18 move.w sideno,-(sp) ; Offset 16 move.w trackno,-(sp) ; Offset 14 move.w sectno,-(sp) ; Offset 12 move.w devno,-(sp) ; Offset 10 move.l filler,-(sp) ; Offset 6 pea buf ; Offset 2 move.w #8,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $14(sp),sp ; Correct stack |
GFA-Basic |
Fehler%=Xbios(8,L:buf%,L:filler%,W:devno%,W:sectno%,W:trackno%,W:sideno%,W:count%)
|
Name: | »Floppy verify« - Verify sectors of a floppy disk.
| ||||||||||||||||||||||||
Opcode: | 19
| ||||||||||||||||||||||||
Syntax: | int16_t Flopver( void *buf, int32_t filler, int16_t devno,
int16_ sectno, int16_t trackno, int16_t sideno, int16_t count );
| ||||||||||||||||||||||||
Description: | The XBIOS routine Flopver verifies that a series of sectors
can be read without error from a floppy disk drive. The following
apply:
Note: After the call one finds in the parameter buf a NULL-terminated list of 16-bit words containing the numbers of the defective sectors. So the function does not compare sectors with a block of memory; instead it always reads the sectors into the same buffer. This only verifies that the sectors can be read correctly, or if read errors occur during reading. | ||||||||||||||||||||||||
Return value: | The function returns the value 0 if the list stored in the
parameter buf is valid, or a non-zero value otherwise.
| ||||||||||||||||||||||||
Availability: | All TOS versions.
| ||||||||||||||||||||||||
Group: | Drive functions
| ||||||||||||||||||||||||
See also: | Binding
|
C: | #include <tos.h>
int16_t Flopver( void *buf, int32_t filler, int16_t devno, int16_ sectno, int16_t trackno, int16_t sideno, int16_t count ); |
Assembler: |
move.w count,-(sp) ; Offset 18 move.w sideno,-(sp) ; Offset 16 move.w trackno,-(sp) ; Offset 14 move.w sectno,-(sp) ; Offset 12 move.w devno,-(sp) ; Offset 10 move.l filler,-(sp) ; Offset 6 pea buf ; Offset 2 move.w #19,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $14(sp),sp ; Correct stack |
GFA-Basic |
Fehler%=Xbios(19,L:buf%,L:filler%,W:devno%,W:sectno,W:trackno%,W:sideno%,W:count%)
|
Name: | »Floppy write« - Write individual sectors on a floppy disk.
| ||||||||||||||||||
Opcode: | 9
| ||||||||||||||||||
Syntax: | int16_t Flopwr( VOID *buf, int32_t filler, int16_t devno,
int16_t sectno, int16_t trackno, int16_t sideno, int16_t count );
| ||||||||||||||||||
Description: | The XBIOS routine Flopwr writes one or more physical sectors
to a floppy disk. The following apply:
| ||||||||||||||||||
Return value: | The function returns 0 if the operation was successful or a
non-zero error-code if not.
| ||||||||||||||||||
Availability: | All TOS versions.
| ||||||||||||||||||
Group: | Drive functions
| ||||||||||||||||||
See also: | Binding DMAread DMAwrite Floprd
|
C: | #include <tos.h>
int16_t Flopwr( VOID *buf, int32_t filler, int16_t devno, int16_t sectno, int16_t trackno, int16_t sideno, int16_t count ); |
Assembler: |
move.w count,-(sp) ; Offset 18 move.w sideno,-(sp) ; Offset 16 move.w trackno,-(sp) ; Offset 14 move.w sectno,-(sp) ; Offset 12 move.w devno,-(sp) ; Offset 10 move.l filler,-(sp) ; Offset 6 pea buf ; Offset 2 move.w #9,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $14(sp),sp ; Correct stack |
GFA-Basic |
Fehler%=Xbios(9,L:buf%,L:filler%,W:devno%,W:sectno%,W:trackno%,W:sideno,W:count%)
|
Name: | »Metaclose« - Release a MetaDOS device again.
|
Opcode: | 50
|
Syntax: | int32_t Metaclose( int16_t drive );
|
Description: | The function releases the drive drive again.
|
Return value: | The function returns a value of the type int32_t.
|
Availability: | This function is only available when MetaDOS has been installed.
|
Group: | Drive functions
|
See also: | Binding Metaopen
|
C: | int32_t Metaclose( int16_t drive );
|
Assembler: |
move.w drive,-(sp) ; Offset 2 move.w #50,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #4,sp ; Correct stack |
Name: | »Metadiscinfo« - Obtain current status information.
| ||||||
Opcode: | 63
| ||||||
Syntax: | int32_t Metadiscinfo( int16_t drive, CD_DISC_INFO *p );
| ||||||
Description: | The function obtains information about the status of a MetaDOS
device. The following applies:
Note: The position data within the structure are coded in BCD MSF format. The element index is not set by old BOS drivers, and the element disctype is not set by SCSI CD-ROMs. | ||||||
Return value: | The function returns a value of the type int32_t.
| ||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||
Group: | Drive functions
| ||||||
See also: | Binding Metastatus
|
C: | int32_t Metadiscinfo( int16_t drive, CD_DISC_INFO *p );
|
Assembler: |
pea p ; Offset 4 move.w drive,-(sp) ; Offset 2 move.w #63,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #8,sp ; Correct stack |
Name: | »Metagettoc« - Return the table of contents of a device.
| ||||||||
Opcode: | 62
| ||||||||
Syntax: | int32_t Metagettoc( int16_t drive, int16_t flag, CD_TOC_ENTRY
*buffer );
| ||||||||
Description: | The function returns the table of contents of a drive. The
following applies:
Note: The receiving buffer should have room for 128 entries. Each entry consists of a track number and an MSF address (both in BCD format). For the track number the following applies: 0 = Record has no meaning 0x01...0x99 = Track number in BCD coding 0xa0 = First track with programmed order 0xa2 = End of the CD. | ||||||||
Return value: | The function returns a value of the type int32_t.
| ||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||
Group: | Drive functions
| ||||||||
See also: | Binding Metaread Metawrite
|
C: | int32_t Metagettoc( int16_t drive, int16_t flag, CD_TOC_ENTRY
*buffer );
|
Assembler: |
pea buffer ; Offset 6 move.w flag,-(sp) ; Offset 4 move.w drive,-(sp) ; Offset 2 move.w #62,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $A(sp),sp ; Correct stack |
Name: | »Metainit« - Obtain information about the installed MetaDOS
version.
|
Opcode: | 48
|
Syntax: | void Metainit( META_INFO_1 *buffer );
|
Description: | The XBIOS routine Metainit obtains information about the
currently installed version of MetaDOS, and the devices known to it.
The following procedure is suggested:
|
Return value: | The function returns no direct result.
|
Availability: | This function is only available when MetaDOS has been installed.
|
Group: | Drive functions
|
See also: | Binding
|
C: | void Metainit( META_INFO_1 *buffer );
|
Assembler: |
pea buffer ; Offset 2 move.w #48,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #6,sp ; Correct stack |
Name: | »Metaioctl« - Send GEMDOS opcodes to a MetaDOS device.
| ||||||||||
Opcode: | 55
| ||||||||||
Syntax: | int32_t Metaioctl( int16_t drive, int32_t magic, int16_t
opcode, void *buffer );
| ||||||||||
Description: | The function permits opcodes of the GEMDOS routines Dcntl or
Fcntl to be sent to a MetaDOS device. The following apply:
Note: The list of CD-ROM commands is an itemization of all known opcodes that may occur when working with CD-ROMs. | ||||||||||
Return value: | The function returns the following values in case of error:
| ||||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||||
Group: | Drive functions
| ||||||||||
See also: | Binding Dcntl Fcntl
|
C: | int32_t Metaioctl( int16_t drive, int32_t magic, int16_t
opcode, void *buffer );
|
Assembler: |
pea buffer ; Offset 10 move.w opcode,-(sp) ; Offset 8 move.l magic,-(sp) ; Offset 4 move.w drive,-(sp) ; Offset 2 move.w #55,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $E(sp),sp ; Correct stack |
Name: | »Metaopen« - Initialize a MetaDOS device.
| ||||||||
Opcode: | 49
| ||||||||
Syntax: | int32_t Metaopen( int16_t drive, META_DRVINFO *buffer );
| ||||||||
Description: | The function initializes a MetaDOS device. The following
applies:
Note: If the driver name starts with 'CD', one may assume that this is a CD-ROM driver. | ||||||||
Return value: | The function returns the value 0 if all was OK, or a negative
error number.
| ||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||
Group: | Drive functions
| ||||||||
See also: | Binding Metaclose
|
C: | int32_t Metaopen( int16_t drive, META_DRVINFO *buffer );
|
Assembler: |
pea buffer ; Offset 4 move.w drive,-(sp) ; Offset 2 move.w #49,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #8,sp ; Correct stack |
Name: | »Metaread« - Read data from a MetaDOS device.
| ||||||||||||
Opcode: | 51
| ||||||||||||
Syntax: | int32_t Metaread( int16_t drive, void *buffer, int32_t blockno,
int16_t count );
| ||||||||||||
Description: | The function reads data from a MetaDOS device. The following
apply:
Note: The block size for CD-ROMs is 2048 bytes; but unfortunately this can not be obtained in each case. Due to a limitation in Atari's BOS drivers, a maximum of 63 blocks can be read at a time. | ||||||||||||
Return value: | The function returns a value of the type int32_t.
| ||||||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||||||
Group: | Drive functions
| ||||||||||||
See also: | Binding Metawrite
|
C: | int32_t Metaread( int16_t drive, void *buffer, int32_t blockno,
int16_t count );
|
Assembler: |
move.w count,-(sp) ; Offset 10 move.l blockno,-(sp) ; Offset 8 pea buffer ; Offset 4 move.w drive,-(sp) ; Offset 2 move.w #51,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $E(sp),sp ; Correct stack |
Name: | »Metaseek« - Seeks to a physical address.
| ||||||||
Opcode: | 53
| ||||||||
Syntax: | int32_t Metaseek( int16_t drive, int32_t blockno );
| ||||||||
Description: | The function will seek the physical unit to a physical address.
The function call will return once the seek has been completed or on
an error condition. The following apply:
| ||||||||
Return value: | The function returns a value of the type int32_t.
| ||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||
Group: | Drive functions
| ||||||||
See also: | Binding Metaread Metawrite
|
C: | int32_t Metaseek( int16_t drive, int32_t blockno );
|
Assembler: |
move.l blockno,-(sp) ; Offset 4 move.w drive ; Offset 2 move.w #53,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #8,sp ; Correct stack |
Name: | »Metasetsongtime« - Start audio playback of a timed portion
of the track.
| ||||||||||||||||||
Opcode: | 61
| ||||||||||||||||||
Syntax: | int32_t Metasetsongtime( int16_t drive, int16_t repeat, int32_t
starttime, int32_t endtime );
| ||||||||||||||||||
Description: | The function starts audio playback of a specified timed portion
of an audio track. The following apply:
Note: The repeat mode appears to be supported only by CDARGEN.BOS and also only for the Atari CDAR504 drive. | ||||||||||||||||||
Return value: | The function returns a value of the type int32_t.
| ||||||||||||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||||||||||||
Group: | Drive functions
| ||||||||||||||||||
See also: | Binding Metastartaudio Metastopaudio
|
C: | int32_t Metasetsongtime( int16_t drive, int16_t repeat, int32_t
starttime, int32_t endtime );
|
Assembler: |
move.l endtime,-(sp) ; Offset 10 move.l starttime,-(sp) ; Offset 6 move.w repeat ; Offset 4 move.w drive ; Offset 2 move.w #61,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $E(sp),sp ; Correct stack |
Name: | »Metastartaudio« - Start audio playback of one or more songs.
| ||||||||||
Opcode: | 59
| ||||||||||
Syntax: | int32_t Metastartaudio( int16_t drive, int16_t flag, uint8_t
*bytearray);
| ||||||||||
Description: | The function starts audio playback of a specified song or
songs. The following apply:
Note: On SCSI devices only one mode exists (flag = 0). In that case one passes in bytearray[0] the number of songs to be played, and in bytearray[1] the number of the first song. | ||||||||||
Return value: | The function returns a value of the type int32_t.
| ||||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||||
Group: | Drive functions
| ||||||||||
See also: | Binding Metasetsongtime Metastopaudio
|
C: | int32_t Metastartaudio( int16_t drive, int16_t flag, uint8_t
*bytearray);
|
Assembler: |
pea bytearray ; Offset 6 move.w flag,-(sp) ; Offset 4 move.w drive,-(sp) ; Offset 2 move.w #59,-(sp) ; Offset 0 trap #14 ; Drive functions lea $A(sp),sp ; Call XBIOS |
Name: | »Metastatus« - Obtain the status of a MetaDOS device.
| ||||||||||||||||||
Opcode: | 54
| ||||||||||||||||||
Syntax: | int32_t Metastatus( int16_t drive, void *buffer );
| ||||||||||||||||||
Description: | The function obtains the status of a MetaDOS device. The
following apply:
| ||||||||||||||||||
Return value: | The function returns a 32-bit value, which is coded as follows:
codiert ist:
All other bits of the low word are reserved at present. | ||||||||||||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||||||||||||
Group: | Drive functions
| ||||||||||||||||||
See also: | Binding Metadiscinfo
|
C: | int32_t Metastatus( int16_t drive, void *buffer );
|
Assembler: |
pea buffer ; Offset 4 move.w drive,-(sp) ; Offset 2 move.w #54,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #8,sp ; Correct stack |
Name: | »Metastopaudio« - Stop audio playback.
|
Opcode: | 60
|
Syntax: | int32_t Metastopaudio( int16_t drive );
|
Description: | The function stops audio playback for the drive drive.
|
Return value: | The function returns a value of the type int32_t.
|
Availability: | This function is only available when MetaDOS has been installed.
|
Group: | Drive functions
|
See also: | Binding Metastartaudio Metasetsongtime
|
C: | int32_t Metastopaudio( int16_t drive );
|
Assembler: |
move.w drive,-(sp) ; Offset 2 move.w #60,-(sp) ; Offset 0 trap #14 ; Call XBIOS addq.l #4,sp ; Correct stack |
Name: | »Metawrite« - Write data to a MetaDOS device.
| ||||||||||||
Opcode: | 52
| ||||||||||||
Syntax: | int32_t Metawrite( int16_t drive, void *buffer, int32_t
blockno, int16_t count );
| ||||||||||||
Description: | The function writes data to a MetaDOS device. The following
apply:
Note: With a CD-ROM this function naturally has no effect. | ||||||||||||
Return value: | The function returns a value of the type int32_t.
| ||||||||||||
Availability: | This function is only available when MetaDOS has been installed.
| ||||||||||||
Group: | Drive functions
| ||||||||||||
See also: | Binding Metaread
|
C: | int32_t Metawrite( int16_t drive, void *buffer, int32_t
blockno, int16_t count );
|
Assembler: |
move.w count,-(sp) ; Offset 10 move.l blockno,-(sp) ; Offset 8 pea buffer ; Offset 4 move.w drive,-(sp) ; Offset 2 move.w #52,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $E(sp),sp ; Correct stack |
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:
Finally, the parameter execflag determines whether the information in the boot-sector can be executed as a program. The following apply:
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
|
C: | #include <tos.h>
void Protobt( void *buf, int32_t serialno, int16_t disktype, int16_t execflag ); |
Assembler: |
move.w execflag,-(sp) ; Offset 12 move.w disktype,-(sp) ; Offset 10 move.l serialno,-(sp) ; Offset 6 pea buf ; Offset 2 move.w #18,-(sp) ; Offset 0 trap #14 ; Call XBIOS lea $E(sp),sp ; Correct stack |
GFA-Basic | Fehler%=Xbios(18,L:buf%,L:serialno%,W:disktype%,W:execflag%)
|