If the listing in charge doesn't have any control-characters inside (as it's the case here) you can 'type in' the listing as follows, provided you have VICE available:
1. Copy and paste the listing from your browser into your favorite editor. Make sure it saves with carriage returns (i.e. ASCII 13).
2. Save it to the VICE main directory, i.e. as 'text.txt'
3. Start xvic, and drag the file into the VICE main window.
This needs some explanation: the file is still ASCII, and
will not work. But dragging the file into the main window is the easiest way to mount the surrounding directory as drive.
4. Do a hard-reset (Ctrl-Alt-R).
5. Type in this program (you should save it for later uses):
Code: Select all
63996 POKE812,238:OPEN2,8,2,"TEXT.TXT,P,R"
63997 PRINT"{CLR}";:IFST<>0THENPOKE812,239:CLOSE2:END
63998 GET#2,A$:PRINTA$;:IFA$<>CHR$(13)THEN63998
63999 PRINT"GOTO63997":POKE631,19:POKE632,13:POKE633,13:POKE198,3
6. RUN this program. It will type in 'TEXT.TXT' for you.
7. delete lines 63996 to 63999.
8. done. You can now mount a *.d64 file as usual, and save the program as real *.prg file.
One point to note are the POKE812,x commands. They disable the CLALL vector at the start, and re-enable it, when the program finishes. Otherwise the channel would be closed upon entering a new line.
The tokenizer (of course) also works with SEQ files. In that case the ',P,R' inside the OPEN commands must be replaced with ',S,R'. Finally, it can be used to reverse the effect of PETSCII LIST output to a file with:
Code: Select all
OPEN2,8,2,"TEXT,S,W":CMD2:LIST
PRINT#2:CLOSE2
except that the final 'READY.' will either lead to an '?OUT OF DATA' or '?SYNTAX' error. Just type in another 'GOTO63997' + RETURN to finish the process correctly (i.e. with restoring the CLALL vector, and closing channel #2).
Michael