Assebly Code Please help Write an assembly program that add the content of Regis
ID: 3787013 • Letter: A
Question
Assebly Code Please help
Write an assembly program that add the content of Register R4,R5,R6 to register R7 then subtract the content of R10 from R7. Once calculation is done all values of registers must be preserve in memory starting at memory address 0x0200. R4 = 4, R5 = 3, R6 = 10, R10 = 15. The overall program structure should be as follows:
Setup clr.w R4
clr.w R5
... ... ...
mov.w #04, R4
... ... ...
Addition mov.w R4, R7
add.w R5, R7
...
Subtraction ...
Store mov.w R4, &0200h
... ... ... ...
Mainloop jmp Mainloop ; Infinite Loop
Explanation / Answer
Setup clr.w R4
clr.w R5
clr.w R6
clr.w R7
clr.w R10
mov.w #04, R4
mov.w #03, R5
mov.w #10, R6
mov.w #15, R10
Addition mov.w R4, R7
add.w R5, R7
add.w R6, R7
Subtraction sub.w R10, R7
Store mov.w R4, &0200h
mov.w R7, 0x0200
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.