Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!amdahl!pacbell!pbhyd!ldcol From: ldcol@PacBell.COM (Larry D Colton) Newsgroups: comp.sys.apple Subject: Re: Apple basic to ibm conversion Message-ID: <1379@pbhyd.PacBell.COM> Date: 7 Jun 89 12:41:01 GMT References: <89157.142053DRF6@PSUVM> Reply-To: ldcol@PacBell.COM (Larry D Colton) Organization: Pacific * Bell, San Diego Lines: 39 In article <89157.142053DRF6@PSUVM> DRF6@PSUVM.BITNET writes: > > Does anybody know of a straighforward way to get apple basic files converted >to text files (ascii) so they can be transfered to an ibm pc? I have a quadram >card for reading apple disks on an ibm pc, but cannot seem to get the files >translated. I tried to simply redirect the screen output to a disk file, but >when I issue a PR# command for the disk drive, I get an message saying initiali >zing and that is it. It must be simple, but it appears I need help from some >apple gurus. This question comes up every couple of months on the net and is really quite easy to do once you know the answer. The idea is to open a text file on disk, prepare the file for writing and then list the program. Since the file is open, the LIST output will be directed to the disk file. After listing, close the file and you are done. Should you later want to get the text file converted back to a BASIC file, simple type new at the basic prompt, EXEC the file (- works in ProDOS) and then SAVE your program. A simple way to implement the above is to add a line 0 at the beginning of your program that looks like this: 0 D$ = CHR$(4): PRINT D$ "OPEN PRGM.TXT": PRINT D$ "WRITE PRGM.TXT": LIST 1-: PRINT D$ "CLOSE": END After entering this line, simply type RUN. Note that the 1- following LIST starts the listing at line one, thus omitting the temporary line that creates the text file. The END stops execution after the text file has been created. > >Thanks in advance. You're welcome. > >Dave Forsman -- Larry Colton {att,bellcore,sun,ames,pyramid}!pacbell!ldcol