cbmeeks wrote:
Anyway, after spending a few hours writing some BASIC programs to test my AY, I finally had to give up and loose all of that work when I shut the computer down.
I believe the usual "convention" with BASIC programs on the Apple 1 is to reset the 6502, and then use Woz Mon to save the memory where the program is stored. A bit more information is
here.
Obviously the L-Star doesn't have a cassette interface so you can't use those instructions literally. But instead of running the apple cassette interface (ACI) code at C100, you can use Woz mon to dump the BASIC memory to the terminal. By default (as the article linked above, says) the BASIC interpreter uses $0800 to $0FFF to store BASIC programs, and you also need some housekeeping data from the zero page, so you can use a command like
004A.00FF 0800.0FFF in Woz Mon to dump all the data of the entire BASIC memory block.
Before you hit Enter on the command, you use the terminal emulator to start writing everything that's received from the serial port to a file. On TeraTerm you do this with the File>Log command. This asks for a file name and then opens a separate window (that it minimizes to the task bar) where you can see how many bytes have been written. Then you hit Enter on the terminal to execute the Woz Mon command. When the dump is done, you hit the button in the log window to stop logging, and your file contains the exact data that was shown on the terminal screen, no need for copy/paste and stuff.
When you want to load the data back into the L-Star's memory, you simply make sure that the L-Star is in the Woz monitor, and you send the log file to it. Woz Mon will interpret the data as commands, and will store the data back into memory the way it was. Then, you do a
warm start of BASIC by entering
E2B3R in Woz mon (if you do a cold start using E000R, your program will get erased instantly).
Obviously it's not very efficient to dump the entire memory if your BASIC program is short. There is probably a way to find out where the end of the BASIC program is; the BASIC interpreter probably keeps track of this somewhere in the zero page. Once you know where the last byte is, you can adapt the above command accordingly. Unfortunately I don't know at this time where to find that information. Maybe you can find some more information about Apple 1 integer BASIC that will tell you where to find that information.
For those reading along: you may wonder why you can't simply log the output of a LIST command while BASIC is running (this is what you would do on other early computers with BASIC interpreters such as Microsoft Basic, which were intended to be used with Teletypes that had punch tape readers and writers). The reason is that the LIST command in integer BASIC formats the output to look nice on a video terminal, not for a Teletype with a paper tape punch. It indents the lines and inserts spaces between the keywords. Also, it inserts line breaks to prevent breaking up keywords. All those inserted spaces and line breaks make it impossible to save the output of a LIST and use it as input for the interpreter later.
===Jac
EDIT: Even more information is at
http://jefftranter.blogspot.com/2012/03 ... grams.html