delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/05/16/06:14:43

From: kunst AT prl DOT philips DOT nl
Subject: Re: Serial Port status?
To: iclone!ctm AT cs DOT unm DOT edu (Clifford "T." Matthews)
Date: Mon, 16 May 1994 11:24:49 +0100 (METDST)
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (DJGPP users list)

Clifford T. Matthews writes:
> 
> About a month ago on this list there were some messages about serial  
> port access under DJGPP.  I saved them for future reference and now  
> I've just taken a look at the contents of aeasy102.zip and have some  
> questions.
> 
> First off, I assume the reason for the dedicated TSR is one of  
> performance.  With DJGPP 1.11, I should be able to use INT 14 and get  
> serial port access directly, but presumably I won't get as good  
> throughput as I would by using aeasy.  However, aeasy appears to only  
> affect reception, not transmission.

The TSR buffers the incoming characters from the serial port.
Sending is not buffered because normally the application program
knows *when* characters are being sent.

> 
> Q1:  Does that mean that using aeasy will allow very fast  
> transmission, but slower reception?

I don't think the TSR was written with *very* high speed
receipts in mind, noting the (default) small size of the buffer.
However, I have used the (original DJ) TSR with comfort over
the years for Baud rates up to 9600.

> 
> Q2:  Any idea of approximate throughput on a 66DX2 for:
> 
> 	reading only via INT 14
> 	writing only via INT 14
> 	reading and writing simultaneously (alternating) via INT 14
> 
> 	the same three but with aeasy

See above. 9600 Baud is fine. Don't know about higher Baud rates.

> 
> Michael Snowswell mentioned that aeasy doesn't have a programattic  
> interface to allow you to set baud rates and such.  I couldn't find  
> one either, but AE himself said "Say what? ... If I really left it  
> out as args to the TSR ... I'll fix it".
> 
> Q3:  It appears that the TSR in aeasy102.zip doesn't allow the baud  
> rate to be set.  Is there a newer TSR somewhere that does?

I don't know of any.

However, you can set the Baud rate (if <= 9600) using the standard
BIOS routine (INT 14H, AH=0, AL=....., DX=com port).
See e.g. "Advanced MS-DOS", Ray Duncan (2nd ed.), p.556.

For higher Baud rates you'll need to program the Baud rate
divisor yourself. See e.g. "The IBM PC from the inside out" by
Murray Sargent III (rev. ed.), p.367.

  divisor = 115200/Baud  (use '6' for 19200 Baud rate)

> 
> Q4:  How about a way to set the baud rate from within the program  
> using the TSR?  Is this possible?

See above.

> Q5:  Does aeasy work under DPMI?

If I remember correctly, no, it doesn't. I have routines that do
work with DPMI. My code "diverged" from AE's code, because I 
derived my code from the *original* ASYNC code from DJ. 
Therefore it doesn't provide multiple COM ports handling etc.
(If you are interested, mail me.)

> Jan Kok reported problems associated with hangs when trying to read  
> data that was there.  Michael Snowswell reported that he uses it at  
> speeds up to 56kb without any trouble.
> 
> Q6:  Does anyone else still experience hangs using aeasy?

See above. My experiences up to 9600 Baud are satisfactory.

> I will be adding serial port support to Executor, our Macintosh  
> emulator, over the next week and I'm still deciding on a game plan.   
> I don't know a whole lot about DOS programming, but it appears that  
> except for the throughput problems, going directly with INT 14 might  
> be the best bet.  However, I want to allow people to at least do  
> reads at 38400, so aeasy is one possibility, as is writing the same  
> sort of functionality into a library instead of a TSR.
> 

Regards,

 .^^^^^^^^           _____________________________________
 |      |          / Pieter Kunst (P.J.)                   \
 |  _  _|        /   Philips Research Laboratories,          \
.--(o)(o)      /     Building WY3, Prof. Holstlaan 4,         \
|@      _)   /       5656 AA  Eindhoven, The Netherlands.      |
  | ,___|   /        e-mail: kunst AT prl DOT philips DOT nl             /
  |   /     \_______________________________________________/
  /____\

- Raw text -


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