Page 3 of 3
Re:FAT12...
Posted: Fri Feb 27, 2004 11:51 am
by Neo
the 'mem_map' variable has to be at the end of your code after the text section etc.. this is so because you cant know how many fields it is going to return (maybe 3 or maybe more) so what i've done is placed this var at the end so that it does not overwrite any part of the code or data that i need.
btw does anyone know any other way to do this?
<edit>
the code u attached looks like your primary?
u can use the new primary i uploaded because it does not need that previous hack with the temp var and also because it will be easier to understand later.
</edit>
Re:FAT12...
Posted: Sat Feb 28, 2004 6:46 am
by bubach
Ok, i have my print_string function right after that var...
Maybe thats why it wouldn?t print anything.. ;-P
Thanks for all the help! Now i am off for some kernel coding..
/ Christoffer
Re:FAT12...
Posted: Sat Feb 28, 2004 12:37 pm
by Neo
The actual difference between my newly modified version and the earlier one is that the new one (apart from also being able to run independent of where it is loaded by the BIOS) saves up space by eliminating that 'hack' added to relocate the FAT, RootDir etc at the proper addresses required by the secondary.
Of course my earlier version could do this but it needed the 'hack' to relocate the FAT and RootDir as they were originally loaded to addresses with segment 0x7c00 and only then copied to addresses with segment 0x0. HTH.
btw bubach i hope your going through the entire code first before adding any. Please read and understand the whole sequence before incorporating any of the code. I did try to write each function as independent as possible so that it could be reused anywhere but there may be some screw-ups.
C & CW
Re:FAT12...
Posted: Sat Feb 28, 2004 3:34 pm
by bubach
mm.. i looked throw the new code and i have "updated" it.
finally i can fit in a decent error message!
All code is working fine except my "example" kernel, that just starts and print a char before it hangs..
i got a triple fault when it jmp?s to the kernel..
some gdt ****?
/ Christoffer
Re:FAT12...
Posted: Sun Feb 29, 2004 2:38 am
by Neo
Best of luck and keep us posted if you need any help.
Re:FAT12...
Posted: Sun Feb 29, 2004 4:00 pm
by Adek336
This keeps me curious.. what does HTH mean?
Re:FAT12...
Posted: Sun Feb 29, 2004 7:18 pm
by Neo
Hope That Helps. HTH
Re:FAT12...
Posted: Wed Mar 03, 2004 3:05 am
by bubach
neo: i see that the only thing you pass to your kernel is the mem_map, what about the sectors and cylinder stuff passed from the bootsector code to the 2:th stage loader?
Shouldn?t the kernel know that?
/ Christoffer
Re:FAT12...
Posted: Wed Mar 03, 2004 8:22 am
by Neo
yeah the kernel does need a lot of other info regarding the other disk drives etc. My bootloader as you may have guessed is still not complete, to date i use only the mem_map so its been good so far (i will try adding this support later this year when i can), but feel free to add the code for the rest of the info if you need it and just let me know how its going.
i have a file with a list of things that a bootloader should/could do. i cant remember from where i got it but i think it will help.
[attachment deleted by admin]
Re:FAT12...
Posted: Fri Mar 05, 2004 1:40 am
by bubach
ok, i was just woundering....
/ Christoffer
Re:FAT12...
Posted: Fri Mar 05, 2004 9:00 am
by namialus
this reference table might help you
[attachment deleted by admin]
Re:FAT12...
Posted: Wed Mar 10, 2004 4:03 am
by bubach
Ok, thanks..
/ Christoffer