Abs_a_b ($F584)

This routine returns the absolute value of the two single byte numbers passed in the A and B registers.

There is a special case: 0x80 is returned as 0x7F.

 

ENTRY:

A-reg contains first value

B-reg contains second value (Abs_a_b only)

EXIT:

A-reg contains absolute value of first value

B-reg contains absolute value of second value (Abs_a_b only)

All other registers preserved.

Source