Any communication
program on any IBM PC family computer deals with a chip called the Intel 8250.
This is the chip that does all the hardware work when it comes to comm. 
However, there are two major differences between how that chip is handled on
the jr and how it is handled on the rest of the PC family, hardware interrupts
and baud rates. Hardware interrupt problems crop up due to the presence or
absence of the internal modem, and how that affects the handling of the normal
serial port.  As you probably already know, if you don't have an internal modem
the serial port is referred to as COM1 ; if you do have one, the internal modem
is COM1 and the serial port is assigned COM2 instead.  However, very often,
these assignments ONLY work through programs that use the communications
software interrupt INT 14H exclusively (like DOS).  The big problem is that
very few communications programs do that. The reason for that is INT 14H does
not use "buffering"; that is, it does not move incoming characters from the
8250 chip to RAM as soon as they come in.  If a program were to use INT 14H
exclusively, chances are high that it would miss incoming characters between
successive calls, because the 8250 has room on it for only one character, and
if a new character comes in before the one sitting in the 8250 is read using
INT 14H, the old character is just replaced and lost.  To get away from this
problem comm programs often deal with the 8250 directly, not through BIOS, and
enable hardware interrupts.  The presence of a character tells a program to
stop whatever it's doing and get that character, often appending it to an area
of RAM called a "buffer" and setting a flag saying the buffer is not empty. 
This way, in the main body of the program, all it has to do is check the state
of this flag and not worry about overrun characters; the hardware interrupt
handles it automatically. To get back to the jr... when the internal modem is
not present, the serial port is called COM1, as said earlier.  However, the
port designator, 2F8H, and the hardware interrupt line, IRQ 3, are still the
same values as COM2 on a normal PC.  This confuses most comm programs terribly;
if you tell them to use COM1, they look at the memory location that should
contain the port designation (00400H), see that it is not empty, and assume
that it is 3F8H (the normal port designator for COM1) and also use the IRQ 4
line for hardware interrupts (also normal for COM1), and usually get hung up
because neither one exists.  If you tell them to use COM2, they check its
memory location (00402), see it is zero, and tell you that COM2 is not
installed.  The routine SWCOMM fixes this problem by switching the contents of
00400 and 00402 in memory. Then the program, being told to use COM2, should be
completely satisfied with port existence, port designation, and the hardware
interrupt line.  I myself, without an internal modem, always use SWCOMM with
all the comm programs I use, telling each one to use COM2.
The other difference between the PC and the jr is that the PC async board has
special crystals and clock circuitry that base all baud rate calculations on a
rate of 1.8432 MHz.  This frequency happens to be an exact multiple of all the
most common baud rates, so baud rates are calculated by dividing this number by
a "baud rate divisor".  To save board space and money, IBM chose on the jr to
use a fraction of the system clock to base baud rates on, a number which turns
out to be 1.7895 MHz, a 3% difference. In order to get the same baud rates on
the jr, you need to use different baud rate divisors, ones that are 3% smaller
than the ones on the PC.  If INT 14H were used to initialize the comm port, all
this nonsense would be unnecessary, because it handles all the stuff about
divisors.  However, INT 14H limits the choice of rates to 110, 150, 300, 600,
1200, 2400, 4800, and 9600.  To get around this limitation, most comm programs
use their own set of baud rate divisors, but they are ALWAYS those for the PC,
not the jr, ending up with baud rates that are 3% too low.  Amazingly, some
modems can handle that.  Most can't though. When I started using HOST on my jr,
I noticed intermittent operation.  Using DEBUG, I checked the program for the
PC's divisor list, found it, modified it to a jr list, and had the program work
just fine after that. This might have been rather lengthy, but I felt this
important difference between the jr and the PC had to be brought forward, for
everyone's benefit.

                John Bongiovanni  CIS 70137,2401
..................... . ... ...-.... 1200  N81N          ........................ . ... ...-.... 1200  N81N      