Ax2013 wrote:
#JeeK, do you happen to know what are the proper parameters when calling LIST function? It does actually work just by "jsr LIST" but there are at least Z and C flags and Reg-A involved. I'm writing SAVE and LOAD functions. I was going to use LIST cmd without screen output for SAVE and GETC (also without screen output) for LOAD. Any other ideas are welcome.
Axel.
You want to put a LIST output to a file (with something like a SAVE)? Also the reverse task with some LOAD which takes a textual LIST output?
LIST is problematic to call because it ends always in a warm start, never comes back to the caller.
On a C64 you might catch up the warm start vector $300 to get the control back after a list call.
Calling LIST similar to a call without a parameter you might use
JSR $A613 ; find first line
JSR $A6C3 ; do list from beginning
If you save the contents of $0300/$0301, let it point to your resume code before calling the above code, LIST branches
to your resume code which in turn should restore $0300/$0301 and may finally returns to the caller using a RTS.
(didn't try it, just the JSR sequence above)