|
Atari coding BBS
Re: Devpac Developer's ORG command |
Posted by: ggn
|
Dec,20.2012-11:48
|
My only source here is the Devpac 3 manual, which I quote:
"ORG <expression>
This will make the assembler generate position-dependent code and set the program counter to the given value. Normal GEMDOS programs do not need an ORG statement even if position-dependent. It is included to allow code to be generated for the ROM port or for other 68000 machines. More than one ORG statement is allowed in a source file but no padding of the file is done.
ORG should be used with great care as the binary file generated will probably not execute correctly when double-clicked, as no relocation information is written out. The binary file s the standard GEMDOS header at the front, but no relocation information.
/!\ This directive is very unlikely to make sense when assembling to memory."
So, what Devpac does is make a binary that runs at the specific address, but without any headers whatsoever. TOS doesn't have a provision to handle binaries assembled in an absolute address, so it's up to the programmer to provide a way to load and run the binary at the specified address. Traditionally either a fopen/fread/fclose/jump proggie or directly reading tracks using xbios 8 and jumping if it's a boot disk.
|
[All messages in this thread] [Start new thread]
What's the anti-troll code? That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
|