Changes

Jump to: navigation, search

Addressing Mode

306 bytes added, 10:15, 26 September 2019
no edit summary
* Absolute - An exact memory address is specified.
* Indirect - A memory address is specified, which contains the address of the memory for reading/writing. Effectively, the argument in this addressing mode is the address of a pointer to the actual data.
* Base plus offset - An absolute or indirect memory address is specified as a base address along with a register (or immediate value) that contains an offset value. The base and offset values are added together, and the resulting address is used to read/write data. In some cases, the computed address may be written back to a register, so that as you iterate through a loop, successive data locations are accessed.* Relative - A [[Signed|signed or unsigned]] offset is added to the current [[Register#Program Counter|program counter]] to obtain a new address. This is most often used for jumps but is also used for some kinds of data access. Code that uses relative addresses can be easily relocated in memory and is therefore sometimes called position-independent code (PIC).
* Stack - Values are pushed to or popped from the [[Stack|stack]].

Navigation menu