I know that you can create a string in nasm by writing this:
mystring db 'Hello World'
But if I want to move a single character, let's say e, the second character in the string to the al register. How can I do that? Should I write
mov al, mystring+1
or something? And how do I make an int variable? Can I write:
myint db 4
'mystring + 1' is the address of the second byte of the string.
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:
To declare a four-bytes integer equal to say, 42, use: