Hi
Can anyone help me with basic 8086 programming. i need to display the offset address of an element in an array. For example address of arr[2], arr[6] etc...
Here is what i've tried but i got a bunch of "rubbish" on display. It compile fine with no error/warning.
data segment
arr db 12,45,34,3 ;examples
data ends
code segment
assume cs:code, ds:data
start :
MOV AH, 9
LEA DX, arr+1 ;display arr[1]???
INT 21H
MOV AH, 4CH
INT 21H
code ends
end start
Can anyone help me with basic 8086 programming. i need to display the offset address of an element in an array. For example address of arr[2], arr[6] etc...
Here is what i've tried but i got a bunch of "rubbish" on display. It compile fine with no error/warning.
data segment
arr db 12,45,34,3 ;examples
data ends
code segment
assume cs:code, ds:data
start :
MOV AH, 9
LEA DX, arr+1 ;display arr[1]???
INT 21H
MOV AH, 4CH
INT 21H
code ends
end start