debjitbis08 / sim8085

Online 8085 simulator
https://www.sim8085.com
BSD 3-Clause "New" or "Revised" License
108 stars 39 forks source link

Auxillary Carry #50

Closed amanat-2003 closed 1 month ago

amanat-2003 commented 2 years ago

Auxillary Carry not working properly when INR, DCR, ADI is used

Hardik-Ahi commented 1 year ago

The CMP instruction too seems to be wrongly setting the auxiliary carry flag when it should not be set.

Consider the attached example program that converts a given decimal number to hexadecimal. Take the input value as '15', so the output should be '0F'. But it shows '35'.

Upon tracing, I found that for the operation (05 - 15) it is setting the auxiliary carry flag to 1, whereas it should be 0, because this operation does not require any borrow from the higher nibble.

decimal-to-hex.txt

debjitbis08 commented 1 month ago

Fixed.

github-actions[bot] commented 4 days ago

:tada: This issue has been resolved in version 2.1.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: