bitem2k New Member Jul 3, 2007 #1 Is there anyway of telling if the entire register byte is 0, instead of checking each bit individually? i,e check if all bits of a port are off. many thanks
Is there anyway of telling if the entire register byte is 0, instead of checking each bit individually? i,e check if all bits of a port are off. many thanks
Nigel Goodwin Super Moderator Most Helpful Member Jul 3, 2007 #2 Yes, various ways of doing it - probably the easiest is movf it to W, and check the zero flag.
P Pommie Well-Known Member Most Helpful Member Jul 3, 2007 #4 Another way would be to move the file into itself with mov File,F. This instruction does nothing except set the zero flag if the file is zero. Mike.
Another way would be to move the file into itself with mov File,F. This instruction does nothing except set the zero flag if the file is zero. Mike.