I\'m a newbie to assembly programming, working through Programming Ground Up on an Ubuntu x86_64 desktop with GNU assembler v2.20.1.
I\'ve been able to assemble/link
You need to replace the push/pop sequence with
pushq $1 # push the value 1 onto the stack
popq %rax # pop 1 off the stack and into the %eax register
Note the error message is "suffix or operand invalid", you only checked the second part of the logical OR
in the error message, maybe because you weren't exactly sure what the suffix means: it's the "l".
Edit: Please see Thomas answer for an explanation why your code won't work anyway even if it assembles.