| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
| Assembly Questions and Answers for Assembly here! |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
problem about call gate to ring 0
i read an article about adding a privilege 3 call gate specifying to a ring 0 code segment in GDT. i wrote one, but it only work in xp. i got a service starting error in 2k. here's the code in FASM:
format PE native 4.0 entry _start _start: push ebx sgdt [esp-2] pop ebx mov ecx,3a0h cmp dword [ebx+ecx+2],0ec0003a8h jz _ret mov byte [ebx],0c3h mov eax,ebx mov word [ebx+ecx],ax shr eax,16 mov word [ebx+ecx+6],ax mov dword [ebx+ecx+2],0ec0003a8h mov dword [ebx+ecx+8],0000ffffh mov dword [ebx+ecx+12],00cf9a00h _ret: xor eax, eax ret 8 does anybody know what the problem is? Last edited by pker; August 27th, 2004 at 10:13 AM. |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|