Megalextoria
Retro computing and gaming, sci-fi books, tv and movies and other geeky stuff.

Home » Archive » net.micro » RE: Commodore autorun programs?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
RE: Commodore autorun programs? [message #73949] Sun, 26 May 2013 20:20
prindle is currently offline  prindle
Messages: 43
Registered: May 2013
Karma: 0
Member
Message-ID: <12665@sri-arpa.UUCP>
Date: Tue, 21-Aug-84 13:32:22 EDT
Article-I.D.: sri-arpa.12665
Posted: Tue Aug 21 13:32:22 1984
Date-Received: Thu, 23-Aug-84 01:25:33 EDT
Lines: 23

The best way to find out about auto-start files for the C-64 is to take one
apart;  I assume they will work the same way on the VIC:

It's really quite simple, but you must understand assembly language and the
Kernel calls necessary to do a load operation.  You write an assembly language
program assembled to start loading at $100 (the microprocessor stack).  In the
last half of the stack (approx $180-$1ff) you can put $01 or $02 in every byte.
This causes the kernel load routine to return to address $102 or $203 respec-
tively after the load is finished.  Here you put the assembly code to reset
the stack pointer to $ff, load the real program you want to run, and transfer
control to it's starting address.  Then, after you assemble this little
program, force it to load at some other address ($801 is good) so you can
save it on disk; the commodore assembler has this relocation feature, and I'm
sure others do too.  Lastly, you must use a disk utility (such as the public
domain program Disk-Doctor) to change the load address back to $100 where it
was assembled to run (the load address is in the second pair of bytes in the
first sector of the file).  Now when you say LOAD"THISPROG",8,1 it will start
running automatically, and load the real program and start it.  Same thing
works with tape, but you need a different utility to modify the load
address.  Personally, I see no advantage in auto-start programs over the 
simple LOAD"FILE",8:{shift/run/stop-key} method, unless you are trying to
make your program hard (never impossible) for others to copy.
~v
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Mitsubishi 5.25" drive query
Next Topic: Kaypro
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Dec 18 07:00:57 EST 2024

Total time taken to generate the page: 0.00265 seconds