>Can someone tell me if this loop really is 1000 states ?
>It appears (in the part), to run about 4x the length. Its
>intended to be a 1 second delay. I did measure the clock,
>and its actual value (on pin 15 of a C84) is about 833 Hz
>or 1.2 mS, but not off by enough to throw this whole thing
>off. What am I missing in my calculations ?
>
>
hcooper
KILLspames.com
>
>; clock is 1mS
>; total delay is 1000 states, or one second
>
>
>
>DELAY_1S ; 1 second delay
> MOVLW D'10'
> MOVWF OUTSIDE
>LD_INSIDE_1S
> MOVLW D'19'
> MOVWF INSIDE
>REPEAT_1S
> NOP ; A total of 5 states x 19 = 95
> NOP ; plus 5 states overhead = 100 states
> DECFSZ INSIDE,1 ; decrement inside loop by one
> GOTO REPEAT_1S ; and continue until zero
> DECFSZ OUTSIDE,1 ; decrement outside loop by one
> GOTO LD_INSIDE_1S ; Reload inside loop
> RETLW 0 ; else return
>
>