16 Sep 95 18:41, Roderick Riensche escrib¡a a All:
Hola Roderick!
RR> Here's the problem.. Using the following code on my system (which
RR> only has a plain old 14.4k modem on COM2), output works--i.e. I type
RR> ATH1 and the phone goes off-hook--but I don't get any input from the
RR> modem (i.e. I don't see the ATH1 and the subsequent OK).
RR> Note, If I skip the "SetComAddress", and just use "OPEN COM2:..." both
RR> input and output work beautifully..
RR> Ideas anyone?
Yes, when you change de port base address with SetComAddress you change only
this, the COM port base address. PowerBASIC expects that COM1 uses IRQ 4. You
can use COM1 for base ports COM1 and COM3, and COM2 for COM2 and COM4 that
use IRQ 3.
In the other hand, you can use the IR parameter in PowerBASIC Open COM
statement, like this:
RR> Here is the code:
RR> $lib com
RR> $include "extcomm.inc"
RR> $link "extcomm.pbl"
[...]
RR> open "com1:38400,N,8,1" as #1 len = 1024
Open "COM1:38400,N,8,1,IR3" as #1 len=1024
[...]
With this little modification the code works fine.
Remenber that you must known what IRQ is assigned for each COM port.
ually:
COM1 and COM3 = IRQ 4
COM2 and COM4 = IRQ 3
But this behaviour may change if the system has more that 2 serial ports.
Saludotes,
,,, JOS (2:348/102)
`0-0' jmejuto@encomix.com
/-(_)-\ mejuto@sfdzuma.usc.es
--- FD2.12+ & GoldED 2.50+ & FE145+
---------------
* Origin: -=EDI=BBS=-// Santiago de Compostela //+34-81-502110 (2:348/102)
|