28 lines
355 B
NASM
28 lines
355 B
NASM
global _main
|
|
extern _start
|
|
|
|
_main:
|
|
xor rbp, rbp
|
|
call _start
|
|
cli
|
|
.hang:
|
|
hlt
|
|
jmp .hang
|
|
|
|
global idle_task_function
|
|
idle_task_function:
|
|
sti
|
|
.idle:
|
|
hlt
|
|
jmp .idle
|
|
|
|
global asm_enable_sse
|
|
asm_enable_sse:
|
|
mov rax, cr0
|
|
and ax, 0xFFFB
|
|
or ax, 0x2
|
|
mov cr0, rax
|
|
mov rax, cr4
|
|
or ax, 3 << 9
|
|
mov cr4, rax
|
|
ret |