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

@@ -11,13 +11,20 @@
.import addysp1
.importzp sp, sreg
.macpack cpu
tossubeax:
ldy #0
sec
sec
eor #$FF
adc (sp),y ; byte 0
.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
pha ; Save low byte
iny
txa
eor #$FF
adc (sp),y ; byte 1