diff options
Diffstat (limited to 'arm9/lib')
-rw-r--r-- | arm9/lib/include/MSL.h | 8 | ||||
-rw-r--r-- | arm9/lib/include/MSL_Common_arith.h | 8 | ||||
-rw-r--r-- | arm9/lib/src/MSL_Common_arith.c | 7 |
3 files changed, 23 insertions, 0 deletions
diff --git a/arm9/lib/include/MSL.h b/arm9/lib/include/MSL.h new file mode 100644 index 00000000..a1709bc4 --- /dev/null +++ b/arm9/lib/include/MSL.h @@ -0,0 +1,8 @@ +#ifndef MSL_H +#define MSL_H + +//include all msl files here + +#include "MSL_Common_arith.h" + +#endif //MSL_H diff --git a/arm9/lib/include/MSL_Common_arith.h b/arm9/lib/include/MSL_Common_arith.h new file mode 100644 index 00000000..3ec6bdbc --- /dev/null +++ b/arm9/lib/include/MSL_Common_arith.h @@ -0,0 +1,8 @@ +#ifndef MSL_COMMON_ARITH_H +#define MSL_COMMON_ARITH_H + +#include "nitro/types.h" + +s32 abs(s32 val); + +#endif //MSL_COMMON_ARITH_H diff --git a/arm9/lib/src/MSL_Common_arith.c b/arm9/lib/src/MSL_Common_arith.c new file mode 100644 index 00000000..d4a2e834 --- /dev/null +++ b/arm9/lib/src/MSL_Common_arith.c @@ -0,0 +1,7 @@ +#include "MSL_Common_arith.h" +#include "function_target.h" + +ARM_FUNC s32 abs(s32 val) +{ + return val < 0 ? -val : val; +} |