[In a message from Bill White to All ]
BW> I've seen the answer to this pass thru dozens
BW> How do you open Com Port #3?
Here's some code from Matt Hart on the subject.
You swap the addresses for COM1 and COM2 with COM3 and COM4, then access
COM1 or COM2 and it will really be going to COM3 or COM4. Like this:
SUB SwapCom1
DEF SEG = &H40
Com1.1 = PEEK(0)
Com1.2 = PEEK(1)
Com3.1 = PEEK(4)
Com3.2 = PEEK(5)
POKE 0,Com3.1
POKE 1,Com3.2
POKE 4,Com1.1
POKE 5,Com1.2
DEF SEG
END SUB
Com2 is peek/poke 2 & 3, Com4 is peek/poke 6 & 7. Then:
CALL SwapCom1
OPEN "COM1" FOR BINARY AS 1 ' Buffer is actually COM3
CALL SwapCom1
. pat.pridgen@svis.org
. La Grande, Oregon
*SignIt 2.x #001*
... Christian Science Programming: "Let God Debug It!"
___ Blue Wave/DOS v2.30
--- Maximus 2.02
---------------
* Origin: THE LOFT in Auburn IN 219-925-5524 & 238-3222 HST/V34+ (1:236/7)
|