aboutsummaryrefslogtreecommitdiffstats
path: root/atk16_asm/builtin_asm/std_math.atk16
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2024-05-17 12:17:34 +0300
committerJan Tuomi <jan@jantuomi.fi>2024-05-17 12:17:34 +0300
commitd433a9f0cdddd27b0aaae88aca8e8f909fc14a13 (patch)
tree92abd92228eca9d948c2b0acc88a4603f59c1c5e /atk16_asm/builtin_asm/std_math.atk16
parent853918f4b7e9f3724be4d71014689c18c28fe61e (diff)
Add call macro, *_p subroutine naming convention
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)