Jmp does not work in protected mode
-
- Member
- Posts: 40
- Joined: Tue Nov 13, 2012 2:54 pm
Jmp does not work in protected mode
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?
- Attachments
-
- kernel.asm
- (131 Bytes) Downloaded 31 times
-
- bootload.asm
- (1.6 KiB) Downloaded 58 times
Code: Select all
var myCat="marshmallow"
Re: Jmp does not work in protected mode
Not sure if you're trolling or not.
Code: Select all
start:
jmp start
Re: Jmp does not work in protected mode
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.
-
- Member
- Posts: 40
- Joined: Tue Nov 13, 2012 2:54 pm
Re: Jmp does not work in protected mode
Where can I get a single step debugger?
Code: Select all
var myCat="marshmallow"
Re: Jmp does not work in protected mode
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.
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.
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: Jmp does not work in protected mode
I have no words.Nessphoro wrote:Not sure if you're trolling or not.
Code: Select all
start: jmp start
Re: Jmp does not work in protected mode
yeah, I knew better than that when I startedBlacklight wrote:I have no words.Nessphoro wrote:Not sure if you're trolling or not.
Code: Select all
start: jmp start
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
If you're new, check this out.