I'd like to write a program that counts the amount of specific symbols in string using scasb and masm32, I found the example, but I couldn't figure out why i'm getting errors. Here's the part of code:
.data
str db '. . .'
len_str=$-str
.code
start:
mov ax,@data
mov ds,ax
mov es,ax
lea di,str
mov cx, len_str
mov al,' '
mov bx,0
cld
cycl:
repe scasb
jcxz exit
inc bx
jmp cycl
exit:
getting
A2008 syntax error db, str
A2006 syntax error len_str
A2148 invalid symbol type in expression: exit
A2004: symbol type conflict