Page 1 of 1

Load Kernel intro Memory

Posted: Tue Feb 08, 2011 10:55 am
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?

Re: Load Kernel intro Memory

Posted: Tue Feb 08, 2011 12:43 pm
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.