On Tue, 29 Aug 2000, you wrote:
> 20 OPEN"COM:" FOR OUTPUT AS 1
> 30 ?#1,"ATZ";CHR$(10); ' CHR$(13)? CHR$(10)? both??
> 40 CLOSE
> 50 OPEN"COM:" FOR INPUT AS 1 ' I should read "OK\n"...
The OPEN statement clears the buffers. So if the RS232 ROM received something
before OPEN is executed, it is wiped from the buffers and lost. Try to open
output as #1 and input as #2 at the start of the program.
> Also, using "_COMTERM" and any parameters combination in "_COMINI"
> I'm not able to communicate with the modem (not sending nor receiving
> data)... :(
I tried to talk to my modem in Linux (using "echo" and "less") as Laurens
described ("ATZ", "ATDT"), that worked without problems ("NO CARRIER", but
that was to be expected because my phone line isn't connected).
But when I tried it with _COMTERM in fMSX, after typing "AT" I saw many
characters appearing on the screen (mostly spaces). However, redirecting
_COMTERM to "less" instead of "/dev/modem" didn't work either, so maybe
_COMTERM has some strange behaviour. So let's ignore _COMTERM for now.
The following program returned "ATZ" a couple of times, "OK" a couple of
times and some empty lines inbetween:
10 MAXFILES=2
20 OPEN "COM:" FOR OUTPUT AS #1
30 OPEN "COM:" FOR INPUT AS #2
40 PRINT #1,"ATZ"
50 I$=INPUT$(1,#2)
60 IF I$=CHR$(10) THEN PRINT CHR$(13);
70 PRINT I$;
80 GOTO 50
Bye,
Maarten
****
Problems? contact [EMAIL PROTECTED] See also http://www.faq.msxnet.org/
****