mirror of
https://github.com/cc65/cc65.git
synced 2025-03-01 11:29:27 +00:00
Optimize deceaxy.
This commit is contained in:
parent
223750cde9
commit
a32c50a6bc
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user