Download Print this page

ZiLOG Z80380 User Manual page 31

Advertisement

Z
ILOG
4.2.6 Program Counter Relative Mode (RA) (Continued)
Before instruction execution
After instruction execution
Address calculation: In Native mode, –2 is encoded as
0FEH in the instruction, and it is sign extended to a 16-bit
value before added to the Program Counter. Calculation is
16
done in modulo 2
and does not affect the Extended
portion of the Program Counter.
2. Jump relative in Extended mode, 16-bit displacement
SETC
XM
JR
$-5000H
Before instruction execution
After instruction execution
Address calculation: Since this is a 4-byte instruction, the
PC value after fetch but before jump taking place is:
19590807
+
00000004
1959080B
The displacement portion, –5000H, is sign extended to a
32-bit value before being added to the Program Counter.
Calculation is done in modulo 2
portion of the Program Counter.
1959080B
+
FFFFB000
1958B80B
4-6
PCz
PC
0000
1000
0000
0FFE
;Put it in Extended mode of operation
;Jumps to the location
;(Current PC value) – 5000H
;$ stands for current PC value
;This instruction jumps to itself.
PCz
PC
1959
0807
1958
B80B
32
and affects the Extended
1000
+
FFFE
FFFE
Z380
U
'
M
SER
S
ANUAL
DC-8297-03

Advertisement

loading
Need help?

Need help?

Do you have a question about the Z80380 and is the answer not in the manual?

Questions and answers