2004-12-26 09:24 PM
Stupid Arithmetic Compare / Carry Flag question
2004-12-26 06:32 AM
Have a simple question that I cannot find in the ST7 programming manual or any support documentation. Does anyone know the relationship of the carry flag to the Arithmetic Compare command?
CP A,#$09 The reason I ask, is because the 6500 code I am converting uses what seems to be the same command which would be CMP #$09 The 6500 sets the carry flag if the memory (in this case the number 9) is less than or equal to the A register. From what I can tell with simple programs, it looks like ST arithmetic compare sets the Carry Flag if the memory is greater than the A register. Very confusing.2004-12-26 09:24 PM