Path: news.uiowa.edu!chi-news.cic.net!nntp.coast.net!fu-berlin.de!news.mathworks.com!news.PBI.net!samba.rahul.net!rahul.net!a2i!bug.rahul.net!rahul.net!a2i!ddsw1!news.mcs.net!not-for-mail From: bird@MCS.COM (J. L. Walters) Newsgroups: comp.sys.apple2 Subject: Re: BASIC to TeXT Date: 24 Jun 1996 21:30:42 -0500 Organization: /usr/lib/news/organi[sz]ation Lines: 40 Message-ID: <4qnj0i$4bi@Mercury.mcs.com> References: <4qn3qq$njf@texas.nwlink.com> <4qn9gk$l4n@blackice.winternet.com> NNTP-Posting-Host: mercury.mcs.com In article <4qn9gk$l4n@blackice.winternet.com>, Nathan Mates wrote: >In article <4qn3qq$njf@texas.nwlink.com>, >Damon Isaacson 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.