Import BASIC Program

 

This feature allows you to import an Applesoft BASIC program from a text file.  The text file must contain an Applesoft program listing, with one program line per line of text file.

 

CiderPress makes no attempt to verify the correctness of the program.  It's possible to import code that can't possibly work.  (The same holds true for loading a program from a text file with the "exec" command on an Apple II.)

 

Converting BASIC to Text

 

Going the other direction -- converting a BASIC program to a text file -- is easy.  Just extract the BAS program to windows, selecting "Configure for easy access in Windows".  The conversion is automatic.  Note that you must uncheck "Prefer syntax highlighting on BASIC programs" in the file viewer preferences, or it will be saved as a .RTF file to preserve the colored text.

 

You can also just open the BASIC program in the file viewer, select the text with Ctrl-A, copy it with Ctrl-C, and then paste it into a text editor such as Windows Notepad.

 

If you want to convert a program to a text file from within an Apple II emulator, add the following lines to the start of the file:

 

1 GOTO 4

2 D$=CHR$(4) : PRINT D$"OPEN LISTING" : PRINT D$"WRITE LISTING"

3 POKE 33,33 : LIST : PRINT D$"CLOSE" : TEXT : END

4 REM CONTINUE

 

To generate a listing, delete line 1 and run the program.  The "POKE 33,33" prevents Applesoft from splitting each program line into multiple output lines.  This will work under both DOS and ProDOS.

 

It is possible for carriage returns embedded in string constants or REM statements to be lost.  Fortunately these are rare.