Announcement

Collapse
No announcement yet.

Thunking & Ring 0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lance Edmonds
    replied
    Correct. Win9x does not stop direct hardware access (ie, via inline-assembler, etc) whereas NT/2000 will stop it blind via the HAL layer. To access hardware under NT/2000 requires a Kernel-mode driver to get to Ring-0.

    PowerBASIC produces Portable Executable (PE) format files, and these cannot act as kernel-mode drivers.
    www.lvr.com hosts a range of freeware and shareware NT/2000 kernel mode drivers to allow hardware access for Ring-3 applications, and they even have some available for Win9x so the Ring-3 code can be written in a less platform-specific manner.



    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Guest's Avatar
    Guest replied
    you can access ports with a bit of assembly in the PBDLL.
    FUNCTION INPT (BYVAL inport AS INTEGER) EXPORT AS INTEGER
    ! mov dx, inport
    ! in al, dx
    ! mov function[0], al
    END FUNCTION
    '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
    SUB OUTP (BYVAL outport AS INTEGER, BYVAL dat AS INTEGER) EXPORT
    ! mov dx, outport
    ! mov al, dat
    ! out dx, al
    END SUB

    This works in Windows 9x, but not in 2000 or NT.


    ------------------

    Leave a comment:


  • Steve Hutchesson
    replied
    Walt,

    Yes but it pretty messy stuff, you need to get the appropriate
    Microsoft DDK and write your own drivers to get access to ring 0
    in the operating system.

    The drivers are operating system specific and will not work on
    other versions usually so unless you have very good reason to do
    it, I would see if there is another way of accessing the data you
    need.

    Regards,

    [email protected]

    ------------------

    Leave a comment:


  • Walt Decker
    started a topic Thunking & Ring 0

    Thunking & Ring 0

    1. Is there a way to access 16-bit real-mode data?

    2. Is there a way to go up to ring 0 in order to obtain direct acces to hardware?


    ------------------
Working...
X