1
0
mirror of https://github.com/cc65/cc65.git synced 2025-03-01 11:29:27 +00:00

Optimize deceaxy.

This commit is contained in:
Piotr Fusik 2018-03-07 20:45:50 +01:00
parent 223750cde9
commit a32c50a6bc

View File

@ -1,5 +1,6 @@
; ;
; Ullrich von Bassewitz, 29.12.1999 ; Piotr Fusik, 07.03.2018
; originally by Ullrich von Bassewitz
; ;
; CC65 runtime: Decrement eax by value in Y ; CC65 runtime: Decrement eax by value in Y
; ;
@ -11,16 +12,13 @@ deceaxy:
sty tmp1 sty tmp1
sec sec
sbc tmp1 sbc tmp1
sta tmp1 bcs @L9
txa dex
sbc #0 cpx #$ff
tax bne @L9
lda sreg dec sreg
sbc #0 cpx sreg
sta sreg bne @L9
lda sreg+1 dec sreg+1
sbc #0 @L9: rts
sta sreg+1
lda tmp1
rts