Joseph Teno:
> Hi all.
> Right now, my code for checking if the input = code ends with
>
> subwf MEM_REG
> btfss MEM_REG, 0
> goto LIGHTSHOW
>
> I'm pretty sure this just checks to see if the leftmost bit of MEM_REG is
> set, but I want to check to see if any of them are set. Do you have any
> suggestions of how could I go about doing this? Maybe something like
>
> btfsc MEM_REG, 0
> return
> btfsc MEM_REG,1
> return
> ...(bits 2-7)
> return
> goto LIGHTSHOW
>
> for all the bits, but I'm betting there is a quicker way of doing this.
Why are you doing this? Why not just check to see if the result of the
subtraction was 0 by using the Z bit in the STATUS register?
-Robert Dick-
Received on Sun May 25 22:37:07 2008
This archive was generated by hypermail 2.1.8 : Sat Aug 23 2008 - 21:08:11 CDT