I am working on a NASM project for a class, and keep running into an issue when I try to move a register value to a memory address. I have a longer file, but the below code recreates the situation and outcome identically
section .text
global _start
_start:
mov esi, x
add esi, 2
mov [x], esi
section .data
x equ 2
When running this code (using the compiler at https://www.jdoodle.com/compile-assembler-nasm-online/), it returns the "command terminated by signal 11" message. the problem appears to be in the "mov [x], esi" line. Can someone explain what this issue is, and how I can correct it? A cursory google search indicates it is because I am overflowing the address [x], but I am not sure what to do with that information.