Tvùrce webu je i pro tebe! Postav tøeba web. Bez grafika. Bez kodéra. Hned.
wz

<< Back

cesky: , English:

BIOSDISK

Physical disk BIOS

Physical disk BIOS is:

Floppy disks support only typical formats, e.g. only diskette with a capacity of 1.44 MB MB is supported in 1.44 MB drive. Hard drives can be controlled via the LBA interface. It is treated well to boot disk, therefore system partition can reside anywhere on the disk.


BDiskGetNum - get number of BIOS disks

OUTPUT:
AL = number of disks
CL = number of floppy disks
CH = number of hard disks


BDiskGetDesc - get BIOS disk descriptor

INPUT:
AL = disk number (0...)

OUTPUT:
BX = pointer to
BDD descriptor (or NULL on CY error)
CY = error, invalid disk number (returns BX = NULL)


BDiskGetDescBIOS - get BIOS disk descriptor by BIOS disk number

INPUT:
AL = BIOS disk number (0=fd1, ... 80h=hd1, ... 0C0h=rd1, ...)

OUTPUT:
BX = pointer to
BDD descriptor (or NULL on CY error)
CY = error, invalid disk number (returns BX = NULL)


BDiskGetType - get BIOS disk type TEXT

INPUT:
BX = pointer to
BDD descriptor

OUTPUT:
SI = pointer to
CTEXT disk type name


BDiskGetInfo - get BIOS disk info TEXT

INPUT:
AL = disk number (0...)

OUTPUT:
BX = pointer to
TEXT structure (NULL on memory error)
CY = disk or memory error (BX = NULL)

NOTES: Returned text should be destroyed using TextFree.


BDiskGetAllInfo - get BIOS all disks info TEXT

OUTPUT:
BX = pointer to
TEXT structure (NULL on memory error)
CY = memory error (BX = NULL)

NOTES: Returned text should be destroyed using TextFree.


LBAToCHS - translate absolute sector to CHS

INPUT:
DX:AX = absolute sector (0...)
BX = pointer to
BDD descriptor

OUTPUT:
CL = bit 0..5: sector number (1..63), bit 6..7: cylinder number HIGH (bits 8..9)
CH = cylinder number LOW (bits 0..7)
DH = head number (0..255); or bit 0..5 head number (0..63), bit 6,7: cylinder bits 10..11

DESTROYS: DL


BDiskRead - read sectors

INPUT:
DX:AX = absolute sector (0..)
BX = pointer to
BDD descriptor
CL = number of sectors (1..127)
DI = data buffer

OUTPUT:
CY = operation error
DX:AX = new sector
DI = new data buffer


BDiskWrite - write sectors (without verify)
BDiskWriteV - write sectors with verify

INPUT:
DX:AX = absolute sector (0..)
BX = pointer to
BDD descriptor
CL = number of sectors (1..127)
DI = data buffer

OUTPUT:
CY = operation error
DX:AX = new sector
DI = new data buffer


BDiskVerify - verify sectors

INPUT:
DX:AX = absolute sector (0..)
BX = pointer to
BDD descriptor
CL = number of sectors (1..127)

OUTPUT:
CY = operation error
DX:AX = new sector


BDiskReadSect - read cached sector (into sector buffer)

INPUT:
DX:AX = absolute sector (0..)
BX = pointer to
BDD descriptor

OUTPUT:
SI = sector buffer SectBuf
CY = operation error


BDiskWriteSect - write cached sector (from sector buffer)

OUTPUT:
CY = operation error

NOTES: Valid parameters must be set in OldSectBDD and OldSect by function BDiskReadSect.


HDDCheck - check hard disk

INPUT:
BL = hard disk index (0..)

OUTPUT:
CY = invalid hard disk


FDDCheck - check floppy disk

INPUT:
BL = floppy disk index (0..)

OUTPUT:
CY = invalid floppy disk


BDD - BIOS disk descriptor (physical disk)

BDD_Disk: (byte) disk BIOS number (0=fd0,...)
BDD_Flags: (byte) flags and media type (see below), bit 0..3: media type
BDD_SectTrack: (word) S sectors per track (1..63)
BDD_Heads: (word) H number of heads (1..256)
BDD_Cylinders: (word) C number of cylinders (1..1024)
BDD_SectCyl: (word) sectors per cylinder (1..16128)
BDD_DevName: (word)
CTEXT device name
BDD_SectNum: (dword) total number of sectors

BIOS disk flags and media type:

BDDF_Floppy288: (=0) floppy disk 2.88 MB (3.5")
BDDF_Floppy360: (=1) floppy disk 360 KB (5.25")
BDDF_Floppy12: (=2) floppy disk 1.2 MB (5.25")
BDDF_Floppy720: (=3) floppy disk 720 KB (3.5")
BDDF_Floppy144: (=4) floppy disk 1.44 MB (3.5")
BDDF_FloppyLast: (=BDDF_Floppy144) last floppy disk
BDDF_HardDisk: (=5) hard disk
BDDF_MEMDisk: (=6) memory disk (RAW memory)
BDDF_RAMDisk: (=7) RAM disk (FAT file system)
BDDF_TypeMask: (=0Fh) media type mask
BDDF_UseLBA: (=B6) bit flag, use LBA extension (CHS invalid)
BDDF_Removable: (=B7) bit flag, removable media


Source code BIOSDISK.ASM

<< Back