mirror of
https://github.com/cc65/cc65.git
synced 2024-06-08 15:29:37 +00:00
Minor optimization
git-svn-id: svn://svn.cc65.org/cc65/trunk@46 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
66e7d9cd1b
commit
6481395a94
|
@ -6,17 +6,18 @@
|
||||||
|
|
||||||
.export bnegeax
|
.export bnegeax
|
||||||
.import return0, return1
|
.import return0, return1
|
||||||
.importzp sreg
|
.importzp sreg, tmp1
|
||||||
|
|
||||||
bnegeax:
|
bnegeax:
|
||||||
cmp #0
|
stx tmp1
|
||||||
bne L1
|
ldx #0 ; High byte of result
|
||||||
cpx #0
|
ora tmp1
|
||||||
bne L1
|
ora sreg
|
||||||
lda sreg
|
ora sreg+1
|
||||||
bne L1
|
bne @L0
|
||||||
lda sreg+1
|
lda #1
|
||||||
bne L1
|
rts
|
||||||
jmp return1
|
|
||||||
L1: jmp return0
|
@L0: txa ; X is zero
|
||||||
|
rts
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user