Using register for memory addressing in assembly using fasm assembler?

515 views Asked by At

Ok, so here is my query. Say, when i write the following instruction

mov ax,[myvar] ; this basically means to move the value stored at memory address of myvar and moving the value in ax register.

Now, i found this article which had the following instruction:-

mov ax,2
mov bx,4

add ax,[bx] :- what does [bx] mean?

add ax, bx :- this would mean i am simply adding 2 + 4 and storing it in ax

but when i write add ax,[bx] what exactly am i adding? I see some sort of weird address being loaded in the ax register.

Can someone please help me understand the code.Thanks

0

There are 0 answers