6 ; clear 4 levels of page maps
7 mov di, PAGETABLE+0x0000
11 cmp di, PAGETABLE+0x4000
14 ; init 3 page map levels
15 mov dword[PAGETABLE+0x0000], PAGETABLE+0x1003
16 mov dword[PAGETABLE+0x1000], PAGETABLE+0x2003
17 mov dword[PAGETABLE+0x2000], PAGETABLE+0x3003
19 ; fill up level 4 page map
21 mov di, PAGETABLE+0x3000
29 ; enable paging and long mode
77 db "building page table", 10, 13, 0