summaryrefslogtreecommitdiff
path: root/home/math.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/math.asm')
-rw-r--r--home/math.asm11
1 files changed, 11 insertions, 0 deletions
diff --git a/home/math.asm b/home/math.asm
index 8e19e0412..c320fd15c 100644
--- a/home/math.asm
+++ b/home/math.asm
@@ -1,3 +1,14 @@
+AddNTimes:: ; 0x30fe
+; Add bc * a to hl.
+ and a
+ ret z
+.loop
+ add hl, bc
+ dec a
+ jr nz, .loop
+ ret
+; 0x3105
+
SimpleMultiply:: ; 3105
; Return a * c.
and a