I'm trying to use NASM to make an assembly code program, but for some reason it keeps giving me an error. It says it expects a comma, colon, decorator, or end of line after I declare a string, but I don't see how it can be an issue Please advise.
section .text
global main
main:
mov edi,str
lab3:
cmp [edi],' '
je lab1
cmp [edi],0x0
je lab2
mov eax,4
mov ebx,1
mov ecx,edi
mov edx,1
int 0x80
inc edi
jmp lab3
lab1:
inc edi
mov eax,4
mov ebx,1
mov ecx,nwln
mov edx,1
int 0x80
jmp lab3
lab2:
mov eax,1
int 0x80
section .data
str db 'this is a test',0x0 ;this is the line giving the error
nwln db 0xa