Minor optimization

git-svn-id: svn://svn.cc65.org/cc65/trunk@46 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2000-06-10 16:05:59 +00:00
parent 66e7d9cd1b
commit 6481395a94
1 changed files with 12 additions and 11 deletions

View File

@ -6,17 +6,18 @@
.export bnegeax
.import return0, return1
.importzp sreg
.importzp sreg, tmp1
bnegeax:
cmp #0
bne L1
cpx #0
bne L1
lda sreg
bne L1
lda sreg+1
bne L1
jmp return1
L1: jmp return0
stx tmp1
ldx #0 ; High byte of result
ora tmp1
ora sreg
ora sreg+1
bne @L0
lda #1
rts
@L0: txa ; X is zero
rts