summaryrefslogtreecommitdiff
path: root/kernel/src/main.asm
blob: 88b0d539cccd49845ce9ccf7faf366456f0ca9c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

section .text

extern main
global kmain
kmain:
    mov rsp,stack_top
    call main
    hlt

global setwp
setwp:
    mov rax,cr0
    or rax, 0x10000
    mov cr0,rax
    ret
    

section .data
stack_bottom:
resb 1024*128
stack_top: