Mail Archives: djgpp/1997/12/02/21:46:20
Radon / Phrome wrote:
>
> How do I access ports in DJGPP?
> In pascal, it is as simple as: port[$3d8h]:=0; for example.
> Is there an equal way to do it in djgpp?
use the outportb() or outportw() function.
/* writes a byte into port */
void outportb(unsigned chort portid , unsigned char data) ;
/* writes 16 bit data into port */
void outportw(unsigned short portid , unsigned short data);
Remember to include the line :
#include <pc.h>
Hope this helps !
Kean
- Raw text -