i've a problem loading kernel image ...
this is kernel source:
Code: Select all
bits 32
org 0x100000
jmp kernel_main
%include "includes\stdio.inc"
%define TEXT_ATTRIBUTES 00011111b
shellWelcome db "Welcome!", 0
credits.msg db "OS", 0
%define TEXT_ATTRIBUTES 00011111b
kernel_main:
mov ax, DATA_DESC ; set data segments to data selector (0x10)
mov ds, ax
mov ss, ax
mov es, ax
mov esp, 90000h ; stack begins from 90000h
mov dl, TEXT_ATTRIBUTES
call clear_scrn32
mov si, shellWelcome
call puts32
hlt
if i write mov al, [shellWelcome], using debugger al is set to ascii code of W.
using mov si, shellWelcome, si is set to a random value, as it was overwritten, and cpu triple faults getting a gdt segment access violation.
how can it be possible ?
is si register used by anyone in protected mode .. ?
trying the same code in stage2, it's worked, so i think it's the usual addressing problem ... -.-
i tried all, i've compared your kernel code and my, and it seems to be right
thanks
