Can I create a new label in NASM, which points to a new memory location offset by a few bytes from a memory location pointed by another label.
For eg.: If label1 points to memory location 0x40h, is there a way to define label2 pointing to 0x44h using label1?
It’s unclear what you’re trying to do, but I’ll answer what I think you want. Say you already have label1 one set up as
and you just want to print the “world” bit. You can do so as follows (demonstrating as Linux with Intel syntax 32-bit, but it works in other cases):
I hope that makes sense, so you put the reference to “label1” in ecx, then increase that reference by the amount you wanted to offset.