home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1985 December
/
Ahoy_Magazine_85-12_1985_Double_L.d64
/
commhs
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
501b
|
20 lines
0 rem << commhs - handshake with ibm
1 rem - commodore program -
2 rem -- commhs --
3 rem rupert report #24
4 rem the ibm connection
5 rem
9 rem 1200 baud, 8 bits/chr, 1 stop bit, no parity
10 open 2,2,0,chr$(8)+chr$(0)
20 cr$=chr$(13)
25 rem clear the receive buffer
30 get#2,r$ : if st<>8 or st<>0 then 30
35 rem =-= main loop =-=
40 get#2,r$ : if r$="" then 40
50 m$=m$+r$
60 print r$;: if r$=cr$ then gosub 80
70 goto 40
75 rem - transmit handshake message -
80 t$="message #"+str$(val(m$))+" received"
90 print#2,t$ : m$="" : return