Skip to main content
Visitor II
February 10, 2004
Question

Overflowing variable during operation

  • February 10, 2004
  • 2 replies
  • 880 views
Posted on February 10, 2004 at 16:26

Overflowing variable during operation

    This topic has been closed for replies.

    2 replies

    kaneAuthor
    Visitor II
    February 10, 2004
    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?

    Visitor II
    February 10, 2004
    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 ]