Mail Archives: djgpp/1998/06/08/06:37:58
aYk wrote:
> You mean inportb(). You have to specify the transfer size. And you
> need to include dos.h instead of pc.h if I remember correctly.
>
> - aYk -
From libc reference :
/*--------------------------
#include <pc.h>
unsigned char inportb(unsigned short _port);
Description
-----------
Read a single 8-bit I/O port.
This function is provided as an inline assembler macro, and will be
optimized down to a single opcode when you optimize your program.
--------------------------*/
IMHO, this is a preferable way to do port I/O in C programm.
--
____ ____
| \ / Dim Zegebart
____/____
Moscow Russia
WWW - http://www.geocities.com/siliconvalley/pines/7817
DZcomm - comm library for Allegro
Palantir - multitasking kernel for Allegro (based on PDMLWP)
- Raw text -