some questions and thoughts..
Posted: Tue Jan 27, 2004 12:00 am
Hello, i am about to start writing my OS, completly in ASM. So that you know:
I have alredy done a bootsector-show-message-reboot thing..
After that i did a bootsector that is FAT compatible and loaded osdata.bin from the disk. The osdata.bin file was in realmode and i never got the interrupts/or FS commands (like "dir") working. But it had a simple command-line with command like: about, version, help and reboot
So at this point i feel like i am ready to move on to protected mode and go serious. I have read all the faqs/tutorials that i could get my hands on, but i still have plenty of questions (if u got any, please send links..):
1. I wish that i could use the BIOS interrupts! I heard of something called "unreal-mode" that is like real mode with BIOS int´s enabled but with up to 4gb availible memory. Is this "unreal-mode" something i should consider?
Or does it suck completly? Can someone explain in simple english why the BIOS interrupts don´t work i pmode?
2. If the "unreal" mode sucks, and i still want the BIOS int´s, can i "re-make" them? Is there any free sourcecode (asm) out there that does that?
3. Can i set the A20-gate and protected mode somewhere else then in the bootsector code? Like setting pmode and A20-gate in some kernel-loader or something? This would be a realese, becasue it´s hard fitting it all in 512 bytes.
4. How should i organize everything? It´s pretty obious that the bootsector code come first, but then? Should i have the bootsector to load a kernel loader first, and if so, why? Should the kernel have a build in shell or should it be stand alone (like shell.bin), so you can replace it to be a completly gui-system if you want to? It sure keeps the kernel size down.. What would be the first things to write code for in the kernel (witch order)? Memory handling code first and then things like int´s or what?
Please discribe in witch order you should write things (and where to get info on how to do it).
5. If i find a way of getting (at least) the most common BIOS int services back and emulating some of the DOS interrupts, is it possible to run a DOS real mode program then? Does the realmode program need to have memory below the 1mb border? Can i trick programs to think that they got memory below the 1mb? Like the windows "dos-box"? How do they do it?
6. How should i organize the memory? If it is not possible to trick real-mode programs i should keep space for them below the 1 mb, or? Where should i place things? Like the kernel.. And the FAT table.. And, and..
7. I rippted the FAT code from some free bootsector code that place some FAT-info at some position i memory (i think..
), how do i use the "fat-info" to do commands like dir, cd, etc..
8. Can i "tweak" FAT to allow at least a few more character in the filenames (maybe not 255 but..
), like 20 or something? If i remember it right, the w95 (VFAT?) uses extra memory to store the long filname, but still have the 8.3 filename in the orginal fat info. It would be cool to skip this "extra-thing" they did and just "tweak" the orginal FAT to allow just a few more characters (of course as many as possible). Some info, on this?
9. Or should i just skip the FAT-**** (hehe, fat ****..
) and go for another (better) FS?
10. Doing your own interrupts in pmode, how? Even better, make them exchangable, how? (i am thinking of making it possible to have diffrent compability modes that change the int´s to for example DOS-compability..)
11. May need to be repeated, witch order should i make it in? Like:
1. bootsector code (enter pmode and set A20?)
2. ???kernel loader??? (or could i do it here?)
3. kernel
3.1 FS things?
3.2 memory things?
3.3 int´s?
3.4 drivers?
3.5 other thing that i forgot?
4. shell?
Or should it be in a diffrent order????
12. Witch this are absolutly necusary (please forgive my spelling!) to do in the bootsector code?
10. Other things that i should think about? Please inform me..! Please send links, thoughts and stupid comment calling me a n00b...
And last of all, thank you very, very much for getting the time reding all this bull****...
/ Christoffer
I have alredy done a bootsector-show-message-reboot thing..
After that i did a bootsector that is FAT compatible and loaded osdata.bin from the disk. The osdata.bin file was in realmode and i never got the interrupts/or FS commands (like "dir") working. But it had a simple command-line with command like: about, version, help and reboot
So at this point i feel like i am ready to move on to protected mode and go serious. I have read all the faqs/tutorials that i could get my hands on, but i still have plenty of questions (if u got any, please send links..):
1. I wish that i could use the BIOS interrupts! I heard of something called "unreal-mode" that is like real mode with BIOS int´s enabled but with up to 4gb availible memory. Is this "unreal-mode" something i should consider?
Or does it suck completly? Can someone explain in simple english why the BIOS interrupts don´t work i pmode?
2. If the "unreal" mode sucks, and i still want the BIOS int´s, can i "re-make" them? Is there any free sourcecode (asm) out there that does that?
3. Can i set the A20-gate and protected mode somewhere else then in the bootsector code? Like setting pmode and A20-gate in some kernel-loader or something? This would be a realese, becasue it´s hard fitting it all in 512 bytes.
4. How should i organize everything? It´s pretty obious that the bootsector code come first, but then? Should i have the bootsector to load a kernel loader first, and if so, why? Should the kernel have a build in shell or should it be stand alone (like shell.bin), so you can replace it to be a completly gui-system if you want to? It sure keeps the kernel size down.. What would be the first things to write code for in the kernel (witch order)? Memory handling code first and then things like int´s or what?
Please discribe in witch order you should write things (and where to get info on how to do it).
5. If i find a way of getting (at least) the most common BIOS int services back and emulating some of the DOS interrupts, is it possible to run a DOS real mode program then? Does the realmode program need to have memory below the 1mb border? Can i trick programs to think that they got memory below the 1mb? Like the windows "dos-box"? How do they do it?
6. How should i organize the memory? If it is not possible to trick real-mode programs i should keep space for them below the 1 mb, or? Where should i place things? Like the kernel.. And the FAT table.. And, and..
7. I rippted the FAT code from some free bootsector code that place some FAT-info at some position i memory (i think..
8. Can i "tweak" FAT to allow at least a few more character in the filenames (maybe not 255 but..
9. Or should i just skip the FAT-**** (hehe, fat ****..
10. Doing your own interrupts in pmode, how? Even better, make them exchangable, how? (i am thinking of making it possible to have diffrent compability modes that change the int´s to for example DOS-compability..)
11. May need to be repeated, witch order should i make it in? Like:
1. bootsector code (enter pmode and set A20?)
2. ???kernel loader??? (or could i do it here?)
3. kernel
3.1 FS things?
3.2 memory things?
3.3 int´s?
3.4 drivers?
3.5 other thing that i forgot?
4. shell?
Or should it be in a diffrent order????
12. Witch this are absolutly necusary (please forgive my spelling!) to do in the bootsector code?
10. Other things that i should think about? Please inform me..! Please send links, thoughts and stupid comment calling me a n00b...
And last of all, thank you very, very much for getting the time reding all this bull****...
/ Christoffer