http://git.dujemihanovic.i2p?p=nameless-os.git;a=blob;f=boot/x86/stage3/paging.s;h=004da84c2cda98f91d70cc3c023d7cb75ca80160
This was not done 11 ; before because it would require paging, but now that paging works using ELF is 12 ; a possibility which must be exploited. 13 14 enable_paging: 15 push eax 16 mov eax, cr0 17 or eax, 0x80000000 18 mov cr0, eax 19 pop eax 20 ret 21 22 load_paging_structs: 23 push eax 24 push ebx 25 xor ebx, ebx 26 .pt_low_loop: 27 mov eax, ebx 28 shl eax, 12 29 or eax, 1|2 ; P and R/W flags 30 mov [page_table_low+ebx*4], eax 31 inc ebx 32 cmp ebx, 0x100 33 jl...