Atari ST series Technical Reference Manual page 31

Hide thumbs Also See for ST series:
Table of Contents

Advertisement

changed. Its name is Mediach(), and its C macro call uses
the following syntax:
int drivenum;
long status;
status = Mediach(drivenum);
where once again the drivenum parameter specifies the disk
drive to check (0 = drive A:, 1 = drive B:, and so on). The
status returned by this call can be one of three values. A zero
value means the media definitely has not changed, while a
value of 2 means that it definitely has not changed. A status
value of 1 means that the media might have changed, but
the BIOS can't give a more definite answer until a read oper­
ation is performed.
System Functions
The last three BIOS functions are miscellaneous system calls.
The first, Getmpb() (Get Memory Parameter Block), is used
by GEMDOS to initialize the memory management system.
The format for this call is
long mpbptr;
Getmpb(mpbptr);
where mpbptr is a pointer to the starting address of a Mem­
ory Parameter Block. The definition for this data structure is
as follows:
struct mpb
{
struct md *mp__mfl;
struct md *mp__mal;
struct md *mp__rover;
}
As you can see, this structure consists of three pointers
to other data structures, called memory descriptor structures.
These contain information about blocks of memory, primarily
the starting address of the memory block and its size:
struct
md
{
struct md
*m__ link;
long
m__ start;
BIOS
/* ptr to memory free list */
/* memory allocated list /*
I* roving pointer */
I* pointer to next MD [NULL]
/* start addr of mem block */
23

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents