[A83] Re: Detecting under- and overflow


[Prev][Next][Index][Thread]

[A83] Re: Detecting under- and overflow




If you're using unsigned numbers, use carry (c) or no carry (nc).  Carry
indicates that entire value overflowed.  If you're using signed numbers, use
positive (p) or negative (n).  Positive and negative indicate whether the
most significant byte (msb) is set or not.  When it's set, the value is
negative.  The msb is also called the sign byte.  You can use carry with
relative jumps, but positive and negative only with absolute jumps.

> I was wondering how I can detect an under- or overflow of a certain
> register, just like when you can detect z or nz with for example jumps.






References: