BIOS LBA function

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
teodori
Member
Member
Posts: 103
Joined: Wed Nov 14, 2012 4:55 pm

BIOS LBA function

Post by teodori »

Hello, for my bootloader I use the BIOS LBA read function and I want to know how many sector it can read? Is there a standard limit? It is defined with 2 bytes, so theoreticly I can load 0xffff (65535) sectors.
madanra
Member
Member
Posts: 149
Joined: Mon Sep 07, 2009 12:01 pm

Re: BIOS LBA function

Post by madanra »

On the wiki, it mentions some BIOSes have a limit of 127 sectors = 63.5KB. Ralph Brown's interrupt list mentions the same limit.
M2004
Member
Member
Posts: 65
Joined: Sun Mar 07, 2010 2:12 am

Re: BIOS LBA function

Post by M2004 »

Another limiting factor is that your destination buffer should not cross 64kb memory
boundary.

Regards
M2004
teodori
Member
Member
Posts: 103
Joined: Wed Nov 14, 2012 4:55 pm

Re: BIOS LBA function

Post by teodori »

Ok thank you :)
User avatar
DavidCooper
Member
Member
Posts: 1150
Joined: Wed Oct 27, 2010 4:53 pm
Location: Scotland

Re: BIOS LBA function

Post by DavidCooper »

[If you ever need to write to disk using the BIOS and LBA, don't assume that it will be 127 sectors too. The machine I program on has a BIOS that can only handle 64 sectors when writing data, though 127 when reading.]
Help the people of Laos by liking - https://www.facebook.com/TheSBInitiative/?ref=py_c

MSB-OS: http://www.magicschoolbook.com/computing/os-project - direct machine code programming
Post Reply