ONLINE SIDEBAR: October COMPUTE!'s Gazette "Dialed Back": CoCo FujiNet N: Device Basic Code

Gazette

Administrator
Staff member
0 ' CoCo + FujiNet "NetCat" style terminal (raw TCP via N:)
1 CLEAR 200: CLS
2 PRINT "CoCo FujiNet NetCat - press BREAK or Ctrl-] to quit"
3 HOST$="bbs.fozztexx.com" ' <--- change to your BBS host
4 PORT$="23" ' BBS port number (23 = telnet)
5 URL$="N:TCP://" + HOST$ + ":" + PORT$ + "/"
20 ON ERROR GOTO 900
30 OPEN URL$ AS #1
40 PRINT "Connected to ";HOST$;":";PORT$
60 K$=INKEY$ ' keyboard (non-blocking)
70 IF K$<>"" THEN GOSUB 300 ' send keystroke(s) to network
90 BYTES%=LOC(#1) ' bytes waiting from network?
100 IF BYTES%>0 THEN GOSUB 400 ' read and print them
110 GOTO 60
300 IF K$=CHR$(29) THEN GOTO 800 ' Ctrl-] to exit cleanly
310 IF K$=CHR$(13) THEN PRINT #1,CHR$(13); : RETURN ' Enter -> CR
320 PRINT #1,K$; : RETURN
T$(BYTES%,#1)
410 PRINT A$; ' print as-is (ANSI will display as text)
420 RETURN
800 PRINT : PRINT "Closing connection..."
820 CLOSE #1
830 PRINT "Goodbye."
840 END
900 PRINT : PRINT "Error ";ERR;" at line ";ERL
910 IF ERL>=30 AND ERL<60 THEN PRINT "Could not open: ";URL$
920 ON ERROR GOTO 0: END
 
Back
Top