UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
82
Flags
Attributes
Examples
•
If Working Register R7 contains the value
20H
(00100000B), the BTJZ instruction
that begins the following code segment:
causes a Program Counter jump to occur because bit 3 of Working Register R7 passes
the test for a 0. The next instruction executed after the BTJ is the LD instruction. The
CPU assembler automatically calculates the desired displacement value of
01H
to
allow the Program Counter to skip the one byte HALT instruction and jump to the
NEXT label that identifies the LD instruction address. The flags are unaffected.
•
If Working Register R7 contains the value
20H
(00100000B), the BTJZ instruction
that begins the following code segment:
C
Unaffected.
Z
Unaffected.
S
Unaffected.
V
Unaffected.
D
Unaffected.
H
Unaffected.
Mnemonic
Bit, Source, Address Opcode (Hex)
Operand 1
Operand 2
Operand 3
BTJZ
bit, r2, DA
F6
{1, bit, r2}
X
—
BTJZ
bit, @r2, DA
F7
{1, bit, r2}
X
—
Assembly Code
Object Code
BTJZ 3, r7, NEXT
F6 37 01
HALT
7F
NEXT:
This label is not assembled, but used by the assembler to identify
the destination address (the address of the next instruction).
LD r0, @r2
E3 02