]> git.sur5r.net Git - cc65/commitdiff
Remove value test code (no longer needed)
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 10 Jun 2000 15:48:44 +0000 (15:48 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 10 Jun 2000 15:48:44 +0000 (15:48 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@44 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/runtime/add.s

index 5d83ef9a290ce3c26f944e9a06df53512415fde5..49c7eca96f796655e4ec8774c2273f01824b3e0d 100644 (file)
@@ -8,7 +8,7 @@
 ; called a lot!
 
                .export         tosadda0, tosaddax
-       .importzp       sp, tmp1
+       .importzp       sp
 
 tosadda0:
        ldx     #0
@@ -16,7 +16,7 @@ tosaddax:
        ldy     #0
        clc
        adc     (sp),y          ; lo byte
-       sta     tmp1            ; save it
+               pha                     ; save it
        txa
        iny
        adc     (sp),y          ; hi byte
@@ -27,21 +27,6 @@ tosaddax:
        sta     sp
        bcc     L1
        inc     sp+1
-L1:    txa                     ; Test high byte
-       bmi     L2
-       bne     L3
-       lda     tmp1            ; Get low byte
-       rts
-
-; Value is negative
-
-L2:    lda     tmp1            ; Get low byte
-       ldy     #$FF            ; Force negative
-       rts
-
-; Value is positive != 0
-
-L3:    lda     tmp1            ; Get low byte
-       ldy     #1
+L1:            pla                     ; Restore low byte
        rts