I've tested it in 16 bits and I was able to load and jump to the code loaded ( and everything work ok )
But now I'm trying to load the code at the 1 MB mark and jump to it
So I enable A20 Line. Load the kernel code with BIOS int 0x13 ( where ES = 0xFFFF and BX = 0x0010 , so 0x100000 ). Set a small temporary GDT ( 3 segments: intel reserved, code and data) and go to protected mode.
Jump to kernel code ( jmp 0x08: 0x100000 ).
When I boot this code in my computer it resets.
So I removed the line that jumps to the kernel code and wrote this:
Code: Select all
;test if computer is really in PM
; and if going to PM is not the cause of the computer resets
mov byte [ds:0B8000h], 'P' ; Move the ASCII-code of 'P' into first video memory
mov byte [ds:0B8001h], 1Bh ; Assign a color code

