summaryrefslogtreecommitdiff
path: root/home/math.asm
diff options
context:
space:
mode:
authorISSOtm <eldredhabert0@gmail.com>2018-06-10 14:20:59 +0200
committerISSOtm <eldredhabert0@gmail.com>2018-06-10 14:20:59 +0200
commitd89bd1ac8b1304313bae285ada7d24601cf67d09 (patch)
tree7d83ac3340a0535aa85269e7247008164f9b8d7d /home/math.asm
parentb136e995a3b22a674c44241a68365d8b1152cb8b (diff)
Merge branch 'math_etc' into 'master'
Diffstat (limited to 'home/math.asm')
-rw-r--r--home/math.asm25
1 files changed, 25 insertions, 0 deletions
diff --git a/home/math.asm b/home/math.asm
new file mode 100644
index 0000000..8b3db6f
--- /dev/null
+++ b/home/math.asm
@@ -0,0 +1,25 @@
+include "constants.asm"
+
+if DEBUG
+SECTION "Math utility functions", ROM0 [$3380]
+else
+SECTION "Math utility functions", ROM0 [$3344]
+endc
+
+Multiply::
+ push hl
+ push bc
+ callab _Multiply
+ pop bc
+ pop hl
+ ret
+
+Divide::
+ push hl
+ push de
+ push bc
+ homecall _Divide
+ pop bc
+ pop de
+ pop hl
+ ret