Baixe um programa trial chamado
http://www.emu8046.com e compila este código aqui:
name "Boot"
#make_boot#
org 7c00h
mov ax, 07c0h
mov ss, ax
mov sp, 03feh
xor ax, ax
mov ds, ax
mov ah, 00h
mov al, 03h
int 10h
lea si, msg
call print_string
;verifica se realmente existe o Kernel em 0800h:0000h
mov ah, 02h ; função de leitura.
mov al, 10 ; setores para ler (se o Kernel passar de 10 setores, será obrigatória a alteração ;deste valor para o tamanho do mesmo correspondente).
mov ch, 0 ;trilha.
mov cl, 2 ; setor.
mov dh, 0 ; cabeça.
mov bx, 0800h
mov es, bx
mov bx, 0
int 13h
cmp es:[0000],0E9h
je integrity_check_ok
lea si, err
call print_string
.
mov ah, 0
int 16h
mov ax, 0040h
mov ds, ax
mov w.[0072h], 0000h
integrity_check_ok:
jmp 0800h:0000h ;Carrega o Kernel
print_string proc near
push ax
push si
next_char:
mov al, [si]
cmp al, 0
jz printed
inc si
mov ah, 0eh
int 10h
jmp next_char
printed:
pop si
pop ax
ret
print_string endp
msg db "Iniciando o Sistema...",0Dh,0Ah, 0
;se não existir:
err db "Boot Falhado", 0Dh,0Ah, 0
Caso queira criar um kernel com prompt de comando para ele, leia este simples:
Tutorial. Aqui no osdebrasil você também acha tutorias em C.