Files
Espresso/arch/x86/misc_asm.s

44 lines
521 B
ArmAsm
Raw Permalink Normal View History

2025-05-28 14:41:02 -05:00
/*
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
2025-06-13 18:03:39 -05:00
.global _halt_asm
.global _sti_asm
2025-10-20 21:57:30 -05:00
.global _cli_asm
2025-06-13 18:03:39 -05:00
2025-05-28 14:41:02 -05:00
_enable_paging_asm:
push %eax
mov %cr0, %eax
or $0x80000000, %eax
mov %eax, %cr0
pop %eax
ret
_hang_asm:
hlt
jmp _hang_asm
2025-06-13 18:03:39 -05:00
_halt_asm:
nop
ret
_sti_asm:
sti
ret
2025-10-20 21:57:30 -05:00
_cli_asm:
cli
ret