Steve,
Yes, you are 100% correct in the logic - that is exactly how it works. This “trick” is not in the manual but first appeared on the PicBasic List in 2002 (http://list.picbasic.com/forum/messages/4011/4739.html? ).
I remember being excited when this particular email came because it solved a problem I was having at the time. The links posted in my reply #6 above by Bruce and Melanie also clearly demonstrate this trick's use.
As I understand it, it works for all SF/GP Register locations, not just PORT bits, hence the indexed locations must be sequential like you mentioned. I always check the datasheet if I am going to use it on sequential Ports to make sure they are indeed sequential (and they always have been for the PICs I have used).
Paul




Bookmarks