Several SBC optimizations suggested by Piotr Fusik

git-svn-id: svn://svn.cc65.org/cc65/trunk@1121 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-11-17 11:25:12 +00:00
parent 834eff684f
commit c413c5feeb
6 changed files with 53 additions and 58 deletions

View File

@@ -2,24 +2,23 @@
; Ullrich von Bassewitz, 08.10.1998
;
; CC65 runtime: -= operator for longs on the stack
;
;
.export lsubeq0sp, lsubeqysp
.importzp sp, sreg, tmp1, tmp2
.importzp sp, sreg
lsubeq0sp:
ldy #0
lsubeqysp:
sec
sta tmp1
stx tmp2
lda (sp),y
sbc tmp1
eor #$FF
adc (sp),y
sta (sp),y
pha
pha ; Save low byte
iny
lda (sp),y
sbc tmp2
txa
eor #$FF
adc (sp),y
sta (sp),y
tax
iny