home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
assemblr
/
library
/
lib4a86
/
doc
/
diskll.doc
< prev
next >
Wrap
Text File
|
1992-02-02
|
7KB
|
148 lines
─────────────────────────────────────────────────────────────────────────────
Dokumentation zur Datei: DISKLL.MAC
─────────────────────────────────────────────────────────────────────────────
DISKLL.MAC - MACROs und Definitionen zur Bearbeitung von Disketten/
Platten auf Lowlevel-Ebene
(für den Assembler A86)
(c) Bernd Schemmer 1990 - 1992
Letzter Update: 02.02.1992
■ Aufbau eines BPB
BIOS_Parameter_Block STRUC [BX]
BPB_Bytes_Per_Sektor dw ? ; Anzahl Byte per Sektor
BPB_Sektor_Per_Cluster db ? ; Anzahl Sektoren per Cluster
BPB_Reserved_Sektors dw ? ; Anzahl reservierter Sektoren
BPB_FATs db ? ; Anzahl FATs
BPB_RootDirEntrys dw ? ; max. Anzahl Einträge im Root-Dir
BPB_MaxSektors dw ? ; max. Anzahl Sektoren
BPB_MediaDeskriptor db ? ; Media-Deskriptor-Byte
BPB_Sektors_per_FAT dw ? ; Anzahl Sektoren/FAT
BPB_Sektors_per_Track dw ? ; Anzahl Sektoren/Spur
BPB_Heads dw ? ; Anzahl der Schreib/Lese-Köpfe
BPB_FirstSectorOffs dd ? ; Offset des ersten Sektors
; (= Anzahl der versteckten Sektoren)
BPB_Unknown db 0Bh dup ?
*** ab DOS 4.0:
BPB_MaxSektors1 dd ? ; Gesamt-Anzahl der Sektoren falls
; BPB_MaxSektors gleich 0 ist
BPB_Unknown1 db 7 dup ?
ENDS
■ Aufbau eines Disk-Boot-Blocks (DOS 3.3)
DiskBootBlock3 STRUC [BX]
DiskBootBL3_JMP db 3 dup ? ; JMP-Kommando
DiskBootBL3_Name db 8 dup ? ; Name des Systems
DiskBootBL3_Bytes_Sector dw ? ; Anzahl Bytes/Sektor
DiskBootBL3_Sector_Cluster db ? ; Anzahl Sektoren/Cluster
; (Zweierpotenz!)
DiskBootBL3_Reserved_Sectors dw ? ; Anzahl reservierter Sektoren
DiskBootBL3_FATS db ? ; Anzahl FATs
DiskBootBL3_RootDirEntrys dw ? ; max. Anzahl Root-Dir-Entrys
DiskBootBL3_MaxSektors dw ? ; max. Anzahl Sektoren
DiskBootBL3_MediaID db ? ; Media-Deskriptor-Byte
DiskBootBL3_Sektors_Fat dw ? ; Anzahl Sektoren/FAT
DiskBootBL3_Sektors_Track dw ? ; Anzahl Sektoren/Spur
DiskBootBL3_Heads dw ? ; Anzahl Schreib/Leseköpfe
DiskBootBL3_HiddenSektors dw ? ; Anzahl versteckter Sektoren
ENDS
■ Aufbau eines Disk-Boot-Blocks (DOS 4.xx)
DiskBootBlock4 STRUC [BX]
DiskBootBL4_JMP db 3 dup ? ; JMP-Kommando
DiskBootBL4_Name db 8 dup ? ; Name des Systems
DiskBootBL4_Bytes_Sector dw ? ; Anzahl Bytes/Sektor
DiskBootBL4_Sector_Cluster db ? ; Anzahl Sektoren/Cluster
; (Zweierpotenz!)
DiskBootBL4_Reserved_Sectors dw ? ; Anzahl reservierter Sektoren
DiskBootBL4_FATS db ? ; Anzahl FATs
DiskBootBL4_RootDirEntrys dw ? ; max. Anzahl Root-Dir-Entrys
DiskBootBL4_MaxSektors dw ? ; max. Anzahl Sektoren
DiskBootBL4_MediaID db ? ; Media-Deskriptor-Byte
DiskBootBL4_Sektors_Fat dw ? ; Anzahl Sektoren/FAT
DiskBootBL4_Sektors_Track dw ? ; Anzahl Sektoren/Spur
DiskBootBL4_Heads dw ? ; Anzahl Schreib/Leseköpfe
DiskBootBL4_HiddenSektors dw ? ; Anzahl versteckter Sektoren
DiskBootBL4_Unknown1 dw ?
DiskBootBL4_MaxSektors1 dd ? ; max. Anzahl Sektoren, falls
; DiskBootBL4_MaxSektors = 0
DiskBootBL4_Physical_Drive db ? ; physikalische LW-Nummer
DiskBootBL4_Unknown2 db ?
DiskBootBL4_ID db ? ; erweiterter Urlader-Kennsatz
DiskBootBL4_IDNumber dd ? ; 32-Bit Seriennummer
DiskBootBL4_Name1 db 0Bh dup ? ; Name des Datenträgers
DiskBootBL4_Unknown3 db 08h dup ?
ENDS
----------------------------
GetDiskBootBlock
Funktion: Ermittelt den Disk-Boot-Block
Aufruf: GetDiskBootBlock
Eingabe: DL = Laufwerk (0 = A, 1 = B, usw.
80h = 1. Festplattte - wird nicht überprüft!)
ES:BX -> Puffer für den BootBlock
Ausgabe: CF = 0 ->> okay
Puffer gefüllt
CF = 1 ->> Fehler
AX = Fehlernummer des Interrupt 13h
GetDiskBootBlock MACRO
mov ax,0201h ; Lese einen Sektor
mov dh,0 ; Kopf 0
mov cx,1 ; Spur 0, Sektor 1
int 13h
#EM
■ Aufbau einer Disk-Partitions-Tabelle
DiskPartitionsTabelle STRUC [BX]
DPT_Status db ? ; Status der Partition (0 oder 080h = bootbar)
DPT_First_Head db ? ; erster Schreib/Lesekopf
DPT_First_Sektor dw ? ; erster Sektor
DPT_PartitionsTyp db ? ; Partitions-Typ
DPT_Last_Head db ? ; letzter Schreib/Lesekopf
DPT_Last_Sektor dw ? ; letzter Sektor
DPT_FirstAbsSek dd ? ; erster absoluter Sektor
DPT_SektorCount dd ? ; Gesamt-Anzahl Sektoren
ENDS
■ Offset des Master-Boot-Programms
MasterBootProgramm EQU 0000h
■ Offsets der einzelnen Partitions-Tabellen:
Partition1 EQU 01BEh
Partition2 EQU 01CEh
Partition3 EQU 01DEh
Partition4 EQU 01EEh
■ Aufbau eines Directory-Eintrages
DirEntry STRUC [BX]
DirEntry_Name db 8 dup ?
DirEntry_Ext db 3 dup ?
DirEntry_Attr db ?
DirEntry_Reserved db 0Ah dup ?
DirEntry_Time dw ?
DirEntry_Date dw ?
DirEntry_Cluster dw ?
DirEntry_Length dd ?
ENDS