beamrider wrote:How is the auto-start inhibited?
The header of the first part is of type 3 and this forces the load address: here, $0300. $0302..$0303 are also written to and when the BASIC interpreter returns to the direct mode prompt, this is vectored over $0302. Control is handled over to a routine at $0351 which got put in the tape buffer with an over-length file name.
Now MINIMON has an own command line prompt, and this prompt is not vectored over $0302. After executing the L command, MINIMON thus simply returns to its prompt. Of course the vector *has* been changed and when I return to BASIC with X, without further preparations, the autostart would still commence.
Do you force load at a different location?
In this case, this was not needed, but there are other autostart techniques (overwriting the vector of CHROUT, for example), which make that necessary.
It is possible to just load the header of the file, analyse it, *change* the forced load address to point to somewhere else, then load the payload to there, and analyse the payload at a safe place. The two calls have been pointed out by carlsson here (
link):
carlsson wrote:On the topic of loading, here are another few calls that are not useful for programming, but for .. eh, getting the most out of tape files, if you see what I mean.
SYS 63407 = Reads from tape until the header of a program is found
SYS 62980 = Reads the rest of the program
It means after the first call, one can modify the contents of the tape buffer to make the program load into another address (prevent auto start etc) and then check what the program does.
I found these calls from a computer magazine in 1990, telling its readers how to hack C64 tapes (or rather, "find hidden messages"). On the C64, the SYSes are 63276 and 62828, so slightly different position than on the VIC.
...
beamrider wrote:... and I'm wondering , if it is possible to save from one memory area but substitute a different load-address to the header so that it loads elsewhere when loading back in.
You can force the load address on tape, but AFAIK the code needs to be saved from that place already. In most cases you should be able to put the data at the place, do the save, and if necessary, restore the original data.
With disk, it is rather easy to write a PRG file with an arbitrary load address: just do an OPEN "...,P,W" and write the first two bytes as you want. Perhaps a two-step procedure akin to the two SYSes above could do the same for tape (i.e. writing a manipulated header), but that is something I did not investigate thus far.