i would like to do something like this:
mov al, offset [bx]
while bx contains an adress of a name of another varieble is there a way to do so in assembly 8086?
CodePudding user response:
There are no variable names anymore at runtime, that is after assembling. You need to put the address of an variable into bx
, not the name. If the address of an variable is in bx
, then the instruction you wrote needs to be written without the offset
keyword and load the contents of that variable pointed to by bx
into al
.