blob: 0bb10d5f4d1b34349d253065ea296bb58dcb727e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
; Multiboot header
MBALIGN equ 1 << 0
MEMINFO equ 1 << 1
FLAGS equ MBALIGN | MEMINFO
MAGIC equ 0x1BADB002
CHECKSUM equ -(MAGIC + FLAGS)
section .multiboot
align 4
dd MAGIC
dd FLAGS
dd CHECKSUM
; Setup stack
section .bss
align 16
stack_bottom:
resb 16384 ; 16 KiB
stack_top:
section .text
global _start:function (_start.end - _start)
_start:
; Initialize stack
mov esp, stack_top
extern kmain
call kmain
cli
.inf: hlt
jmp .inf
.end:
|