delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/19/11:40:37

From: alaric AT abwillms DOT demon DOT co DOT uk (Alaric B. Williams)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: reading the port
Date: Wed, 16 Oct 1996 21:01:28 GMT
Lines: 47
Message-ID: <845499616.25233.0@abwillms.demon.co.uk>
References: <1082AD76130 AT fs2 DOT mt DOT umist DOT ac DOT uk>
NNTP-Posting-Host: abwillms.demon.co.uk
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

"A.Appleyard" <A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk> wrote:

>  wilbert AT se-43 DOT wpa DOT wtb DOT tue DOT nl (W. Alberts) wrote:-
>> Is there any package, source code, examples, documentation dealing with how
>> to read the serial ports?

>#include <pc.h>

>see file djgpp\include\pc.h :-

>#define uns unsigned
>uns char  inportb(uns short port);

...

>void outportsl(uns short port, uns long  *buf, uns len);

I think he wanted SERIAL ports, not IO ports!

Sure, those instructions are the basis, but you need interrupt
handling and the details of the serial port.

However, Wilbert, if you use:

a) Those pc.h functions
b) The proper methods to handle interrupts (cf:
http://www.abwillms.demon.co.uk/prog/)
c) The same basic idea as that Turbo C++ code (if you understand the
source)

you can, sure enough, program the serial port. Not that I've ever
managed it!

Luck,


ABW
---

COMPUTER: We are in position over the Rebel homeworld.
VADAR: Engage the Death Star primary weapon, let those rebel worms die!
COMPUTER: Sorry, your evaluation version of Battle Computer 3.0 has expired. 
          Please send 2.6 billion dollars to the address in REGISTER.TXT

Alaric B. Williams Internet : alaric AT abwillms DOT demon DOT co DOT uk
<A HREF="http://www.abwillms.demon.co.uk/">Hello :-)</A>

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019