Load Kernel intro Memory

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
vision
Posts: 12
Joined: Wed Oct 27, 2010 1:32 pm
Location: Warsaw, Poland

Load Kernel intro Memory

Post by vision »

Hi ^ ^
I have a little problem. The creation of the CD bootloader. I have already written a function that searches for and finds the LBA and the size.
How to use this data to load the kernel into memory?

It can convert LBA to CHS, and then use BIOS int 13/ah = 02h to be loaded into memory?
quok
Member
Member
Posts: 490
Joined: Wed Oct 18, 2006 10:43 pm
Location: Kansas City, KS, USA

Re: Load Kernel intro Memory

Post by quok »

CDs do not use CHS, they use LBA. If you can already parse the directory information to find the starting LBA of the file and the file size, then all you need to do is read the data using BIOS interrupts as you said. However, you must use the EDD functions (INT 13h AH=42h) to correctly read data from the CD. Just keep in mind that the block size on a CD is 2048 bytes and not 512, although it shouldn't be that big of a deal since the BIOS functions handle different block sizes correctly.
Post Reply