Hello, i have made code with little kernel and to test some fonctions.
But when i run it, my message in protected mode don't appear.
use16
org 0x7C00
xor ah,ah
xor dl,dl
int 0x13
mov ax,0x100
mov es,ax
xor bx,bx
mov ah,0x2
mov al,0x1
xor ch,ch
mov cl,0x2
xor dh,dh
xor dl,dl
int 0x13
jmp 0x1000
db 510-($-$$) dup 0x90
dw 0xAA55
org 0x1000
cli
lgdt [GDTProtectedMode.Descriptor]
mov eax,cr0
or al,0x1
mov cr0,eax
jmp 0x8:InitializeMain32
use32
InitializeMain32:
mov byte [0xB8000],'*'
mov byte [0xB8001],0x2
mov byte [0xB8002],' '
mov byte [0xB8003],0x0
mov byte [0xB8004],'I'
mov byte [0xB8005],0x7
mov byte [0xB8006],'n'
mov byte [0xB8007],0x7
mov byte [0xB8008],'i'
mov byte [0xB8009],0x7
mov byte [0xB800A],'t'
mov byte [0xB800B],0x7
mov byte [0xB800C],'i'
mov byte [0xB800D],0x7
mov byte [0xB800E],'a'
mov byte [0xB800F],0x7
mov byte [0xB8010],'l'
mov byte [0xB8011],0x7
mov byte [0xB8012],'i'
mov byte [0xB8013],0x7
mov byte [0xB8014],'z'
mov byte [0xB8015],0x7
mov byte [0xB8016],'e'
mov byte [0xB8017],0x7
mov byte [0xB8018],'M'
mov byte [0xB8019],0x7
mov byte [0xB801A],'a'
mov byte [0xB801B],0x7
mov byte [0xB801C],'i'
mov byte [0xB801D],0x7
mov byte [0xB801E],'n'
mov byte [0xB801F],0x7
mov byte [0xB8020],'3'
mov byte [0xB8021],0x7
mov byte [0xB8022],'2'
mov byte [0xB8023],0x7
Main32:
jmp short Main32
GDTProtectedMode:
.NullDescriptor:
dq 0x0
.CodeDescriptor:
dw 0xFFFF,0x0
db 0x0,11011001b,11110010b
db 0x0
.DataDescriptor:
dw 0xFFFF,0x0
db 0x0,11001001b,11110010b
db 0x0
.Descriptor:
dw 0x18
dd GDTProtectedMode
db 512-($-$$) dup 0x90