EasyManua.ls Logo

Atari ST series - Page 31

Atari ST series
420 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BIOS
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; /* ptr to memory free list */
struct md *mp
__
mal; /* memory allocated list /*
struct md *mp
__
rover; I* roving pointer */
}
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; I* pointer to next MD [NULL]
long m
__
start; /* start addr of mem block */
23

Related product manuals