16 bit count down - PIC16

From: Mauritz Geyser (mauritzg_at_iafrica.com)
Date: 07/10/04


Date: Sat, 10 Jul 2004 10:55:52 +0200

Hi

Can someone please help me with the asm code for a 16-bit count down loop
for a PIC16 processor.

The following code does not count down properly. It exits the loop when both
0Ch and 0Dh are 1.

            movlw h'FF'
            movwf 0Ch
           movwf 0Dh
loop decfsz 0Ch
           goto loop
           decfsz 0Dh
           goto loop
           return

Thanks

Mauritz