The following is a code segment to check if the error bit signal is present in register PPBase.... why is it BNZ instead of BZ? If the error bit is present and you perform ANDLW wouldn't the Z flag be lowered?
Answer :- All depends upon the status bit. Is error bit signal HIGH or LOW when error is detected? As per the code, it seems that the error status bit goes LOW when error is detected. If error signal is LOW, then use of BNZ for no_error is correct. But if error status bit sets to HIGH upon error detection, then BZ must be used for no_error condition.
Z-flag will be lowered only when overall result of an instruction is non-zero.
Dear student, please give me detail about the status bit or the PPBase register to answer clearly. Thank you.
The following is a code segment to check if the error bit signal is present in register PPBase.... why is it BNZ instead of BZ? If the error bit is present and you perform ANDLW wouldn't the Z fla...