I am new to assembly programming and I am trying to compile/assemble the code bellow that I found on a book. I am using nasm, but I keep getting this error:
error: symbol 'a1' undefined
I am not sure how to solve this. I have tried to compile this on my ubuntu(64 bit) host machine and also on a Freebsd 32bit virtual machine and both times I got the same error.
global _start
_start:
xor eax,eax
jmp short string
code:
pop esi
push byte 15
push esi
push byte 1
mov a1,4
push eax
int 0x80
xor eax,eax
push eax
push eax
mov a1,1
int 0x80
string:
call code
db 'Hello world !', 0x0a