Squeeze two cycles out of the abs() function
git-svn-id: svn://svn.cc65.org/cc65/trunk@2508 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
23c35f27f8
commit
3f06947b36
1 changed files with 1 additions and 2 deletions
|
@ -7,8 +7,7 @@
|
||||||
.export _abs
|
.export _abs
|
||||||
.import negax
|
.import negax
|
||||||
|
|
||||||
_abs: dex
|
_abs: cpx #$00 ; test hi byte
|
||||||
inx ; test hi byte
|
|
||||||
bpl L1
|
bpl L1
|
||||||
jmp negax ; Negate if negative
|
jmp negax ; Negate if negative
|
||||||
L1: rts
|
L1: rts
|
||||||
|
|
Loading…
Add table
Reference in a new issue