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

6. (TCO 5) Write an assembly-language program to add four to each element of lis

ID: 1847124 • Letter: 6

Question

6. (TCO 5) Write an assembly-language program to add four to each element of list1 and store it to the corresponding element of list2. Use a loop.

ORG       $2000
LIST1      DC.B      1, 2, 3, 4, 5
LIST2      DS.B       5 (Points : 5)     

6. (TCO 5) Write an assembly-language program to add four to each element of list1 and store it to the corresponding element of list2. Use a loop.

ORG       $2000
LIST1      DC.B      1, 2, 3, 4, 5
LIST2      DS.B       5 (Points : 5) 6. (TCO 5) Write an assembly-language program to add four to each element of list1 and store it to the corresponding element of list2. Use a loop.

ORG       $2000
LIST1      DC.B      1, 2, 3, 4, 5
LIST2      DS.B       5 (Points : 5)     

Explanation / Answer

ORG 0000h
a:mov A,0
mov dptr,#LIST1
mov A,@DPTR+A
mov R1,A
mov A,0
mov DPTR,#LIST2
mov A,DPTR+A
sub A,R1
mov @DPTR,A
jz DPTR,a
end

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