From: Oon Lin Newsgroups: comp.os.msdos.djgpp Subject: Re: accessing ports Date: Wed, 03 Dec 1997 11:06:05 +1000 Organization: University of Queensland Lines: 24 Message-ID: <3484B07D.41C6@jcu.edu.au> References: <3483c60d DOT 4107456 AT nntpserver DOT swip DOT net> NNTP-Posting-Host: cuda.jcu.edu.au Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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 Hope this helps ! Kean