From 3f06947b36a77d8a2e6dd8f3a147434740866de2 Mon Sep 17 00:00:00 2001 From: cuz Date: Fri, 10 Oct 2003 17:59:00 +0000 Subject: [PATCH] Squeeze two cycles out of the abs() function git-svn-id: svn://svn.cc65.org/cc65/trunk@2508 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- libsrc/common/abs.s | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libsrc/common/abs.s b/libsrc/common/abs.s index 89161ab59..273ec1c9a 100644 --- a/libsrc/common/abs.s +++ b/libsrc/common/abs.s @@ -7,8 +7,7 @@ .export _abs .import negax -_abs: dex - inx ; test hi byte +_abs: cpx #$00 ; test hi byte bpl L1 jmp negax ; Negate if negative L1: rts -- 2.39.5