Double check: Do NEGxx instructions set C flag from s, not from d?
jonty
Posts: 3
Hi,
Reading the manual for the NEGC, NEGNC, NEGNZ and NEGZ instructions I see that the C flag is set from the s-value used in the the instruction and not from the d-value as I first assumed. Is this correct?
Before I checked I thought that the Z and C flags would be set from the result of the operation, rather than from the source, as they are with most operations. But manual V1.01 for the NEGxx instructions says:
Have I read this correctly?
Thanks
Jonty
Reading the manual for the NEGC, NEGNC, NEGNZ and NEGZ instructions I see that the C flag is set from the s-value used in the the instruction and not from the d-value as I first assumed. Is this correct?
Before I checked I thought that the Z and C flags would be set from the result of the operation, rather than from the source, as they are with most operations. But manual V1.01 for the NEGxx instructions says:
Manual V1.01 said...
If the WZ effect is specified, the Z flag is set (1) if SValue is zero. If the WC effect is specified,
the C flag is set (1) if SValue is negative or cleared (0) if SValue is positive.
Have I read this correctly?
Thanks
Jonty
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Paul Baker
Propeller Applications Engineer
Parallax, Inc.