Acorn Computers BBC Micro Model B w/8271 — Acorn BBC Micro Model B w/8271 User Guide Manual PDF

433 256 ‘pages’ each of 256 bytes. Page 0 extends from location 0 to location 255 (ie any address with the two most significant bytes set to zero), hence the addressing mode exemplified above is known as ‘zero page addressing’. The assembler will automatically select zero page addressing mode (if appropriate) when the address supplied is less than &100 (decimal 256). Absolute addressing This addressing mode is very similar to zero page addressing, except that any address in memory can be specified. For example, LDA &3456 would load the accumulator with the contents of memory location &3456, LDA 8200 would load the accumulator with the contents of memory location 8200.

Indirect addressing This addressing mode uses an address which is stored in memory. Only two assembly language mnemonics use this mode, ADC and JMP . For example, JMP (&2010) means ‘jump to the location whose address is held in &2010 (least significant byte) and &2011 (most significant byte)’. Note that indirect addressing is indicated to the assembler by enclosing the address in brackets. Indexed addressing This addressing mode exists in several forms, all of which share the common feature that two addresses are given: a base address and an offset, or index. An example is shown below: LDA &1F00,X This means ‘load the accumulator from the value held at &1F00+X’.

X is used here as the index register; Y could be used in the same way. This form of indexed addressing is known as absolute indexed addressing. Note that X (or Y) must be in the range 0-255. Zero page, X indexed addressing is similar except that the base address must be in page zero. For example, means ‘load the Y register with the contents of (&74+X)’ LDY &74,X The assembler automatically uses this mode, if available, if a page zero address is specified in the operand field. Note that the offset must be supplied in the X register, except for the LDX mnemonic when the Y register can (and must) be used. Note that the sum of the base address plus the offset in this mode will