mirror of
https://github.com/irmen/prog8.git
synced 2024-09-10 09:54:32 +00:00
save a cycle
This commit is contained in:
parent
28bf0b61ce
commit
cfea8b3745
@ -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 {
|
asmsub log2(ubyte value @A) -> ubyte @Y {
|
||||||
%asm {{
|
%asm {{
|
||||||
ldy #$80
|
sta P8ZP_SCRATCH_B1
|
||||||
sty P8ZP_SCRATCH_B1
|
lda #$80
|
||||||
ldy #7
|
ldy #7
|
||||||
- bit P8ZP_SCRATCH_B1
|
- bit P8ZP_SCRATCH_B1
|
||||||
beq +
|
beq +
|
||||||
@ -109,7 +109,7 @@ _sinecosR8 .char trunc(127.0 * sin(range(180+45) * rad(360.0/180.0)))
|
|||||||
+ dey
|
+ dey
|
||||||
bne +
|
bne +
|
||||||
rts
|
rts
|
||||||
+ lsr P8ZP_SCRATCH_B1
|
+ lsr a
|
||||||
bne -
|
bne -
|
||||||
}}
|
}}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user