Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to autostart a program from floppy disk on a Commodore c64

Tags:

c64

autorun

Good news, my c64 ist still running after lots of years spending time on my attic..
But what I always wanted to know is:

How can I automatically load & run a program from a floppy disk that is already inserted
when I switch on the c64?

Some auto-running command like load "*",8,1 would be adequate...

Regards
MoC

like image 550
Master of Celebration Avatar asked Dec 03 '10 09:12

Master of Celebration


1 Answers

You write that a command that you type in, like LOAD"*",8,1 would be adequate. Can I assume, then, that the only problem with that particular command is that it only loads, but doesn't automatically run, the program? If so, you have a number of solutions:

  1. If it's a machine language program, then you should type LOAD"<FILENAME>",8,1: and then (without pressing <RETURN>) press <SHIFT>+<RUN/STOP>.

  2. If it's a BASIC program, type LOAD"<FILENAME>",8: and then (without pressing <RETURN>) press <SHIFT>+<RUN/STOP>.

  3. It is possible to write a BASIC program such that it automatically runs when you load it with LOAD"<FILENAME>",8,1. To do so, first add the following line to the beginning of your program:

    0 POKE770,131:POKE771,164
    

    Then issue the following commands to save the program:

    PRINT"{CLR}":POKE770,113:POKE771,168:POKE43,0;POKE44,3:POKE157,0:SAVE"<FILENAME>",8
    
like image 77
Psychonaut Avatar answered Oct 28 '22 00:10

Psychonaut