floppy driver fails when made better

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.
Post Reply
GLneo
Member
Member
Posts: 237
Joined: Wed Dec 20, 2006 7:56 pm

floppy driver fails when made better

Post by GLneo »

hi all, ok, i have made improvements on my floppy disk driver and now it doesn't work, the old version works and the new doesn't, I'm using all the same inportb's outportb's but it doesn't work, it may be a logic problem some were or just my OS is unstable...

any comments, questions, suggestions welcome!

thx!

p.s. what kinds of things would make an OS so unstable printing some things crash the system and mallocing more than 4 times during boot does too, etc...
Attachments
floppy.c
old driver
(5.44 KiB) Downloaded 43 times
floppy.c
new driver
(8.61 KiB) Downloaded 64 times
turtling
Posts: 8
Joined: Sun Mar 11, 2007 2:01 pm

Post by turtling »

Im not an expert, so my advice is worth for what it's worth.
If printing something on screen crashes your system, probably it's a problem with your stack segment. I don't know if it's possible, probably you can make stack selector? So you can discover if it's tresspassed? I read something about that in the intel manuals, or it was about paging, you make some page for the stack, and when it overflow there's a GP exception that you catch and you make a new page and everything goes as usual.
Also, Are you sure about using 0x0000000? You didn't store your idtr there by chance?
As for your floppy driver, you're more advanced than me. I didn't touch the paging yet, so no memory allocation yet for my kernel.
Post Reply