summaryrefslogtreecommitdiff
path: root/home/math.asm
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2015-08-17 11:58:57 -0400
committeryenatch <yenatch@gmail.com>2015-08-17 11:58:57 -0400
commit3cd79c55a3e1b50c8a71ad76692342e52382c700 (patch)
tree32a9feb55a0eadc24c4690cef4fd0d26b2032f00 /home/math.asm
parent9974a2c7014cbe7db3d0e516580fea48001ab3df (diff)
parent4831b4429eab57f56cce4736b6930a54f07314f7 (diff)
Merge pull request #309 from PikalaxALT/master
Wild data, save functions, fix missing include
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