← Back to team overview

gnusim8085-devel team mailing list archive

[Bug 579320] Re: CMP flags not working like SUB with signed numbers

 

Hi Debajit,

Your patch wont work for B = A condition (where Z flag must be rised).

reason: the check_and_set_flags function just uses the result passed to
it. Since you pass "a" , a temp variable whose value does not hold the
value after subtraction the zero flag wont be set.

This one is tricky as like medling around with any instruction related
errors. Thanks for the patch. I am trying to base the changes on your
idea.

If I am wrong, feel free to shoot.

Regards,
Aanjhan
PS: Patch will follow soon

-- 
CMP flags not working like SUB with signed numbers
https://bugs.launchpad.net/bugs/579320
You received this bug notification because you are a member of
GNUSim8085 developers, which is subscribed to gnusim8085.

Status in gnusim8085: New

Bug description:
MVI A,001h
MVI B,0FEh
CMP B
SUB B

flags after CMP not the same as SUB.