diff level1/modules/dwread.asm @ 2773:ce3dba57003b lwtools-port

boot_dw now uses dwinit.asm. dwinit.asm updated for Arduino
author Boisy Pitre <boisy.pitre@nuance.com>
date Wed, 23 Jan 2013 14:54:29 -0600
parents bfe3de781ddf
children 28ed72477814
line wrap: on
line diff
--- a/level1/modules/dwread.asm	Tue Jan 22 19:14:52 2013 -0600
+++ b/level1/modules/dwread.asm	Wed Jan 23 14:54:29 2013 -0600
@@ -20,20 +20,19 @@
           IFNE ARDUINO
 * Note: this is an optimistic routine. It presumes that the server will always be there, and
 * has NO timeout fallback. It is also very short and quick.
-DWRead    clra                          ; clear Carry (no framing error)
+DWRead    clra                       ; clear Carry (no framing error)
           pshs   u,x,cc              ; preserve registers
           leau   ,x
           ldx    #$0000
-loop@     tst    $FF51                  ; check for CA1 bit (1=Arduino has byte ready)
-          bpl    loop@                  ; loop if not set
-          ldb    $FF50                  ; clear CA1 bit in status register
-          stb    ,u+                    ; save off acquired byte
-          abx                           ; update checksum
+loop@     tst    $FF51               ; check for CA1 bit (1=Arduino has byte ready)
+          bpl    loop@               ; loop if not set
+          ldb    $FF50               ; clear CA1 bit in status register
+          stb    ,u+                 ; save off acquired byte
+          abx                        ; update checksum
           leay   ,-y
           bne    loop@
-
-          leay      ,x                  ; return checksum in Y
-          puls      cc,x,u,pc        ; restore registers and return
+          leay   ,x                  ; return checksum in Y
+          puls   cc,x,u,pc           ; restore registers and return
 
           ELSE