54
ImageCraft Assembly Language Guide, Document # 001-44475 Rev. *B
M8C Instruction Set
4.17
Jump if Not Zero
JNZ
If the Zero Flag is not set, jump to the address indicated by the sum of the argument and the current
PC+1
. The current PC value is defined as the PC value that corresponds to the ROM address of the
first byte of the
JNZ
instruction.
The
JNZ
instruction uses a two-byte instruction format where the lower nibble of the first byte is used
for the upper 4 bits of the 12-bit relative address. This causes an effective 4-bit opcode. Therefore,
the following are all valid opcode bytes for the
JNZ
instruction: 0xB0, 0xB1, 0xB2,..., 0xBF.
Instructions
Operation
Opcode
Cycles Bytes
Mnemonic
Argument
JNZ
expr
0xBx
5
2
Conditional
Flags:
CF
ZF
Unaffected.
Unaffected.
Example:
0000
_main:
0000
55 3C 02
[08]
mov [3Ch], 2
0003
16 3C 01
[09]
sub [3Ch], 1
;2-1=1 CF=0, ZF=0
0006
B0 02
[05]
jnz SubFun
;jump to SubFun
0008
30
[04]
halt
0009
0009
SubFun:
0009
40
[04]
nop
PC
PC 1
+
k
+
, 2048
–
k 2047
Summary of Contents for PSoC DESIGNER ImageCraft M8C
Page 6: ...6 ImageCraft Assembly Language Guide Document 001 44475 Rev B Contents Feedback ...
Page 10: ...10 ImageCraft Assembly Language Guide Document 001 44475 Rev B Introduction Feedback ...
Page 24: ...24 ImageCraft Assembly Language Guide Document 001 44475 Rev B M8C Microprocessor Feedback ...
Page 95: ...ImageCraft Assembly Language Guide Document 001 44475 Rev B 95 Assembler Directives Feedback ...
Page 96: ...96 ImageCraft Assembly Language Guide Document 001 44475 Rev B Assembler Directives Feedback ...
Page 104: ...104 ImageCraft Assembly Language Guide Document 001 44475 Rev B Feedback ...
Page 108: ...108 ImageCraft Assembly Language Guide Document 001 44475 Rev B Index Feedback ...