|
Post by mirkosoft on Sept 24, 2014 13:41:20 GMT
Hi!
Everybody knows that PRG file is always saved with 2 first address bytes for loading...
Is possible to save PRG file without these 2 bytes or with modified these bytes?
Bit modification is possible to locate file in RAM1, there's only one problem: if file is too big and these 2 values makes it not possible to fit into RAM it's not possible to save it.
Thank you for all replies.
Miro
|
|
|
Post by hydrophilic on Sept 26, 2014 7:25:51 GMT
If you use the standard/KERNAL Save routine ($ffd8) then the answer is NO... the system will always save the 2-byte start address given in the KERNAL call to $ffd8.
Another way to save a file is to call OPEN ($ffc0), and then write each byte with BSOUT ($FFD2)... this is MUCH slower, but you can set any 2-byte value (load-address) at the beginning of output.
I hope that makes sense! Do ask if any part is not clear.
|
|
|
Post by mirkosoft on Sept 26, 2014 16:19:50 GMT
Thank you Robert. Useful and clear. I do it by this way.
Miro
|
|
|
Post by gsteemso on Sept 27, 2014 23:22:03 GMT
The other way to do it is to do a Kernal SAVE and then use sector-access disk commands to set the first two bytes to whatever you like. There is no facility to load to a specific RAM configuration other than to do a chained LOAD with a little 1-block self-RUNning program that sets the correct bank configuration prior to calling the actual LOAD.
|
|