Converting Assembly to Machine Code MOVLW BCF MOVWF INCF 01 03. 5 21 21, F 110000001 01001010000011 00000010100001 Look at table 5 -1 in the handout for the machine code reference
Program Execution Ex 2. . . . . 000 D: MOVLW 05 000 E: BCF 03. 5 000 F: MOVWF 21. . . . . 0010: DECF 21, F. . . . . 0011: MOVF 21, F 0012: BTFSS 03. 2 0013: GOTO 010 int i; i = 5; do { i--; } while (i>0);