Got Telnet working on the QL!
All you need is an emulator with a TCP/IP stack (QPC2 will do), my QLTERM terminal program and this little SuperBASIC code:
Code: Select all
2000 DEFine PROCedure telnet(host$)
2010 LOCal chan
2020 chan=FOP_IN("tcp_"&host$&":23")
2030 IF chan<0:PRINT#0;"Could not open a session to ";host$;": ";:REPORT#0:RETurn
2040 BPUT#chan;255,253,1: REMark "DO ECHO"
2045 BPUT#chan;255,253,0: REMark "DO BINARY TRANSMISSION"
2047 BPUT#chan;255,251,0: REMark "WILL BINARY TRANSMISSION"
2050 EW win1_qlterm,#chan
2060 CLOSE#chan
2070 END DEFine telnet
The SuperBASIC code does some of the initial handshake so the server thinks it's a real Telnet terminal, and then starts QLTERM with redirected in/output. If you know any other terminal program that allows for redirection of the serial channel, you can probably use that. I've tried it with QTPI and got the initial logon screen, but then QTPI locks up unfortunately
So far I've been unable to download something this way as this needs an 8-bit clear connection, and Telnet needs to escape some characters (it uses CHR$(255) as control code). Since QLTERM only supports Xmodem this wouldn't be much fun anyway
I still have the ASM source of QLTERM so I could get this fixed probably, and perhaps add some nice features too

. Interestingly, most of the code in QLTERM deals with the funny hardware used in the '80s, like the Modaptor and QL Modem from Miracle Systems (which needed special I/O treatment for 1200/75 'Prestel' speed) and there is even a separate process that tries to read from the SER port as fast as possible and put the data in a bigger queue so the SER port wouldn't overrun! (of course this was in pre-Hermes days).
QLTERM does IBM graphics and ANSI colours (even 8 colours on 512x256 which weren't available on native QLs!) so you can use it safely with PC-based BBs.
later, Jan.