User:Johnburger/Demo/BIOS/Disk
< User:Johnburger | Demo
Jump to navigation
Jump to search
Accessing various types of disk drives - floppies, IDE, SATA, SCSI, and even USB - takes a lot of code. Luckily the BIOS hides that from us, and lets the 512-byte boot sector do it in a handful of instructions.
Here are the definitions to access all of these different kinds of disks.
Demo/BIOS/Disk.inc
;
; BIOS/Disk.inc
;
; These are the definitions for the BIOS Disk controller
BIOS.Disk.Sector.Size EQU 512
BIOS.Disk.Int EQU 13h
BIOS.Disk.Fn.Reset EQU 00h
BIOS.Disk.Fn.Read EQU 02h