CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Other Programming > Assembly
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Assembly Questions and Answers for Assembly here!

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old August 27th, 2004, 10:09 AM
    pker pker is offline
    Junior Member
     
    Join Date: Aug 2004
    Posts: 1
    pker is an unknown quantity at this point (<10)
    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.
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Other Programming > Assembly


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 07:00 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009