I've tried to get the system to boot, and then I loaded the gdt. However, when I try a far jump, it jumps to a nonsensical location of 0 (absolute 0)
The following is the code-
Code: Select all
lgdt [gdtr] ;pointing to gdt
mov eax, cr0
or al,1
mov cr0, eax
;At this point in protected mode
jmp 0x08:protectedmode
[bits 32]
protectedmode:
;Do stuff
mov eax,5
add eax,10
gdtr:
dw 65535
dd 0x2000
(0) [0x00001076] 0000:0000000000001076 (unk. ctxt): jmp far 0008:107b ; ea7b100800
And then, bochs jumps to physical memory location 0
Can some1 tell me what I'm doing wrong.
Thank you