auxiliary carry and carry flags in 8085

前端 未结 1 405
清歌不尽
清歌不尽 2021-01-14 22:57

It is said that the subtraction is performed in 2\'s complement in 8085 and so the flags must be set according to the operation. However,in the figure shown, i am unable to

相关标签:
1条回答
  • 2021-01-14 23:31

    According to 8085 manual here in page 118, the operation should be set. It looks like that GNUSim8085 has a bug. GNUSim8085 had several bugs, some of which they fixed in the latest version (including the bug with the DAA instruction), but it looks like there are still more auxiliary carry related bugs. Check here for a list of bugs which I found long ago with v1.3.7

    I would recommend using gsim85 here https://gsim85.soft112.com/, as it seems that this has implemented the auxiliary carry operation correctly. This may be a bit difficult to use though.

    Also, if you do not want a simulator but want an interface like the 8085 trainer kits, have a look at Dirty8085, which I wrote around 9 ~ 10 years ago, and recently fixed the auxiliary carry update.

    0 讨论(0)
提交回复
热议问题