typedef struct
{
WORD recsiz; /* Bytes per sector */
WORD clsiz; /* Sectors per cluster */
WORD clsizb; /* Bytes per cluster */
WORD rdlen; /* Directory length */
WORD fsiz; /* Length of the FAT in sectors */
WORD fatrec; /* Start of the 2nd FAT */
WORD datrec; /* 1st free sector */
WORD numcl; /* Total numbr of clusters */
WORD bflags; /* Flags as bit-vector */
/* Bit 0: 0 (12-Bit-FAT), 1 16-Bit-FAT */
/* Bit 1: 0 (two FATs), 1 (one FAT) */
/* only available since TOS 2.06 */
} BPB ;
See also: Getbpb
typedef struct
{
MD *m_link; /* Next MD (or NULL) */
long m_start; /* saddr of block */
long m_length; /* # bytes in block */
PD *m_own; /* Owner's process descriptor */
} MD;
typedef struct
{
MD *mp_mfl; /* Memory free list */
MD *mp_mal; /* Memory allocated list */
MD *mp_rover; /* Roving ptr */
} MPB;
struct patternrectdata
{
int16_t x1, y1;
int16_t x2, y2;
int32_t fg_color;
int32_t bg_color;
int16_t mode;
int32_t *pattern;
int32_t *patternmask;
}
See also: _VDI
typedef struct
{
WORD puns; /* Number of devices */
BYTE pun[16]; /* Various flags */
LONG part_start[16]; /* Partition starts */
LONG P_cookie; /* Must be "AHDI" */
LONG *P_cookptr; /* Points to the previous element */
UWORD P_version; /* Version number (>= 0x0300) */
UWORD P_max_sector; /* Maximum sector size */
LONG reserved[16]; /* Reserved */
} PUN_INFO;
| puns | Contains the number of hard drives found by the hard disk
driver. With two dummy entries (0xFF) for drive A and B.
| ||||||||||||
| pun |
| ||||||||||||
| part_start | Contains for each (supported) device number the number of the
start sector on the corresponding hard drive. Again two dummy entries
(0L) for drive A and B.
| ||||||||||||
| P_cookie | Magic value; always "AHDI"
| ||||||||||||
| P_cookptr | Should always point to the previous structure element.
| ||||||||||||
| P_version | Version number e.g. 0x0300
| ||||||||||||
| P_max_sector | Describes the largest occurring block size for BIOS sectors.
|
Example of how one obtains the address of the structure:
PUN_INFO *GetPunPtr (void)
{
PUN_INFO *P;
int32_t oldstack;
oldstack = Super (0L);
P = *((PUN_INFO **)(0x516L));
Super ((void *)oldstack);
if (P)
if (P->P_cookptr == &(P->P_cookie)) /* Cookie ok? */
if (P->P_version >= 0x300)
return P;
return 0L;
}
See also: XHDI specification pun_ptr
struct solidrectdata
{
int16_t x1, y1;
int16_t x2, y2;
int32_t fg_color;
int32_t bg_color;
int16_t mode;
}
See also: _VDI