Let's say I have an MSP430 build segment below:
r15:
439c
Memory card:
4390: 6045 0200 9c43 6400 8844 5044 363a 0000
code:
448a: cmp #0x363a, 0x0(r15) 4490: jnz $+0x1c 4492: Code continues . . . 44ac: Jump to location
The goal is to keep the Z flag high. To do this with cmp, both src and dst must be equal. If I have 363a in memory cell r15, why does it turn out that the resulting cmp does not call the Z flag?
As a result of the experiments, I found that placing 3a36 in memory r15 actually caused the Z flag, but I donβt understand why.
If anyone could tell this, I would really appreciate it.
If you need more information, I will gladly provide it.
source share