]> git.sur5r.net Git - cc65/commitdiff
Shrank Telestrat initcwd.s by 3 bytes.
authorGreg King <gregdk@users.sf.net>
Tue, 9 Jan 2018 09:48:39 +0000 (04:48 -0500)
committerGreg King <gregdk@users.sf.net>
Tue, 9 Jan 2018 09:48:39 +0000 (04:48 -0500)
Changing when a loop test is done allowed the removal of an extra STA instruction.

libsrc/telestrat/initcwd.s

index f359ebeb4bad91d80186ee7e25758beebdbef116..dc3c5325757d8bb7814011b4751d48d686a47738 100644 (file)
 
 
 initcwd:
-       
         ldx     #PWD_PTR
         BRK_TELEMON XVARS
-        
+
         sta     ptr1
         sty     ptr1+1
-        
+
         ldy     #$00
-        
-loop:        
+loop:
         lda     (ptr1),y
-        beq     done
         sta     __cwd,y
+        beq     done
         iny
         bne     loop
-       
-done:   
-        sta     __cwd,y
+
+done:
         rts