I just started learning assembly and I got to arrays. When I try to get the register bx to hold place 2 for example in the array
IDEAL
MODEL small
STACK 100h
DATASEG
array db 5 dup(45)
CODESEG
start:
mov ax, @data
mov bx, offset array; here
mov ax, bx
add ah, al
mov al, [bx+2]
add ah, al
mov ax, 0
exit:
mov ax, 4c00h
int 21h
END start
But it doesn't work for me. If anyone know why this doesn't work as I intend it to please comment.
Thanks.
P.S. Can someone please also explain to me how to make an array without using dupe i.e: array db 1,2,3,4 (this only contains 1)