PIC asm : how to get indirect bit value ?

Status
Not open for further replies.

tgq

Full Member level 5
Joined
Jul 15, 2002
Messages
289
Helped
7
Reputation
14
Reaction score
4
Trophy points
1,298
Activity points
2,360
hi
how can I make indirect access to check a special bit ?
it will be like BTFSS Mem,BitPosition but BitPosition should be a variable from 0 to 7 representing the bit number to check
Thx
 

You can do it in various ways, but no one is quite short. For example, you can decrement the variable BitPosition in the loop while in the same time rotate Mem to the right. When BitPosition is 0, go out from the loop and test BTFSS Mem,0.

maranaza
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…