By pure chance I found this very interesting and informative web page: http://www.users.globalnet.co.uk/~jg27p ... ntents.htm
While scanning through the hints, tips and magic of (often) ZX BASIC mircales I stumbled across this little gem for the ZX Spectrum +3: CAT2String.BAS
Code: Select all
2 DEF FN p(a)=PEEK a+256*PEEK (a+1)
20 LET k1=0: LET k2=0: FOR a=0 TO 0: NEXT a
21 DIM s$(200): POKE FN p(23631)+5,129: POKE FN p(23631)+6,15:
LET k1=FN p(23643): CAT : LET k2=FN p(23643):
POKE FN p(23631)+5,244: POKE FN p(23631)+6,9:
FOR a=k1 TO k2-1: LET s$(a-k1+1)=CHR$ PEEK a: NEXT a:
PRINT s$(TO a-k1)
22 PAUSE 0: RANDOMIZE USR 5808: GO TO 21
I must admit I'm not really a pro when it comes to CHANNELS and STREAMS (and the corresponding system variable areas)...