old-www/HOWTO/IO-Port-Programming-5.html

35 lines
1.4 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Linux I/O port programming mini-HOWTO: Other programming languages</TITLE>
<LINK HREF="IO-Port-Programming-6.html" REL=next>
<LINK HREF="IO-Port-Programming-4.html" REL=previous>
<LINK HREF="IO-Port-Programming.html#toc5" REL=contents>
</HEAD>
<BODY>
<A HREF="IO-Port-Programming-6.html">Next</A>
<A HREF="IO-Port-Programming-4.html">Previous</A>
<A HREF="IO-Port-Programming.html#toc5">Contents</A>
<HR>
<H2><A NAME="s5">5. Other programming languages</A></H2>
<P>The description above concentrates on the C programming language. It
should apply directly to C++ and Objective C. In assembler, you have
to call <CODE>ioperm()</CODE> or <CODE>iopl()</CODE> as in C, but after that you can
use the I/O port read/write instructions directly.
<P>In other languages, unless you can insert inline assembler or C code
into the program or use the system calls mentioned above, it is
probably easiest to write a simple C source file with functions for
the I/O port accesses or delays that you need, and compile and link it
in with the rest of your program. Or use <CODE>/dev/port</CODE> as described
above.
<P>
<P>
<HR>
<A HREF="IO-Port-Programming-6.html">Next</A>
<A HREF="IO-Port-Programming-4.html">Previous</A>
<A HREF="IO-Port-Programming.html#toc5">Contents</A>
</BODY>
</HTML>