UM012811-0904
eZ8 CPU Instruction Set Description
eZ8 CPU
User Manual
79
Flags
Attributes
Examples
•
If Working Register R7 contains the value
20H
(00100000B), the BTJNZ instruction
that begins the following code segment:
causes a Program Counter jump to occur because bit 5 of Working Register R7 passes
the test for a 1. The next instruction executed after the BTJNZ is the LD instruction.
The eZ8 CPU assembler automatically calculates the desired displacement value of
01H
, allowing 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 BTJNZ 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
BTJNZ
bit, r2, DA
F6
{1B, bit, r2}
X
—
BTJNZ
bit, @r2, DA
F7
{1B, bit, r2}
X
—
Assembly Code
Object Code
BTJNZ 5, r7, NEXT
F6 D7 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