Page 1 of 1
PRG format for LOAD "*",8
Posted: Sat Sep 27, 2008 12:20 am
by Kweepa
Hi,
What is the format of PRG files that must be loaded with LOAD "*",8?
It seems that using the first two bytes as a start address is wrong.
Thanks!
Posted: Sat Sep 27, 2008 3:19 am
by Boray
The first two bytes are always the start address. Loading ,8,1 loads the program into that address. Loading ,8 loads it into the current basic area address instead.
Posted: Sat Sep 27, 2008 8:12 am
by Wonder-Boy
Is there an advantage to using the ,1 ? Does it matter into what area you load a program?
Posted: Sat Sep 27, 2008 9:01 am
by Mike
,<device> or ,<device>,0 always loads to the start of BASIC memory, regardless of RAM expansion in use. Pure BASIC programs should only be loaded this way.
,<device>,1 forces the LOAD command to load the PRG file at its stored loading address. Most machine code programs only work at a specified address, so this is the preferred way to load machine code.
Michael
Posted: Sun Sep 28, 2008 1:23 am
by Athlor
I though load"*",8
was for loading the first file in the directory irregardless of what it's actually named. Like what's been said above that's not really a different file format just a different form of the load command.
Posted: Sun Sep 28, 2008 9:08 am
by Kweepa
Thanks for all the responses! JarVIC can now relocate BASIC programs!
Posted: Sun Jan 18, 2009 1:46 pm
by CurtisP
Athlor wrote:I though load"*",8
was for loading the first file in the directory irregardless of what it's actually named. Like what's been said above that's not really a different file format just a different form of the load command.
The "*" actually tells the disk drive to load the last program loaded from disk. If you haven't loaded one yet, then it defaults to the first one.
Posted: Sun Jan 18, 2009 4:34 pm
by MacbthPSW
CurtisP wrote:The "*" actually tells the disk drive to load the last program loaded from disk. If you haven't loaded one yet, then it defaults to the first one.
I guess we're getting even further away from the original topic, but yeah, and to force the first file to be loaded, LOAD ":*",8 (and the optional ,1 if you want to force the file to be loaded to it's original saved address)