31 lines
357 B
NASM
31 lines
357 B
NASM
cpu 8086
|
|
org 0x7C00
|
|
|
|
%include "inc/bpb.asm"
|
|
%include "inc/mbr.asm"
|
|
|
|
; kernel stack size in words
|
|
%define stacksize 512
|
|
|
|
jmp init
|
|
|
|
times ( 0x0B - ($-$$) ) db " "
|
|
|
|
times bpb_size db 0
|
|
|
|
init: cli
|
|
xor ax, ax
|
|
mov ds, ax
|
|
mov es, ax
|
|
mov ss, ax
|
|
mov sp, ( stack+stacksize )
|
|
|
|
int 3
|
|
|
|
hlt: hlt
|
|
jmp hlt
|
|
|
|
section .bss
|
|
|
|
stack: resb stacksize
|