summaryrefslogtreecommitdiff
path: root/home/math.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/math.asm')
-rw-r--r--home/math.asm15
1 files changed, 5 insertions, 10 deletions
diff --git a/home/math.asm b/home/math.asm
index 6a779e378..21582b8f6 100644
--- a/home/math.asm
+++ b/home/math.asm
@@ -9,7 +9,7 @@ AddNTimes:: ; 0x30fe
ret
; 0x3105
-SimpleMultiply:: ; 3105
+SimpleMultiply::
; Return a * c.
and a
ret z
@@ -23,10 +23,9 @@ SimpleMultiply:: ; 3105
jr nz, .loop
pop bc
ret
-; 3110
-SimpleDivide:: ; 3110
+SimpleDivide::
; Divide a by c. Return quotient b and remainder a.
ld b, 0
.loop
@@ -36,10 +35,9 @@ SimpleDivide:: ; 3110
dec b
add c
ret
-; 3119
-Multiply:: ; 3119
+Multiply::
; Multiply hMultiplicand (3 bytes) by hMultiplier. Result in hProduct.
; All values are big endian.
push hl
@@ -50,10 +48,9 @@ Multiply:: ; 3119
pop bc
pop hl
ret
-; 3124
-Divide:: ; 3124
+Divide::
; Divide hDividend length b (max 4 bytes) by hDivisor. Result in hQuotient.
; All values are big endian.
push hl
@@ -64,10 +61,9 @@ Divide:: ; 3124
pop de
pop hl
ret
-; 3136
-SubtractSigned:: ; 3136
+SubtractSigned::
; Return a - b, sign in carry.
sub b
ret nc
@@ -75,4 +71,3 @@ SubtractSigned:: ; 3136
add 1
scf
ret
-; 313d