Page 1 of 1
CR3 Question
Posted: Wed May 16, 2007 7:08 am
by Lprogster
...
Thanks,
Lster
Posted: Wed May 16, 2007 7:37 am
by INF1n1t
Code: Select all
write_cr3:
mov eax, [esp + 8]
mov cr3, eax
ret
...should be...
[esp+4], because ESP points to the Return address of your procedure. ESP+4 points to the parameter, pushed before calling the procedure.
It was [esp+8], because you pushed ebp, so ESP was decremented by four one more time
Posted: Wed May 16, 2007 8:04 am
by Lprogster
Hehe that is a very silly mistake... How could I manage that... - too much programming?
Cheers
Lster