Re: LF: Program Locations


[Prev][Next][Index][Thread]

Re: LF: Program Locations



Ed, (and others!) 
Here is an excerpt from a assembly 68k book that might help:
"There are two directives for controlling the location of memory of the
assembled code.  One is ORG, which specifies a particular address for the
origin. (like first instruction).  
	ORG          1024
START     CLR.L       D3
(and so on)

will cause the assembler to produce the code assuming that it will be
placed at address 1024 onwards.  Thus the label START will have value
1024.  The assembles code will be marked with this address so that it can
be loaded at the correct position.  Code starting with ORG is called
absolute code, because its address is fixed; labels within it are said to
be absolute symbols.  A program which includes an ORG is unlikely to be
position independent, as it will contain explicit references to
particular addresses."
(taken from Time King and Brian Knight's book 'Programming the M68000)
Stephen Grigg    grigg@juno.com



On Sat, 7 Dec 1996 10:44:53 +0000 "Ed Plese, Jr." <eplese@igs1.lnd.com>
writes:
>Does anyone know a way to put a program in a fixed memory location so 
>that it doesn't move around?
>
>Thanks,
>
>-Ed
>


References: