: Hello, I have a problem, if I do the following, it works fine for
: what I need to do:
:
:
:
: mov bx,0
: mov vector[bx],1
:
:
:
: But if I want to put a variable instead the number 1, like this:
:
:
:
:
: mov bx,0
: mov ah, offset variable
: mov vector[bx],ah
:
:
:
: It doesn't works as I want. Someone know how to resolve this?
:
: Best regards
:
:
:
A variable in assembly is actually a label that is translated as an address literal during compile.
Therefore, you need to tell the Assembler that you are using it as an address. Knowing this, your code above simplifies to:
mov ah, [offset variable]
mov [vector], ah
Best Regards,
Richard
The way I see it... Well, it's all pretty blurry