I'm trying to sum an array using this code
I don't know what register to use in order to sum the array.
I tried to use ax,bx,cx,dx but really I don't know what to do anymore
.MODEL SMALL
DATA SEGMENT
arr DB 0,0,0,0,0,0,0,0,0,0
DATA ENDS
CODE SEGMENT
ASSUME CS:CODE,DS:DATA
start:
MOV AX,DATA
MOV DS,AX
MOV AX,0
MOV BX, OFFSET arr
mov cx, 9
input:
mov ah,1
int 21h
mov [bx],al
inc bx
loop input
mov bx, OFFSET arr
mov cx,9
mov ah,2
mov dl,10
int 21h
mov dl,13
int 21h
mov ax,[bx]
inc bx
cal:
add ax,[bx]
inc bx
loop cal
mov ah,2
mov dl,al
int 21h
MOV AH,4Ch
INT 21h
CODE ENDS
END start