Pages 18 to 20 - Incorrect Jumps

Problem:
Listings 2.3 to 2.6 all end with the three lines:
DECFSZ COUNT ;Is it the end?
RETURN ;Yes
GOTO LOOP ;No

The problem is that the Yes and No are the wrong way round.
Solution:
Change the lines to read:
DECFSZ COUNT ;Is it the end?
GOTO LOOP ;No
RETURN ;Yes

Additional information:
It should also be noted that the terms 'A', 'B' and 'RESULT' are descriptions only. You should replace these terms with the numbers of the actual registers that you intend to use.

Further information:
I hope that this page helps you with your projects but if you have found any other problems or if you have any further questions please contact me though the email address of gares-AT-g4aym-DOT-org-DOT-uk.

Sorry about the email address but it seems to be the only way to avoid the spammers



Click here to return to the PIC Basics Main Page

Click here for the Index of Errors and Ommissions