Search results
Results from the WOW.Com Content Network
In computing, a base address is an address serving as a reference point ("base") for other addresses. Related addresses can be accessed using an addressing scheme.. Under the relative addressing scheme, to obtain an absolute address, the relevant base address is taken and an offset (aka displacement) is added to it.
An offset is not always relative to the base address of the module, for example: If you have a class and you want to retrieve the "color" attribute of this class, the offset may be 0x0100, but this offset has to be added to the offset of the class itself, not the base address. If the class' offset is 0xFF881 and the base address is 0x0A100 ...
A computer program can access an address given explicitly – in low-level programming this is usually called an absolute address, or sometimes a specific address, and is known as pointer data type in higher-level languages. But a program can also use relative address which specifies a location in relation to somewhere else (the base address).
This can easily be extended to 128, 256 or 512 KiB if the address pointed to is forced to be aligned on a half-word, word or double-word boundary (but, requiring an additional "shift left" bitwise operation—by 1, 2 or 3 bits—in order to adjust the offset by a factor of 2, 4 or 8, before its addition to the base address).
Note that this is more or less the same as base-plus-offset addressing mode, except that the offset in this case is large enough to address any memory location. Example 1 : Within a subroutine, a programmer may define a string as a local constant or a static variable .
Multiple base registers could be used, for code or for data. Such instructions require less memory because they do not have to hold a full 24, 31, 32, or 64 bit address (4 or 8 bytes), but instead a base register number (encoded in 4 bits) and a 12–bit address offset (encoded in 12 bits), requiring only two bytes.
The segment address is always added to a 16-bit offset in the instruction to yield a linear address, which is the same as physical address in this mode. For instance, the segmented address 06EFh:1234h (here the suffix "h" means hexadecimal ) has a segment selector of 06EFh, representing a segment address of 06EF0h, to which the offset is added ...
In a system using segmentation, computer memory addresses consist of a segment id and an offset within the segment. [3] A hardware memory management unit (MMU) is responsible for translating the segment and offset into a physical address, and for performing checks to make sure the translation can be done and that the reference to that segment and offset is permitted.