VElist dw 2,40;
dw 3,55;
dw 4,70;
dw 5,60;
dw 6,70;
dw 7,80;
dw 8,170;
dw 9,120;
dw 1,56;
I'm trying to add all this numbers that are the second number in this array of number pairs, ex:40,55,70 I typed
mov cx,des
sub cx,beg
mov ax,0
mov di,Beg
add ax,VElist[4*di-1]
where my program allowed us to enter the Variable "beg" and "des" between 1 to 0.
But the assembler keeps telling me the error information :invalid use of registers at add ax,VElist[4*di-1].
I can't see I did any where wrong, I'll be thankful if anyone can help me solve this question:))