Klar, hab ich vergessen
Hier der Bootloader :
BOOT.ASM :
[BITS 16]
[ORG 0x7C00]
start:
;set stack segment
cli
mov ax,0x7c0
mov ss,ax
mov sp,0x03fe
sti
;set data segment
xor ax,ax
mov ds,ax
;print message
lea si,[msg_load]
call print_string
;load kernel at 0x0800:0x0000
call load_kernel
;jump to kernel
push es
push bx
retf
;+++++++++++++++++++++++++
msg_load db 'Loading...',0
;+++++++++++++++++++++++++
load_kernel:
mov ah,0x02
mov al,2
mov ch,0
mov cl,2
mov dh,0
mov bx,0x0800
mov es,bx
xor bx,bx
int 0x13
jmp processed
print_string:
lodsb
or al,al
jz processed
mov ah,0x0E
mov bx,0x0007
int 0x10
jmp print_string
processed:
ret
times 510-($-$$) db 0
dw 0xAA55
Compiliert hab ich das ganze mit NASM, mit
nasm -f bin -o boot.bin boot.asm
nasm -f bin -o kernel.bin kernel.asm
nasm -f bin -o proc.bin proc.asm
copy boot.bin+kernel.bin+proc.bin myos.img