start :
mov ax, @data
mov ds, ax
MOV BL, 00H
MOV DL, 00H
LEA SI, ARX
LEA DI, ARY
PRINTF MSG1
X:
MOV CL,05
mov ah, 01h
int 21h
MOV BL,AL
INC BL
DEC CL
JZ Y
JNZ X
Y:
MOV CL,05
mov ah, 01h
int 21h
MOV DL,AL
INC DL
DEC CL
JZ A
JNZ Y
A: MOV ARX,BL
MOV ARY,DL
JMP Z
Z: PRINTF MSG3
MOV CL,05H
MOV AL,[SI]
ADD AL,[DI]
ADD AL,48H
mov dl,al
mov ah,02h
int 21h
DEC CL
INC SI
INC DI
JZ EXIT
JNZ Z
EXIT: mov ah, 4ch
int 21h
end start
I Can't end the loop and there are other problems too can someone please help me in rectifying these errors. Not too complicated answer still in college so please help. I used counter (05) to stop loop but no matter what is not stopping.
Question: Write an assembly level program for 8086 microprocessor to read two separate arrays of 10 bytes each and display a sum array, which gives the sum of corresponding elements. Example given below:
Enter the array 1:
01
02
03
04
Enter the array 2:
01
02
03
04
The sum array is:
02
04
06
08