1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
[BITS 32] section .asm global paging_load_directory global enable_paging paging_load_directory: push ebp mov ebp, esp mov eax, [ebp + 8] mov cr3, eax pop ebp ret enable_paging: push ebp mov ebp, esp mov eax, cr0 or eax, 0x80000000 mov cr0, eax pop ebp ret