•  Back 
  •  BIOS Function Reference 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  %About 
  •  Show info about hypertext 
  •  View a new file 
Topic       : The ATARI Compendium
Author      : Scott Sanders / JAY Software
Version     : 1.25 (20/6/2003)
Subject     : Documentation
Nodes       : 1117
Index Size  : 32614
HCP-Version : 6
Compiled on : Atari
@charset    : UTF-8
@lang       : en
@default    : 
@help       : %About
@options    : +g -i -t4 +y +z
@width      : 100
View Ref-FileGetbpb()                                                               BIOS

Syntax

BPB *Getbpb( dev )
WORD dev;

Function      Getbpb() returns the address of the current BPB (Bios
              Parameter Block) for a mounted device.

Opcode        7 (0x07)

Availability  All TOS versions.

Parameters    dev specifies the mounted device ('A:' = 0, 'B:' = 1) .

Binding       move.w   dev,-(sp)
              move.w   #$07,-(sp)
              trap     #13
              addq.l   #4,sp

Return Value  Getbpb() returns a pointer to the device's BPB. The BPB is
              defined as follows:

              typedef struct
              {
               WORD recsiz; /* bytes per sector */
               WORD clsiz; /* sectors per cluster */
               WORD clsizb; /* bytes per cluster */
               WORD rdlen; /* sector length of root directory */
               WORD fsiz;  /* sectors per FAT */
               WORD fatrec; /* starting sector of second FAT */
               WORD datrec; /* starting sector of data */
               WORD numcl; /* clusters per disk */
               WORD bflags; /* bit 0=1 - 16 bit FAT, else 12 bit */
              } BPB;

Caveats       A media change must be forced after calling this function
              prior to making any GEMDOS calls. Failure to do so may cause
              GEMDOS to become unaware of a disk change causing data loss.
              Refer to the discussion of forcing a media change earlier in
              this chapter.