Question about a couple oddities in my OS

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
512Dev

Question about a couple oddities in my OS

Post 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 ;) )
User avatar
bubach
Member
Member
Posts: 1224
Joined: Sat Oct 23, 2004 11:00 pm
Location: Sweden
Contact:

Re:Question about a couple oddities in my OS

Post 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.
"Simplicity is the ultimate sophistication."
http://bos.asmhackers.net/ - GitHub
Ryu

Re:Question about a couple oddities in my OS

Post 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.
viral

Re:Question about a couple oddities in my OS

Post 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..
Bob the Avenger

Re:Question about a couple oddities in my OS

Post 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.
Kemp

Re:Question about a couple oddities in my OS

Post by Kemp »

Saved from a bug because the bug relied on other code which didn't work... rather ironic.
Bob the Avenger

Re:Question about a couple oddities in my OS

Post by Bob the Avenger »

who was it that said "I;d rather be lucky than good anyday"?
GLneo

Re:Question about a couple oddities in my OS

Post 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

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) ;)
Post Reply