gnusim8085-devel team mailing list archive
-
gnusim8085-devel team
-
Mailing list archive
-
Message #00462
[Question #272247]: Some problems with AC Flag
New question #272247 on gnusim8085:
https://answers.launchpad.net/gnusim8085/+question/272247
I've written the following code:
mvi a, 08h
;sui 01h
dcr a
hlt
Now,
08h => 0000 1000
"sui 01h" OR "dcr" must be adding 2's Complement of 1h => 1111 1111 to 08h => 0000 1000
1 // Auxiliary Carry happens to be there
0000 1000
(+) 1111 1111
----------------------
1/ 0000 0111 // A Carry is also generated
But it is not reflected in the Flags:
S = 0
Z = 0
AC = 0
P = 0
C = 0
Can anyone please explain ? Thanks in advance..
--
You received this question notification because your team GNUSim8085
developers is an answer contact for gnusim8085.