flat assembler
Message board for the users of flat assembler.
![]() |
Author |
|
smiddy 10 Feb 2005, 12:33
PMode Problem, precisely! Alliteration is fun, but round sounds of assonance are better. (Oh, that stinks...)
As for your problem...I'll have to play with it at home this evening. A quick glance at your code doesn't reveal anything that is blaring at me, but I'm not an expert at this either. |
|||
![]() |
|
Mota 10 Feb 2005, 14:11
Thanks
![]() I myself have found one error, but it's got nothing to do with PMode, just with loading the loader. Solving the error doesnt solve the problem. |
|||
![]() |
|
bubach 11 Feb 2005, 08:45
Hmm.. you will need a "cli" before going into pmode or else the adventure will end rather quickly..
![]() and a zero is missing from your jumo to the kernel, it should be "jmp 0x8:0x10000".. / Christoffer |
|||
![]() |
|
Mota 11 Feb 2005, 13:32
cool, thanks or the help.
I had already solved the problem by downloading working PMode code, but I didn't know what was wrong. Thanks for clearing it up. Anyways, there's this other code which isn't working well. It's supposed to set all the page table and the page table directory. It isn't working so I used my old paging code and it works... why? Here's the code: Code: ; okay, allow pages up to 0x5FFFFF ; which is where the page directory ; and tables are going to be set ; eax = current address ; ecx = outer loop variable ; ebx = inner loop variable ; edx = current write address paging: ; This code isn't working and is useless atm, I'll fix it once I figure out what's wrong with it xor eax,eax xor ecx,ecx mov edx,0x102000 .outer_loop: ; Outer Loop cmp ecx, 1024 ; Check if ecx is out of bounds jge .end_outer_loop ; if so, finish the loop. mov dword [ecx*4+0x101000],edx ; Write page table address or dword [ecx*4+0x101000],3 ; or it with 0x303 (supervisor,read/write,pressent) xor ebx,ebx ; Reset ebx .inner_loop: ; Inner Loop cmp ebx, 1024 ; Check if ecx is out of bounds jge .end_inner_loop ; if so, finish the loop. mov dword [edx],eax ; Write page physical address cmp eax,0x600000 ; Check if eax is over 0x600000 jge .inner_loop_next ; if so, skip makeing page present or dword [edx],0x201 ; .inner_loop_next: or dword [edx],0x402 inc ebx add edx, 4 add eax, 4096 .end_inner_loop: inc ecx .end_outer_loop: mov eax, 0x101000 mov cr3, eax mov eax,cr0 or eax,0x80000000 mov cr0,eax All the segments are set accordingly (cs to 0x8, the rest to 0x10) The outer loop writes to the page table directory, and the inner loop writes to the page tables. (Even though this is a new problem, there would be no point making a new thread, as this is also a bit to do with PMode....) Thanks in advance again ![]() EDIT: Naaa forget it, I forgot to jmp to the loop starts .. daft me. |
|||
![]() |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.