26 lines
424 B
NASM
26 lines
424 B
NASM
|
bits 32
|
||
|
|
||
|
global start
|
||
|
start: jmp stub
|
||
|
|
||
|
|
||
|
stub: cmp eax, 0x2badb002
|
||
|
jne .bad
|
||
|
|
||
|
mov ax, 10h
|
||
|
mov ds, ax
|
||
|
mov es, ax
|
||
|
mov fs, ax
|
||
|
mov gs, ax
|
||
|
|
||
|
extern _k_main
|
||
|
call _k_main
|
||
|
|
||
|
.bad:
|
||
|
cli
|
||
|
hlt
|
||
|
|
||
|
|
||
|
|
||
|
SECTION .bss
|
||
|
resb 8192 ; This reserves 8KBytes of memory here
|