| www.delorie.com/djgpp/mail-archives/browse.cgi | search |
| From: | Oon Lin <Oon DOT Lin AT jcu DOT edu DOT au> |
| 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 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
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
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |