1
0
mirror of https://github.com/cc65/cc65.git synced 2024-06-15 02:29:32 +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
;
@ -11,16 +12,13 @@ deceaxy:
sty tmp1
sec
sbc tmp1
sta tmp1
txa
sbc #0
tax
lda sreg
sbc #0
sta sreg
lda sreg+1
sbc #0
sta sreg+1
lda tmp1
rts
bcs @L9
dex
cpx #$ff
bne @L9
dec sreg
cpx sreg
bne @L9
dec sreg+1
@L9: rts