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.
I'm not the type to start working for you like that. You can however take parts of my code:
my floppy driver:
I dont have a working floppy driver. However, you can use grub, your own bootloader and the like to load a FAT formatted ramdisk. I consider floppies too troublesome to make half your system dependent on it...
My FAT driver
I have a 2-stage FAT-based bootloader (public domain). I apparently didnt bother to comment it as properly as most of my code so you'll have to figure out yourself what everything's good for. ATM it boots /stage3.bin, and loads /stage4.bin and /*.mos into a ramdisk, then jumps to the kernel at 0x80000. (Stage 1, Stage 2)
and i need to change my compile script, so instead of makeboot it puts my kernel on a FAT floppy disk image.
I have a makefile which does that for me (by typing make install)
browse my source tree and take what you want. I hope something there helps you with your quest.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
GRUB is a pretty good bootloader and handles FAT among several other filesystems just fine. Floppies, harddrives, network boot... anything will do. Gets you to protected mode as well for free.
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.
well i figured out how to make a FAT image with my kernel, now i need to modify my bootsector to read kernel.sys from the image, and no GRUB, why write your own bootsecter when theres GRUB - why right your own OS when theres Linux? i like to learn, sorry for saying it so plainly it's just every one tells me to use GRUB
GLneo wrote:well i figured out how to make a FAT image with my kernel, now i need to modify my bootsector to read kernel.sys from the image, and no GRUB, why write your own bootsecter when theres GRUB - why right your own OS when theres Linux? i like to learn, sorry for saying it so plainly it's just every one tells me to use GRUB
People are recommending GRUB because it sorta suits you..
As for:
GLneo wrote:i like to learn, sorry for saying it so plainly it's just every one tells me to use GRUB
You just contradicted yourself.. You just asked people to write code for you..
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
O i just saw that well i was hoping people would find my bugs and show them to me, not write my OS, but i do want to write my OS so mabey just tutorials on FAT bootsecters
It loads from FAT to 1mb, sets up pmode and even paging before jumping. if you throw out the page code, you should get some free bytes for error handling or clean-ups.
i also think you should get the floppy driver working with only one 1.44 mb fdd before expanding it.