Page 1 of 1
Question about a couple oddities in my OS
Posted: Thu Jun 29, 2006 6:43 pm
by 512Dev
Hey all.
After a long hiatus, I've finally decided to restart my OS, Metropolis. I want to work out a few bugs in this one release, namely that backspace/delete handiling is odd, and the user can delete the command prompt itself O.o. Also, a random line of garbage is printed after a user halts the system. I'd like help with this as I've been stumped.
http://512net.intec.edu:81/~adefeo/metr ... o2k6R1.rar
is the OS with full source code.
Additionally,
http://512net.intec.edu:81/~adefeo/metr ... etrobe.exe
is the OS prepackaged with Bochs (no source code) for those who wish to test-drive it.
Also, any tutorials on how to implement FAT12 read/write support, or (preferably) how to make your own simple filesystem would be appreciated.
Thanks,
512 (aka Anthony aka 'adefeo' from the BonaFide forums of yesteryear

)
Re:Question about a couple oddities in my OS
Posted: Thu Jun 29, 2006 7:18 pm
by bubach
I don't have the time to look through your code right now but here's how to handle the backspace thing:
1) Have a command buffer and a counter var.
2) Get input, increase counter var if normal keypress, decrease if backspace and counter > 0
3) Print charcter or delete character depending on if it was a backspace or not. If it was backspace and counter == 0, do nothing.
Re:Question about a couple oddities in my OS
Posted: Thu Jun 29, 2006 10:47 pm
by Ryu
I'm going to say something that you need to hear, only to get you on the right track. I'll be a bit blunt so I apologize..
.. Learn to debug your work. I'm not going to go through your entire OS to do the fix for you, it is your work afterall so you should know it better then any of us. It'll help us if you attempt to isolate a single problem at a time and give us the error and relevant information to help you fix and understand the problem. I'd personally don't have all the time in the world, and I
think this goes for a lot of other readers.
Re:Question about a couple oddities in my OS
Posted: Fri Jun 30, 2006 7:03 am
by viral
Also, any tutorials on how to implement FAT12 read/write support, or (preferably) how to make your own simple filesystem would be appreciated.
Well, I havent found any tutorial that teaches you how to code read/write in FAT12. It all depends on your OS structure that how you code all this.. I suggest you to read FAT12 document and get some knowledge about its stucture. You can get the official FAT12 16 documents from microsoft for this purpose.. One found in "document" section of
http://www.osdever.net can also help..
Once you know the basic of FAT, then coding it is quite easy.. Atleast you can try..
Re:Question about a couple oddities in my OS
Posted: Fri Jun 30, 2006 7:06 am
by Bob the Avenger
I wrote a FAT12 driver once, it failed so misserably, if the FDC driver i had written before hadn't been so poor it would've reformated the floppy with my kernel on.
Re:Question about a couple oddities in my OS
Posted: Fri Jun 30, 2006 9:18 am
by Kemp
Saved from a bug because the bug relied on other code which didn't work... rather ironic.
Re:Question about a couple oddities in my OS
Posted: Fri Jun 30, 2006 9:37 am
by Bob the Avenger
who was it that said "I;d rather be lucky than good anyday"?
Re:Question about a couple oddities in my OS
Posted: Fri Jun 30, 2006 10:45 am
by GLneo
your proplem is this line:
Code: Select all
haltmsg db 13,10,'Kernel: System Halted',13,10
you forgot the ",0" at the end
p.s. there right you could have found that, but i personaly know of times when a stupid bug held me back for weeks(pop esp vs. mov esp, eax)
