How to produce time delays in PIC18 ASM programming?
The problem is that the decfsz instruction implicitly works on a one-byte (8-bit) register. The largest value that such a register can hold is hex FF (decimal 255). When you attempt to initialize count to decimal 1000 (hex 3E8), you're really just setting that register to the low-order 8 bits of that value, or E8 (decimal 232).

To get around this limitation of the decfsz instruction, the usual technique is to create a "nest" of two loops, each using a separate variable. This would allow you to execute the inner loop body as many as 65535 times (hex 0xFFFF).

    ; control variable for inner loop
    i equ 0

    ; control variable for outer loop
    j equ 1

    ; initialize j with the MSBs of the loop count
    movlw .1000 &gt;&gt; 8
    movwf j
    ; initialize i with the LSBs of the loop count
    movlw .1000 &amp; 0xFF
    movwf i

loop:

    ; body of loop here

    nop

    ; end of inner loop
    decfsz i
    bra loop

    ; end of outer loop
    decfsz j
    bra loop


Note that the inner loop runs the number of times i is initialized to on the first iteration of the outer loop. Every time after that, it runs 256 times.