Compare to zero
Exam answer (memorize)
Section titled “Exam answer (memorize)”MOVF REGISTRO,Fmoves the register onto itself.- That updates flag Z in
STATUS. - If register = 0 → Z = 1; else Z = 0.
- Use Z, not C.
MOVF REGISTRO,FBTFSS STATUS,ZGOTO NO_ES_CEROGOTO ES_CEROWhy not C?
Section titled “Why not C?”MOVF is not subtraction. For zero compare the course uses MOVF + Z, not carry.
Non-zero literal
Section titled “Non-zero literal”For A = 5 use subtract:
MOVLW .5SUBWF A,WBTFSS STATUS,ZNext: Between registers.
Compare to zero
Based on: Clase Tema 4 y 5.pdf
0 of 0 answered
Sign in with CALETAS to sync this result across devices.
Sign in with CALETAS