Mail Archives: djgpp/1996/10/19/11:40:37
"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 -