[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: BASIC to TeXT



In article <4qn9gk$l4n@blackice.winternet.com>,
Nathan Mates <nathan@parka.winternet.com> wrote:
>In article <4qn3qq$njf@texas.nwlink.com>,
>Damon Isaacson <cat@nwlink.com> wrote:
>>I wondering if there is a program that will take a BASIC file and print
>>out a listing into a text file? I think I've seen it on here a few months
>>ago. Thanx!
>
>   Try this. Replace 'LISTING.TXT' with whatever file name you want
>it to go to.
>
>1 POKE 33,33: PRINT CHR$(4)"OPEN LISTING.TXT":PRINT CHR$(4)"WRITE LISTING.TXT":
>  LIST 2-65000:PRINT CHR$(4)"CLOSE":TEXT:END
>
>   [That's all one line of code; only hit return after the 'END']
>
>   Once typed in, just 'RUN' it and the listing will be written out.
>That program works only for Applesoft BASIC programs; if you want to
>write out Integer Basic programs, remove the 'CHR$(4)' from each of
>the 3 PRINT statements, and replace it with a control-D after the
>opening " of each print statement.

>Nathan Mates

The following is more generic in that you do not have to change it for
each file you want to save. It is the result of a large amount of
feedback from other experts on the net. If someone has a "better"
version I (and others), would love to see it so it can become the
'standard'. 

The following is one line and "?" is an alias for: PRINT

0 PRINT CHR$(21): TEXT:HOME:D$ = CHR$ (4):INPUT "File Name?";A$: PRINT
D$"OPEN"A$: PRINT D$"WRITE"A$: POKE 33,33:LIST 1- : PRINT
D$"CLOSE":TEXT:END

Kind Regards,
-- 
	Joe Walters:  bird@mcs.com or J.L.Walters@genie.com
	The sound of your horn is far sweeter if blown by somebody else.