movlw h'FF' movwf 0Ch movwf 0Dh loop: // Value probed here movf 0Ch, f btfsc STATUS, Z goto turnaround decf 0Ch, f goto loop
turnaround: movf 0Dh, f btfsc STATUS, Z goto exit movwf 0Ch decf 0Dh goto loop
If you place code at the "Value probed here" marker, you'll see the values
FFFF ... FF01 ... FF00 FEFF ... 0001 0000 exit
But do you really need it ? If it's to iterate a fixed number of time without using the counter value, you just need to adjust the constant. Using incfsz might be more efficient. Just place in 0C and 0D (0x10000 - number of iter).
clrf 0Ch clrf 0Dh loop: // Value probed here incfsz OCh goto loop incfsz 0Dh goto loop
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here.
All logos and trade names are the property of their respective owners.