if you look at the i'm stumped' thread below it should be explained, but its basically a 6 bit imnput i need to compaire to 31 possibilities, and when a match is found it exists the loop. im using pbasic and basically if i cant figure out how to do this small bit of my project in the next hour im gunna bugger up my degree. so im really desperate and i dont know what to do.
the task is alot simpler than it seems below, i literally just need to compaire 2 values, if they are equal goto a routine, if not carry on till the end of the loop
You can compare with basic logic functions.You can xor the two values or you can substract the value & can make decision according to your status bit.
Code:
check1 movf Value,W ;get the new value
xorwf FixValue,W ;xor with the fix value
btfss STATUS,Z ;has the zero bit set?
retlw 00 ;no,then return
movf Value,W ;yes,both are equal then return with W
return