Документ взят из кэша поисковой машины. Адрес оригинального документа : http://jet.sao.ru/hq/sts/linux/doc/io-portprog/IO-Port-Programming-5.html
Дата изменения: Unknown
Дата индексирования: Tue Oct 2 09:31:41 2012
Кодировка:

Поисковые слова: crab nebula
Linux I/O port programming mini-HOWTO: Other programming languages Next Previous Contents

5. Other programming languages

The description above concentrates on the C programming language. It should apply directly to C++ and Objective C. In assembler, you have to call ioperm() or iopl() as in C, but after that you can use the I/O port read/write instructions directly.

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 /dev/port as described above.


Next Previous Contents