Z
ILOG
2.
Load accumulator from location (IX-1) in Extended mode
SETC
XM
LD
A, (IX-1)
Before instruction execution
After instruction execution
Memory location
Address calculation: In Extended mode, 0FFH encoding in
the instruction is sign extended to a 32-bit value before the
address calculation, but calculation is done in modulo 2
and takes into account the index register's extended
portion.
4.2.6 Program Counter Relative Mode (RA)
The Program Counter Relative Addressing mode is used
by certain program control instructions to specify the
address of the next instruction to be executed (specifically,
the sum of the Program Counter value and the displace-
ment value is loaded into the Program Counter). Relative
addressing allows reference forward or backward from the
current Program Counter value; it is used for program
control instructions such as Jumps and Calls that access
constants in the memory.
As a displacement, an 8-bit, 16-bit, or 24-bit value can be
used. The address to be loaded into the Program Counter
is computed by adding the two's complement signed
displacement specified in the instruction to the current
Program Counter.
Also, in Native mode,
Instruction
PC
OPERATION
ADDRESS
DISPLACEMENT
Example of RA mode:
1.
Jump relative in Native mode, 8-bit displacement
JR
$-2
;Jumps to the location
;(Current PC value) – 2
;'$' represents for current PC value
;This instruction jumps to itself.
;since after the execution of this instruction,
;PC points to the next instruction.
DC-8297-03
;Set Extended mode
;Load into the accumulator the
;contents of the memory location
;whose address is one less than
;the contents of IX
A
IXz
01
0001
23
0001
0000FFFF
23
32
MEMORY
→+
OPERAND
—↑
IX
0000
0000
00010000
+
FFFFFFFF
0000FFFF
Note that computation of the effective address is affected
by the mode of operation (Native or Extended). In Native
mode, address computation is done in modulo 2
PC Extend (PC31-PC16) is forced to 0 and will not affect
this portion. In Extended mode, address computation is
32
done is modulo 2
, and will affect the contents of PC
extend if there is a carry or borrow operation.
™
Z380
U
'
M
SER
S
ANUAL
16
, and the
4-5
Need help?
Do you have a question about the Z80380 and is the answer not in the manual?
Questions and answers