basicc64commodore

How to enter commands programmatically in c64's basic?


I want to write a very simple basic program in commodore 64 that enters other basic commands.

Here's an example:
10 print"list"+chr$(13)

This prints list but doesn't hit enter.

My expectation is that I get the result of the list command.

How can I achieve this?


Solution

  • The solution is incredibly easy:

    10 list
    

    You can basically type any basic command and it will just work:

    10 print"Loading..."
    20 load"*",8,1
    

    This is actually all I needed to tinker with some small automations.