From d433a9f0cdddd27b0aaae88aca8e8f909fc14a13 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 17 May 2024 12:17:34 +0300 Subject: Add call macro, *_p subroutine naming convention --- atk16_asm/builtin_asm/std_math.atk16 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'atk16_asm/builtin_asm/std_math.atk16') 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) -- cgit v1.3