aboutsummaryrefslogtreecommitdiffstats
path: root/atk16_asm/builtin_asm/std_math.atk16
diff options
context:
space:
mode:
Diffstat (limited to 'atk16_asm/builtin_asm/std_math.atk16')
-rw-r--r--atk16_asm/builtin_asm/std_math.atk162
1 files changed, 2 insertions, 0 deletions
diff --git a/atk16_asm/builtin_asm/std_math.atk16 b/atk16_asm/builtin_asm/std_math.atk16
index 6544b32..10b90c3 100644
--- a/atk16_asm/builtin_asm/std_math.atk16
+++ b/atk16_asm/builtin_asm/std_math.atk16
@@ -1,6 +1,7 @@
@data mul_sign_mask ${2 ** 15}
@data mul_not_mask 0xFFFF
+@data mul_p mul
@label mul
; multiply a signed (a) and a signed (b)
; parameters RA = a
@@ -71,6 +72,7 @@
; Calling convention is that arguments are in registers RA..RG (max 7 arguments since RH = SP)
; and the return value is in RG (note: overwriting arg in RG)
+@data fact_p fact
@label fact
; parameters RA = n
; return RG = factorial(n)