A few minor 65C02 optimizations.

git-svn-id: svn://svn.cc65.org/cc65/trunk@3944 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2009-02-22 15:39:19 +00:00
parent a0cd736adb
commit 3c168b4323
4 changed files with 40 additions and 16 deletions

View File

@@ -8,14 +8,21 @@
.import addysp1
.importzp sp, sreg, tmp1
.macpack cpu
; EAX = TOS + EAX
tosaddeax:
ldy #0
clc
adc (sp),y ; byte 0
clc
.if (.cpu .bitand CPU_ISET_65SC02)
adc (sp) ; 65SC02 version - saves 2 cycles
ldy #1
.else
ldy #0
adc (sp),y ; lo byte
iny
.endif
sta tmp1 ; use as temp storage
iny
txa
adc (sp),y ; byte 1
tax