Absolute and relative coding
From Wikipedia, the free encyclopedia
Absolute coding, in the context of programming, is the practice of referring to absolute addresses within code. In turn, relative coding is the practice of applying an offset to a base address to obtain a relative address.
[edit] Example
In absolute coding, an instruction might be given to make a certain change to a specific location within physical memory (such as byte 1'416'123) or a hard disk's sector (disk 3, sector 794).
In relative coding, a base address would be obtained beforehand at some point within the code (byte 1'545'516), and then an offset (such as 28 bytes) would be applied for the program to know which location to refer to (in this case, byte 1'545'544).
See: Addressing mode