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

i need help with this, please somebody help. Create an assembly language program

ID: 3685638 • Letter: I

Question

i need help with this, please somebody help.

Create an assembly language program that will have two arrays, of five elements each.

Sum the corresponding elements in the two arrays together and store the result in one of the arrays. Do this for each element. In other words:

a[0] = a[0] + b[0]

a[1] = a[1] + b[1]

etc.

When this is complete, add all of the values in the array that contains the sums together, and store that value in memory.

To start, the values in each array should be: 1, 2, 3, 4, 5.

The code that adds the two arrays together and then sums the elements together is to be in a separate sub-routine.

Explanation / Answer

DATA SEGMENT NUM1 DB 36H,55H,27H,42H NUM2 DB 38H,41H,29H,39H RESULT DB 5 DUP (0) ENDS CODE SEGMENT ASSUME DS:DATA CS:CODE START: MOV AX,DATA MOV DS,AX LEA SI,NUM1 LEA DI,NUM2 LEA BX,RESULT MOV CX,5 LOOP1: MOV AL,[SI] ADD AL,[DI] MOV [BX],AL INC BX INC SI INC DI LOOP LOOP1 MOV AH,4CH INT 21H ENDS END START