Assembly Language, please!! Create a program that will have an array of 10 eleme
ID: 3720536 • Letter: A
Question
Assembly Language, please!!
Create a program that will have an array of 10 elements; the program will sum the integers of the array and will output the array integers and the sum and output the array integers reversed also.
the array integers are declared during coding it's not an input from the user so you can just choose any random ten integer numbers
IMPORTANT :
Create a PROCEDURE out of the program which will be called from your MAIN PROCEDURE.
so I want you to use a procedure to do the code above
Explanation / Answer
DATA SEGMENT ARR DB 5,3,7,1,9,2,6,8,4,10 LEN DW $-ARR SUM DW ? DATA ENDS CODE SEGMENT ASSUME DS:DATA CS:CODE START: MOV AX,DATA MOV DS,AX LEA SI,ARR MOV AX,0 MOV CX,LEN REPEAT: MOV BL,ARR[SI] MOV BH,0 ADD AX,BX INC SI LOOP REPEAT MOV SUM,AX MOV AH,4CH INT 21H CODE ENDS END START
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.