Eigentlich ist nur kernel.c und kernel32.asm wichtig
bits 32
%include "macros.asm"
global start
start:
mov ax,0x10
mov ss,ax
mov ds,ax
mov fs,ax
mov gs,ax
mov es,ax
mov eax,0x9FFFF
mov esp,eax
mov ebp,eax
finit ;prepare the FPU so it can be used without problems
activateA20:
.1:
in al, 0x64
test al, 00000010b
jnz .1
mov al, 0xD0
out 0x64, al
.2:
in al, 0x64
test al, 00000001b
jz .2
in al, 0x60
or al, 00000010b
push eax
.3:
in al, 0x64
test al, 00000010b
jnz .3
mov al, 0xD1
out 0x64, al
.4:
in al, 0x64
test al, 00000010b
jnz .4
pop eax
out 0x60, al
remappic: ;IRQ's start with Int 0x20, directly after the exceptions
mov al,0x11
out 0x20,al
out 0xa0,al
mov al,0x20
out 0x21,al
mov al,0x28
out 0xa1,al
mov al,0x04
out 0x21,al
mov al,0x02
out 0xa1,al
mov al,0x01
out 0x21,al
out 0xa1,al
extern _main
call _main
jmp $
Interessant ist
extern _main
call _main
In kernel32.asm und void main() in kernel.c
Wie compilierst du das? Zuerst alle Files in Objects machen und erst dann alle linken!