Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Determine the machine code for each of the following instructions. Give the answ

ID: 3712043 • Letter: D

Question

Determine the machine code for each of the following instructions. Give the answers in hex.

a) return

b) brw

c) clrw

d) addlw 20

e) andlw 0x0F

f) movlb 4

g) movlw high Data_Array ; (Data_Array is at address 0x2200.)

h) swapf PORTB,F

i) subwf PORTA,W

j) movwf CCP1CON

k) movf ADRESL,W

l) decfsz Count,F ; (Count is at address 0x24.)

m) bsf ADCON0,ADGO

n) bcf T1CON,TMR1ON

o) btfsc PORTC,3

p) skpz

q) bcf WPUC,6

r) bra $-3

s) bra $+3

t) call Read_Input ; (Read_Input is at address 0x0127.)

u) goto Main ; (Main is at address 0x0005.)

v) movf INDF0,W

w) moviw --INDF1

x) movwi 5[INDF0]

y) addfsr 1,8

Explanation / Answer

It is not possible to write the machine code of instructions that does not have the logic. For a proper code or assembly program you can find the exact machine code, but not for any random instructions.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote