Files
Espresso/arch/x86/misc_asm.s
2025-10-20 21:57:30 -05:00

44 lines
521 B
ArmAsm

/*
A bunch of functions I could have written in C (or not), but decided not to,
Mostly so I could get more experience in assembler.
*/
.section .text
.global _enable_paging_asm
.global _hang_asm
.global _halt_asm
.global _sti_asm
.global _cli_asm
_enable_paging_asm:
push %eax
mov %cr0, %eax
or $0x80000000, %eax
mov %eax, %cr0
pop %eax
ret
_hang_asm:
hlt
jmp _hang_asm
_halt_asm:
nop
ret
_sti_asm:
sti
ret
_cli_asm:
cli
ret