I have 2 variables Index1 and Index2, a variable called Value with a number and 2 vectors Array1, and Array2.
I need to change the value at index Index1 in Array1 with Value and in Array2 to change the value at Index2 with Value
Everything i try end in an error or dosent affect the arrays at all
assembly 8086.MODEL small
.STACK 100h
.DATA
index1 DB 9
index2 DB 4
value DB 77h
array1 DB 01h, 02h, 03h, 04h, 05h, 06h, 07h, 08h, 09h, 0Ah
array2 DB 11h, 12h, 13h, 14h, 15h, 16h, 17h, 18h, 19h, 1Ah
.CODE
Start:
mov ax,@data
mov ds,ax;
mov si, offset array1
mov AH,value
mov [si+index1],AH
mov si,0
mov si, offset array2
mov [si+index2],AH
;show array in consol
mov cx,10
mov si, offset array1
loopx:
mov dl,[si]
add dl,48
mov ah,02h
int 21h
mov dl,32
mov ah,02h
int 21h
inc si
loop loopx
mov ax,4c00h
int 21h
END Start