Baixe o app para aproveitar ainda mais
Prévia do material em texto
2) Encontre os valores correspondentes ao registrador e variáveis. Descreva também a operação realizada. Considere W = 10, soma = 12 e total = 35 Instruções Operação W soma total MOVLW .20 W = 20 20 12 35 INCF total,1 Total = total + 1 20 12 36 INCF total,0 W = total + 1 37 12 36 SUBLW .38 W = 40 - W 1 12 36 MOVWF soma Soma = w 1 1 36 MOVLW .25 W = 25 25 1 36 SUBLW .27 W = 27 - W 2 1 36 CLRF total Total = 0 2 1 0 DECF soma,1 Soma = soma -1 2 0 0 ADDLW .13 W = W + 13 15 0 0 INCF total,f Total = total +1 15 0 1 MOVLW .1 W = 1 1 0 1 MOVWF total Total = w 1 0 1 MOVLW .12 W= 12 12 0 1 ADDWF soma,1 Soma = soma +w 12 12 1 DECFSZ total Total= total -1 12 12 0 CLRW -------- 12 12 0 INCF soma Soma = soma + 1 12 13 0 XORWF soma,1 Soma = W xor soma 12 1 0
Compartilhar