From 1d9a68dbdd0132035f1fc7b7ea8f7fdc24741507 Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sun, 24 Jun 2018 16:09:41 +0200 Subject: Remove all address comments --- engine/math/get_square_root.asm | 4 ++-- engine/math/math.asm | 6 ++---- engine/math/print_num.asm | 10 +++++----- engine/math/sine.asm | 2 +- 4 files changed, 10 insertions(+), 12 deletions(-) (limited to 'engine/math') diff --git a/engine/math/get_square_root.asm b/engine/math/get_square_root.asm index 412fd04ff..6791fd7b8 100644 --- a/engine/math/get_square_root.asm +++ b/engine/math/get_square_root.asm @@ -1,6 +1,6 @@ NUM_SQUARE_ROOTS EQU 255 -GetSquareRoot: ; 13b87 +GetSquareRoot: ; Return the square root of de in b. ; Rather than calculating the result, we take the index of the @@ -24,7 +24,7 @@ GetSquareRoot: ; 13b87 jr c, .loop ret -.Squares: ; 13b98 +.Squares: x = 1 rept NUM_SQUARE_ROOTS dw x * x diff --git a/engine/math/math.asm b/engine/math/math.asm index 0cd6b0b47..4240ef6cd 100644 --- a/engine/math/math.asm +++ b/engine/math/math.asm @@ -1,4 +1,4 @@ -_Multiply:: ; 66de +_Multiply:: ; hMultiplier is one byte. ld a, 8 @@ -82,10 +82,9 @@ _Multiply:: ; 66de ld [hProduct + 0], a ret -; 673e -_Divide:: ; 673e +_Divide:: xor a ld [hMathBuffer + 0], a ld [hMathBuffer + 1], a @@ -193,4 +192,3 @@ _Divide:: ; 673e ld [hDividend + 0], a ret -; 67c1 diff --git a/engine/math/print_num.asm b/engine/math/print_num.asm index fec798d5c..c8899be6c 100644 --- a/engine/math/print_num.asm +++ b/engine/math/print_num.asm @@ -1,4 +1,4 @@ -_PrintNum:: ; c4c7 +_PrintNum:: ; Print c digits of the b-byte value from de to hl. ; Allows 2 to 7 digits. For 1-digit numbers, add ; the value to char "0" instead of calling PrintNum. @@ -178,7 +178,7 @@ _PrintNum:: ; c4c7 pop bc ret -.PrintYen: ; c5ba +.PrintYen: push af ld a, [hPrintNum1] and a @@ -193,7 +193,7 @@ _PrintNum:: ; c4c7 pop af ret -.PrintDigit: ; c5cb (3:45cb) +.PrintDigit: dec e jr nz, .ok ld a, "0" @@ -278,14 +278,14 @@ _PrintNum:: ; c4c7 ld [hl], "" ret -.PrintLeadingZero: ; c644 +.PrintLeadingZero: ; prints a leading zero unless they are turned off in the flags bit 7, d ; print leading zeroes? ret z ld [hl], "0" ret -.AdvancePointer: ; c64a +.AdvancePointer: ; increments the pointer unless leading zeroes are not being printed, ; the number is left-aligned, and no nonzero digits have been printed yet bit 7, d ; print leading zeroes? diff --git a/engine/math/sine.asm b/engine/math/sine.asm index 23e86c015..c7422aaf8 100644 --- a/engine/math/sine.asm +++ b/engine/math/sine.asm @@ -1,4 +1,4 @@ -_Sine:: ; 84d9 +_Sine:: ; a = d * sin(e * pi/32) ld a, e calc_sine_wave -- cgit v1.2.3 From 67d1364c7acfd5e8e2256080e16a14cfa59a5abc Mon Sep 17 00:00:00 2001 From: Rangi Date: Sun, 24 Jun 2018 23:22:50 -0400 Subject: Fix triple newlines left over from removing address comments --- engine/math/math.asm | 4 ---- 1 file changed, 4 deletions(-) (limited to 'engine/math') diff --git a/engine/math/math.asm b/engine/math/math.asm index 4240ef6cd..21b49b589 100644 --- a/engine/math/math.asm +++ b/engine/math/math.asm @@ -11,7 +11,6 @@ _Multiply:: ld [hMathBuffer + 3], a ld [hMathBuffer + 4], a - .loop ld a, [hMultiplier] srl a @@ -46,7 +45,6 @@ _Multiply:: dec b jr z, .done - ; hMultiplicand <<= 1 ld a, [hMultiplicand + 2] @@ -67,7 +65,6 @@ _Multiply:: jr .loop - .done ld a, [hMathBuffer + 4] ld [hProduct + 3], a @@ -83,7 +80,6 @@ _Multiply:: ret - _Divide:: xor a ld [hMathBuffer + 0], a -- cgit v1.2.3 From 1caa50a6474edd3896911409d548faa0731621b7 Mon Sep 17 00:00:00 2001 From: Rangi Date: Mon, 25 Jun 2018 12:24:18 -0400 Subject: No space between labels and bodies --- engine/math/math.asm | 1 - 1 file changed, 1 deletion(-) (limited to 'engine/math') diff --git a/engine/math/math.asm b/engine/math/math.asm index 21b49b589..c2e5f70a3 100644 --- a/engine/math/math.asm +++ b/engine/math/math.asm @@ -1,5 +1,4 @@ _Multiply:: - ; hMultiplier is one byte. ld a, 8 ld b, a -- cgit v1.2.3