🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #3655

Re: H-E-L-P!! An interesting UART problem.

#3655
From: ROSCOE JAMES ANDREW
Date: Fri, 13 Nov 1992 16:18
44 lines
2582 bytes
In article <1992Nov10.094131.9300@iccgcc.decnet.ab.com> gardner@iccgcc.decnet.ab.com writes:

>I'm writing a TSR that needs to redirect any bytes that 
>are written to COM2 for transmission to another "bucket."
>
>A vendor's program is running and writing bytes to COM2
>for transmission.  I want to have my TSR kicked whenever
>the vendor's program sends a byte to COM2 for transmission
>BUT I want to grab that byte and do some other work on 
>it...  In fact, there will not be any external device
>ever attached to COM2, so the byte won't actually ever
>be transmitted  and no external handshaking is going to
>occur.

 So what you want to do is log everything that goes to com2.  Judging from the
other followups to your article, I get the feeling there's no way to tell when
the UART has actually had a character sent to it.

>What I have written are two isr's: One that is attached
>to the COM2 hardware interrupt vector (0xb) and another 
>that is attached to the secondary clock software interrupt 
>vector (0x1c).  The isr attached to COM2 is responsible 
>for grabbing the byte from COM2 and saving it in a queue.
>The timer isr is responsible for taking a byte from the 
>queue and sending someplace else...

 The vendor program will very likely not call your handler after its own,
since it would be almost against the rules of UART programming.  You could
probably then change the interrupt handler back to your own (or to the original
DOS handler, if there even is one).  The handler which the vendor program
installed, then, could be called as a subroutine by your own timer tick handler
so that you would have full control over what it things the "UART" (virtual,
in this case) is telling it.  You still might not be able to read the character
being transmitted out of the port, but it's worth trying.

 You should have full control over everything at this point, and the only
real problem I can think of would be the possibility of not being able to read
the character from the comm port after it's been written.  Best of luck to you!
See ya.

-- 

   James
    - roscoe@ecf.toronto.edu
Technical Details
Message-ID: <BxnxAA.Ft0@ecf.toronto.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!skule.ecf!roscoe
References: <1992Nov10.094131.9300@iccgcc.decnet.ab.com>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer,comp.sys.ibm.pc.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!skule.ecf!roscoe
From: roscoe@ecf.toronto.edu (ROSCOE JAMES ANDREW)
Subject: Re: H-E-L-P!!  An interesting UART problem.
Message-ID: <BxnxAA.Ft0@ecf.toronto.edu>
Organization: University of Toronto, Engineering Computing Facility
References: <1992Nov10.094131.9300@iccgcc.decnet.ab.com>
Date: Fri, 13 Nov 1992 16:18:09 GMT
Lines: 44