From cfea8b3745f2a09c5beb2823b6309665c25d49df Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Fri, 1 Sep 2023 00:50:24 +0200 Subject: [PATCH] save a cycle --- compiler/res/prog8lib/math.p8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/compiler/res/prog8lib/math.p8 b/compiler/res/prog8lib/math.p8 index 50d44ddc2..190cebb66 100644 --- a/compiler/res/prog8lib/math.p8 +++ b/compiler/res/prog8lib/math.p8 @@ -100,8 +100,8 @@ _sinecosR8 .char trunc(127.0 * sin(range(180+45) * rad(360.0/180.0))) asmsub log2(ubyte value @A) -> ubyte @Y { %asm {{ - ldy #$80 - sty P8ZP_SCRATCH_B1 + sta P8ZP_SCRATCH_B1 + lda #$80 ldy #7 - bit P8ZP_SCRATCH_B1 beq + @@ -109,7 +109,7 @@ _sinecosR8 .char trunc(127.0 * sin(range(180+45) * rad(360.0/180.0))) + dey bne + rts -+ lsr P8ZP_SCRATCH_B1 ++ lsr a bne - }} }