Online Compiler Nasm

extern io_get_dec, io_print_hex, io_newline section .data a dw 1 addr dd $ var dd 0x1234F00D section .bss cntr resd 1 section .text global main main: call io_get_dec add dword [addr], eax mov eax, [addr] call io_print_hex call io_newline mov eax, addr call io_print_hex call io_newline xor eax, eax ret
1) This code reads an integer from input, adds it to a stored address value, then prints both the resulting address and the original address in hexadecimal.

2) Hint: The `$` operator in NASM represents the current assembly position. Consider what value `addr` initially holds.
Hint: The instruction `add dword [addr], eax` modifies the 4-byte value stored *at* the memory location `addr`, not the address itself.