[comp.sys.amiga] Amiga with basic

po87553@tut.fi (Ojala Pasi Juhani) (05/02/89)

This is a posting for a friend, but please answer me..
---------Juha Tuominen writes:

 I have a problem with AmigaBASIC's serial line operations. I have a box
here in Finland, which I have made by myself. Now am I interested in one
hacker's made net named PetNet. This net contais few control codes,and one
of them is chr$(255). I did make a program for this net, and it should work
perfectly, but then I found out that AmigaBASIC does some mistakes with
serial line. When I called to HUB, everything was correct but then HUB
sended that chr$(255). My net program searches if there is any character
in buffer with LOC. And LOC said that there was. Then, net program tried to
get one with INPUT$(1,1) (serial channel was #1) and there was't any ! I
started to search reason for this weird thing and I found out that if another
computer sends chr$(255) or chr(19) (chr$(19) is HOME in C-64!!!) then 
AmigaBASIC's LOC shows that there is a charter but when you try to get it
from buffer, there is nothing. And basic start to wait a chr$(17). I'm not
sure, but I think that it's the only character that wakes AmigaBASIC up
again. This is very strange and I will be very greatful if somebody would
reply to this message. Has the new version of Amigabasic come out yet?

And here is an example that shows how I open serial line in net program and 
how I get a character from buffer:
Opening:
OPEN"com1:2400,n,8,1" as 1
and getting a charter:
Label
IF LOC(1)=1 THEN A$=INPUT$(1,1) ELSE Label

---------
-- 
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
 Pasi Ojala       Pasbox v2.6     Why does my signature keep changing??
 po87553@tut.fi   C64 forever     Am I doing something wrong?
<><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>