Hi guys! im having a problem with an exercise and i can't find the solution. the program have to sub the contents of the second array from the first and mov the result to the third. This is what i did so far.
TITLE ARITHMETIC2
DOSSEG
.MODEL SMALL
.STACK 100h
.DATA
arrayE DB 112, 112, -32, -32, -128
arrayF DB 80, 120, 112, -80, 128
arrayX DB 2 DUP (10)
.CODE
start: MOV AX,@DATA
MOV DS,AX
MOV SI, OFFSET arrayE
MOV DI, OFFSET arrayF
MOV SP, OFFSET arrayX
MOV CX, 5
loopi:
MOV AX, [SI]
MOV BX, [DI]
MOV DX, [SP]
SUB AX , BX
MOV DX, AX
INC SI
INC DI
INC SP ;this is wrong, what should i write here?
LOOP loopi
terminate: MOV AX, 4C00H
INT 21H
END start