2022-09-18 15:03:29 +00:00
|
|
|
global _main
|
|
|
|
extern _start
|
|
|
|
|
|
|
|
_main:
|
|
|
|
xor rbp, rbp
|
2022-09-25 18:35:05 +00:00
|
|
|
call _start
|
2022-10-01 10:16:30 +00:00
|
|
|
cli
|
|
|
|
.hang:
|
|
|
|
hlt
|
|
|
|
jmp .hang
|
2022-09-25 18:35:05 +00:00
|
|
|
|
2022-10-01 10:16:30 +00:00
|
|
|
global idle_task_function
|
|
|
|
idle_task_function:
|
|
|
|
sti
|
|
|
|
.idle:
|
|
|
|
hlt
|
2022-10-02 16:53:54 +00:00
|
|
|
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
|