Changes

Jump to: navigation, search

Addressing Mode

4 bytes removed, 01:29, 11 September 2023
no edit summary
* Register - Data is read from (or written to) a register.
* Absolute - An exact memory address is specified.
* Immediate - An [[Immediate Value|immediate value]] is used used as an the argument.
* 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. This is useful for accessing arrays (where the base is the start of the array and the offset is the array index multiplied by the element size) or a device such as a memory-mapped video display (where the base is the start of the display and the offset is the character or pixel within the display). 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.

Navigation menu