From 7f57ba6f0646457eb784f7c6bf3e328e86eeabd0 Mon Sep 17 00:00:00 2001 From: mgcaret Date: Fri, 3 Jan 2020 19:41:25 -0800 Subject: [PATCH] resolve #4, h/t ksherlock --- asm/mathlib.s | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/asm/mathlib.s b/asm/mathlib.s index ea03cff..342862b 100644 --- a/asm/mathlib.s +++ b/asm/mathlib.s @@ -8,14 +8,9 @@ lda STACKBASE+6,x eor STACKBASE+2,x bpl samesign - lda STACKBASE+4,x - cmp STACKBASE+0,x - lda STACKBASE+6,x - sbc STACKBASE+2,x - bvs :+ - eor #$8000 -: sec ; make sure we don't set Z - rol ; move comparison into carry + lda STACKBASE+2,x ; Kelvin's excellent solution + sec + rol rts samesign: lda STACKBASE+6,x cmp STACKBASE+2,x