Dec 282017
 
Good TSR/pop-up comm port debugger. Watch and test registers.
File UARTBUG.ZIP from The Programmer’s Corner in
Category Miscellaneous Language Source Code
Good TSR/pop-up comm port debugger. Watch and test registers.
File Name File Size Zip Size Zip Type
UART.ASM 28148 6207 deflated
UART.COM 3211 1096 deflated
UART.DOC 3990 1716 deflated

Download File UARTBUG.ZIP Here

Contents of the UART.DOC file




UART.COM is a memory resident utility that allows you to read and write the
com1 or com2 uart registers using a pop up that appears when you press
ctl-alt-lftshft. It is a highly modified version of the printer setup util-
ity published by PC magazine and will not co-exist with the original utility
and also will not work with their dos-edit utility. It will also conflict
with any programs that the original utility had a problem with.

Use is fairly much self-explanatory.
page up - selects com1 (beeps if no com1)
page dn - selects com2 (beeps if no com2)
lft arw - reads the register pointed to by the '>'
rgt arw - writes the byte at the btm of the pop up to the slctd reg
up/dn arw - slcts register to read or write
0-9, A-F - hex entry of byte to write to a reg (appears at btm of pop up)
ESC - exit pop up
ctl-alt-lftshft - activate pop up

Registers were not all read and displayed when the pop up is opened due to
the fact that reading a register may affect the status of other registers
you wish to monitor. Ex: Reading the rx holding register changes the data
ready bit of the line status register (this is not the only one that could
change the status of other regs or I would have wrote around it).

Included is the modified source also. It was a quickie I put together
to use in debugging some async routines I was working on so don't look for
pretty code (its a mess but it works as long as it don't bump into some
of your other ram residents). It works from within Codeview if you use that
and provides immediate access to the UART regs while debugging code.
It will also work from within your favorite com program and you can see
what interrupts they enable etc. but would not be a good idea to change
anything. Following is quick summary of uart regs based on com1 address,
com2 is same except 2fx:

3f8 - rx/tx hold reg (lsb of baud dvsr if bit 7 of LCR set)
(data in and out)
3f9 IER - interrupt enable reg (msb of baud dvsr if bit 7 of LCR set)
(who can interrupt?)
bit0 - enable rx data rdy intrpt
bit1 - enable tx hold reg empty intrpt
bit2 - enable receiver line status intrpts
bit3 - enable modem status intrpts
3fa IIR - interrupt identification register
(what caused interrupt?)
bit0 - set to ZR of interrupt pending
bits 2 & 1:
00 - ring indicator/line signal detect/modem status interrupt
01 - tx hold reg empty caused intrpt
10 - byte ready in rx hold reg
11 - overrun/parity/framing error or line break received
3fb LCR - line control register
bits 1 & 0: number of data bits
bit2 : number of stop bits
bits 4 & 3: parity (data,stop,parity bits same as for bios call)
bit5 : stick parity
bit6 : set break
bit7 : if high 3f8 & 3f9 are r/w regs for baud rate divisor (norm low)
3fc MCR - modem control register
bit0 - DTR (data terminal ready)
bit1 - RTS (request to send)
bit2 - output1 (not used by anything I've seen)
bit3 - output2 (set high to enable com port intrpts to intrpt controller)
3fd LSR - line status register
bit0 - data is ready to read from rx hold register
bit1 - overrun error occurred
bit2 - parity error occurred
bit3 - framing error occurred
bit4 - break was received
bit5 - tx holding reg is empty (rdy for another byte to tx)
bit6 - tx shft reg is empty
3fe MSR - modem status register
bit0 - DCTS delta clear to send (a chng in clr to send has been detected)
bit1 - DDSR delta data set rdy (chng in DSR detected)
bit2 - TERI trailing edge ring indicator
bit3 - DRLSD - delta received line signal detect
bit4 - CTS clear to send
bit5 - DSR data set ready
bit6 - RI ring indicator
bit7 - RLSD received line signal detect

Mike Dumdei can be reached at:
6 Holly Lane Split Up the Middle BBS 214 838-6713
Texarkana, TX 75503 Texarkana, TX



 December 28, 2017  Add comments

Leave a Reply