[python-win32] inb() and outb() with Python Win32 ?
Tim Roberts
timr at probo.com
Mon Oct 11 18:39:42 CEST 2004
On Mon, 11 Oct 2004 10:27:44 +0200, Cedric Delfosse
<cedric.delfosse at linbox.com> wrote:
>do you know if it is possible to do low level port I/O with the win32
>API ? (same as inb/outb function in C)
>I found some Python modules around, but I'd prefer to use the Python
>Win32 bindings.
>
>
There are no Win32 APIs for doing port I/O. When you call inb() and
outb() from C, if you have optimizations turned on, they are in-lined
directly to IN and OUT instructions. If you do not have optimizations
turned on, they call an assembler routine in the C run-time library. A
module in C is the best you can do.
Are you aware that port I/O in NT/2K/XP requires the help of a kernel
driver? You can do it directly from a Win32 app in Win 98, but not on
the NT-derived systems.
--
- Tim Roberts, timr at probo.com
Providenza & Boekelheide, Inc.
More information about the Python-win32
mailing list