Compare two registers
Greater than (A > B)
Section titled “Greater than (A > B)”MOVF B,WSUBWF A,WBTFSS STATUS,CGOTO A_NO_ES_MAYOR_BBTFSS STATUS,ZGOTO A_ES_MAYOR_BSummary table A − B
Section titled “Summary table A − B”| Case | C | Z |
|---|---|---|
| A = B | 1 | 1 |
| A > B | 1 | 0 |
| A < B | 0 | 0 |
Partial exam C/Z cases
Section titled “Partial exam C/Z cases”| A | B | C | Z |
|---|---|---|---|
| 10 | 10 | 1 | 1 |
| 5 | 3 | 1 | 0 |
| 2 | 7 | 0 | 0 |
REG1 > REG2 subroutine
Section titled “REG1 > REG2 subroutine” MOVF REG2,W SUBWF REG1,W BTFSS STATUS,C GOTO FIN_COMP BTFSS STATUS,Z GOTO MAYORFIN_COMP RETURNMAYOR RETURNEjercicio · Parcial
Extra cases
A=15,B=8 → C=1,Z=0. A=0,B=1 → C=0,Z=0.
Compare two registers — partial exam
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