NASM – Variable Basics

‘mystring + 1’ is the address of the second byte of the string.

mov al, mystring + 1

stores (the least significant byte of) that address in al. To indicate that you don’t want to store the address but the byte located at that address, write this:

mov al, [mystring + 1]

To declare a four-bytes integer equal to say, 42, use:

myint dd 42

Leave a Comment