Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How do I use the address of a changing neme of varieble

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading