Consider the two following ways to implement a loop that will execute 10 times:
ID: 1796781 • Letter: C
Question
Consider the two following ways to implement a loop that will execute 10 times:
A)
movlw 10
movwf loop counter
loop:
...
decf loop counter,f
btfss STATUS,Z
goto loop
B)
movlw 10
movwf loop counter
loop:
...
decfsz loop counter
goto loop
Evaluate each of the methods by giving the number of bytes of instructions the two methods differ by and the number of clocks the two methods will differ by (if any).
Explanation / Answer
the two methods are same they have same nuber of bytes of instruction