The abs function

Name

abs -- 

Synopsis

#include <stdlib.h>

int abs (int j);

Description

The abs function computes the absolute value of an integer j. If the result cannot be represented, the behavior is undefined.

Returns

The abs function returns the absolute value.

Implementation Notes

The abs function is both built-in and supplied as a library function. Usually the built-in function is used, and the appropriate instructions will be generated. If the address of the abs function is taken, then the address is the address of the library function.
On the M1750, in the special case where j is -32768, fixed point overflow will be detected by the 1750 and if the corresponding interrupt is enabled the signal SIGFIXED_OVERFLOW will be raised.
The standard behavior may be modified in the run-time system file crt0.s.