I am trying to modify a variable declared in the .data section and nothing seems to work. Online sources have said that I should do something like add [x], 25 but that isn't working either. The tricky thing about this is that I have found examples that claim to work but they all have ATT syntax, but I'm using Intel. Does anyone know what I am doing wrong and how I can solve my problem?
I'm assembling on MacOS with GAS: gcc -masm=intel modify_var.asm
    .global _main
    .text
_main:
    add x, 25
    mov rdi, 0
    mov rax, 0x2000001
    syscall
    .data
x:
    .long 25
