]> git.sur5r.net Git - cc65/commitdiff
More entry points for long ops that clear the high word of the lhs.
authoruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 15 Aug 2009 21:06:06 +0000 (21:06 +0000)
committeruz <uz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sat, 15 Aug 2009 21:06:06 +0000 (21:06 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@4025 b7a2c559-68d2-44c3-8de9-860c34a00d81

libsrc/runtime/land.s
libsrc/runtime/lor.s
libsrc/runtime/ludiv.s
libsrc/runtime/lxor.s

index 1ee2a296dd816851f19eb8550801c2383ee96add..1e66039e2af25b14ac73a865921acaa04ca6adca 100644 (file)
@@ -4,10 +4,16 @@
 ; CC65 runtime: and on longs
 ;
 
-       .export         tosandeax
+       .export         tosand0ax, tosandeax
        .import         addysp1
        .importzp       sp, sreg, tmp1
 
+                                   
+tosand0ax:
+        ldy     #$00
+        sty     sreg
+        sty     sreg+1
+
 tosandeax:
                ldy     #0
                and     (sp),y          ; byte 0
index 62051a2115e97105942ecd2152d97c9ce2b7ca36..841154b1dd0bf8b48c1c5b8c19d8996f80373392 100644 (file)
@@ -4,9 +4,15 @@
 ; CC65 runtime: or on longs
 ;
 
-       .export         tosoreax
+       .export         tosor0ax, tosoreax
        .import         addysp1
        .importzp       sp, sreg, tmp1
+                                  
+
+tosor0ax:
+        ldy     #$00
+        sty     sreg
+        sty     sreg+1 
 
 tosoreax:
                ldy     #0
index 8b9ea98e9e3ba7d909d09be4c332752137f548b6..aa40a962063dc3660d6681a0f5b97ab1eee96261 100644 (file)
@@ -4,11 +4,16 @@
 ; CC65 runtime: division for long unsigned ints
 ;
 
-               .export         tosudiveax, getlop, udiv32
+               .export         tosudiv0ax, tosudiveax, getlop, udiv32
        .import         addysp1
        .importzp       sp, sreg, tmp3, tmp4, ptr1, ptr2, ptr3, ptr4
 
-tosudiveax:
+tosudiv0ax:
+        ldy     #$00
+        sty     sreg
+        sty     sreg+1
+
+tosudiveax:                         
        jsr     getlop          ; Get the paramameters
        jsr     udiv32          ; Do the division
        lda     ptr1            ; Result is in ptr1:sreg
index f772ebb899a13f09150813e9d1adf6fe64749f38..46086fbc4853c2135bf920293e67a994d8be4a8d 100644 (file)
@@ -4,11 +4,16 @@
 ; CC65 runtime: xor on longs
 ;
 
-       .export         tosxoreax
+       .export         tosxor0ax, tosxoreax
        .import         addysp1
        .importzp       sp, sreg, tmp1
 
-tosxoreax:
+tosxor0ax:
+        ldy     #$00
+        sty     sreg
+        sty     sreg+1
+
+tosxoreax:                         
                ldy     #0
                eor     (sp),y          ; byte 0
        sta     tmp1