Bootloader: Reading sectors from a floppy
Bootloader: Reading sectors from a floppy
Anybody know where I can get some information on how to do this?
Re:Bootloader: Reading sectors from a floppy
After searching through a bit of code I've found:
Code: Select all
mov ax, 1000h ; ES:BX = 1000:0000
mov es, ax ;
mov bx, 0 ;
mov ah, 2 ; Load disk data to ES:BX
mov al, 5 ; Load 5 sectors
mov ch, 0 ; Cylinder=0
mov cl, 2 ; Sector=2
mov dh, 0 ; Head=0
mov dl, 0 ; Drive=0
int 13h ; Read!
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Bootloader: Reading sectors from a floppy
yep. that's the most basic way, featuring the good old INT13 from the BIOS. See RalfBrown's interrupt list (RBIL) for details. It will only work in real/unreal mode though ...
Re:Bootloader: Reading sectors from a floppy
Check out some existing bootloaders such as mine here
The 'read' & 'trans_address' function are the ones which would interest you the most. I think they are rather well commented so should be easy to understand (hopefully )
The 'read' & 'trans_address' function are the ones which would interest you the most. I think they are rather well commented so should be easy to understand (hopefully )
Only Human
Re:Bootloader: Reading sectors from a floppy
Thanks for your replies. I'll make sure to check your bootloader out, Neo.