chiark / gitweb /
add extra gp between nybbles of register readout
authorceb <ceb>
Sun, 15 May 2005 21:50:30 +0000 (21:50 +0000)
committerceb <ceb>
Sun, 15 May 2005 21:50:30 +0000 (21:50 +0000)
cebpic/morsepanic.asm

index 0b7378025248ea45c0fedc8245b530a34c86f171..e8eadeb0cf18354811af70cf001eaca8598c097d 100644 (file)
@@ -246,30 +246,37 @@ register_readout
         clrf    WREG4,0         ; clear loop counter (WREG4)
         rrncf   WREG2,1
 
+
 register_readout_loop
-        movlw   8
-        cpfslt  WREG4,0         ; if loop counter >=8 (register length), return
+        movlw          8
+        cpfslt         WREG4,0         ; if loop counter >=8 (register 
+                                       ; length), return
         return
 
-        rlncf   WREG2,1         ; top bit goes into N flag, ie Negative if 1
-        bn      register_readout_if_led_1
+        movlw          4
+        cmp_fw_ifne    WREG4,0         ; if loop counter !=4 (nybble length), 
+                                       ; skip insertion of extra black space
+       goto            not_nybble_boundary
+       call            waiting
+
+not_nybble_boundary
+        rlncf          WREG2,1         ; top bit goes into N flag, 
+                                       ; ie Negative if 1
+        bn             register_readout_if_led_1
 
 register_readout_if_led_0
-        call    led_red
-        bra     register_readout_endif_led
+        call           led_red
+        bra            register_readout_endif_led
 
 register_readout_if_led_1
-        call    led_green
+        call           led_green
 
 register_readout_endif_led
-        incf    WREG4,1,0       ; increment loop counter
-        call    waiting
-        call    led_black
-        call    waiting
-        bra     register_readout_loop
-
-
-
+        incf           WREG4,1,0       ; increment loop counter
+        call           waiting
+        call           led_black
+        call           waiting
+        bra            register_readout_loop
 
 
 ;****************************************************************************