gnusim8085-devel team mailing list archive
-
gnusim8085-devel team
-
Mailing list archive
-
Message #00325
Re: [Question #137976]: Shouldn't this code set the zero flag with CMP?
Question #137976 on gnusim8085 changed:
https://answers.launchpad.net/gnusim8085/+question/137976
Status: Open => Answered
Debjit Biswas proposed the following answer:
Hi,
Per my understanding, this what your code does,
;store 0dh in register A
mvi a, 0dh
;store the value stored in A into memory location 8000h
sta 08000h
;Load 8000h into BC
lxi b, 08000h
;compare value of registers A and B
;register A has 0dh and B has 80h so comparison is non-zero
cmp b
hlt
Maybe you wanted to do this
MVI A, 0dh
STA 08000h
LXI H, 08000h
CMP M
HLT
--
You received this question notification because you are a member of
GNUSim8085 developers, which is an answer contact for gnusim8085.