English
Language : 

DS80C320-MCG Datasheet, PDF (65/175 Pages) Dallas Semiconductor – High-Speed Microcontroller User Guide
High-Speed Microcontroller User’s Guide
Register Indirect with Displacement
Register Indirect Addressing with Displacement is used to access data in lookup tables in program
memory space. The location is created using a base address with an index. The base address can be
either the PC or the DPTR. The index is the accumulator. The result is stored in the accumulator. An
example is as follows.
MOVC
A, @A +DPTR
;Load the accumulator with the contents
of program memory
;pointed to by the contents of the DPTR
plus the value in
;the accumulator.
Relative Addressing
Relative Addressing is used to determine a destination address for Conditional branch. Each of these
instructions includes an 8-bit value that contains a two’s complement address offset (–127 to +128) which
is added to the PC to determine the destination address. This destination is branched to when the tested
condition is true. The PC points to the program memory location immediately following the branch
instruction when the offset is added. If the tested condition is not true, the next instruction is performed.
An example is as follows.
JZ
$–20
;Branch to the location (PC+2)–20
;if the contents of the accumulator = 0.
Page Addressing
Page Addressing is used by the Branching instructions to specify a destination address within the same
2KB block as the next contiguous instruction. The full 16-bit address is calculated by taking the five
highest order bits for the next instruction (PC+2) and concatenating them with the lowest order 11 bit
field contained in the current instruction. An example is as follows.
0870h
ACALL100h ;Call to the subroutine at address 100h
plus the
;current page address.
In this example, the current page address is 800h, so the destination address is 900h.
Extended Addressing
Extended Addressing is used by the Branching instructions to specify a 16-bit destination address within
the 64KB address space. The destination address is fixed in software as an absolute value. An example
is as follows.
LJMP
0F732h ;Jump to address 0F732h.
65 of 175