Page 1 of 1
Jmp does not work in protected mode
Posted: Sat Mar 02, 2013 4:08 pm
by gabemaiberger
Hello, the jmp opcode does not work in protected mode in the file kernel.asm. I think I loaded my gdt correctly. Can anybody help me?
Re: Jmp does not work in protected mode
Posted: Sat Mar 02, 2013 4:20 pm
by Nessphoro
Not sure if you're trolling or not.
Re: Jmp does not work in protected mode
Posted: Sat Mar 02, 2013 4:23 pm
by iansjack
As always, single-step through the code in a debugger. These sort of errors are trivial and give you good experience of debugging for when you get on to the difficult stuff.
Re: Jmp does not work in protected mode
Posted: Sat Mar 02, 2013 4:28 pm
by gabemaiberger
Where can I get a single step debugger?
Re: Jmp does not work in protected mode
Posted: Sat Mar 02, 2013 5:12 pm
by iansjack
Difficult to say, since I don't know what Operating System you are running on or what toolset you are using.
I use Linux with the GNU toolset and GCC. The most common debugger there is gdb which you can use in conjunction with qemu. I use a GUI front end called ddd which makes life slightly simpler. Or you can use an emulator with a debugger built in. I don't use Bochs but I understand that provides debugging facilities. I am a fan of SimNow from AMD, which provides a very convenient interface for debugging the early stages of an OS. Unfortunately this is now only available for Linux.
You may be developing on another OS. In that case you are going to have to search out your own debugger (although I believe the GNU toolset is also available on Windows). Whatever, I strongly recommend that you find a debugger that suits you and learn how to use it. Unless you are a genius at just looking at code, or memory dumps, and seeing what is wrong you will find OS development very difficult without debugging facilities.
You could even just search through these forums. The sort of question that you ask has been asked many times before; indeed there is another running thread currently on an almost identical issue. You will be extremely fortunate if you can persuade people to review your code to find your mistakes for you.
Re: Jmp does not work in protected mode
Posted: Sat Mar 02, 2013 5:34 pm
by Kazinsal
Nessphoro wrote:Not sure if you're trolling or not.
I have no words.
Re: Jmp does not work in protected mode
Posted: Sun Mar 03, 2013 5:57 pm
by Mikemk
Blacklight wrote:Nessphoro wrote:Not sure if you're trolling or not.
I have no words.
yeah, I knew better than that when I started