gaf
User
 Platinum Osdever
| Posts: 153 |  | Karma: 10
|
Re: Fat - 2005/10/08 09:32
Hello, I had a look at BootProg and unless I'm totally mistaken it doesn't load all the files on the disk to memory but only one whose name has to be specified using the REN_PROG utility (startup.bin is just the default name). This means that you would first have to extend the bootsector by adding a loop to it to support multiple files.
I only had a peek at the code, but here's how I'd try to solve the problem:[list]Create a table of image load addresses and program names that can be accessed by the loop. This means that you have to replace 'ImageLoadSeg equ 60h' at the top of boot12.asm by a 'ImageLoadSeg? dw 0x??' for each file you want to load and add the files name's at the bottom as 'ProgramName? db "??? BIN"'.[/list][list]The loop has to start after 'Look for a COM/EXE program to be load and run' and ends right before the 'Run' label.[/list][list]Every reference to 'ProgrammName?' or 'ImageLoadSeg?' has to be fixed and the loop must be iterated once for every file that shall be loaded.[/list][list]After loading all the files specified in your table the code will jump to the last one loaded, which of course has to be your kernel. [/list] In order to jump to one of the images you have to set up segment registers and stack first. I don't know how .COM files exactly store this information but I'm sure that you can find out by having a look at 'RelocateEXE' and 'Run'.
In case that this all seems like too much work or if you don't know assembler well enought, you might consider using GRUB as a bootloader instead..
regards, gaf
|