cancel
Showing results for 
Search instead for 
Did you mean: 

Overflowing variable during operation

kane
Associate II
Posted on February 10, 2004 at 16:26

Overflowing variable during operation

2 REPLIES 2
kane
Associate II
Posted on February 10, 2004 at 13:21

I have a signed 8 bit binary value... what happens if I add it to the acumulator and the value exceeds +127 or -128?

sjo
Associate II
Posted on February 10, 2004 at 16:26

The N or H flag in the CC register would be set depending on negative/postive result. Z and C flags are also affected by an add instruction.

Have a look at the ST7 instruction help file for further details.

Why not load the code into STVD7 and see the results.

Regards

sjo

[ This message was edited by: sjo on 10-02-2004 20:57 ]