You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
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.
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
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.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Comment