How to test Paging?
How to test Paging?
I've set cr3 to point to my pagedirectory and set 31th bit of cr0 to enable paging. Nothing wrong, everything runs smoothly. But, how do I know if it works?
Re: How to test Paging?
Try setting two virtual address to point to the same physical page. Then write to the page using one address and check if the other one can read it.
Re: How to test Paging?
Just to clarify, is this correct?
Code: Select all
type
PageTable: PLongWord; // pointer to unsigned 32-bit Integer
var
PageDirectory: array [0..255] of PageTable;
... // assume that PageDirectory has been initialized
var
p,q: PageTable;
begin
p:=PageDirectory[5];
q:=PageDirectory[5];
p^:=255;
WriteLn(q^);
end;