Zdravím vie mi niekto poradit prečo mi to nefunguje.
potrebujem nájsť počet znakov v reťazci(kód nižšie hľadá iba jeden, no aj tak nefunguje)
ďakujem
Kód:
stack segment
stack ends
data segment
str1 db 'Assemblers$',0
msg1 db 'found$'
msg2 db 'not found$'
data ends
ptrf macro msg
lea dx,msg
mov ah,09h
int 21h
endm
code segment
assume cs:code,ds:data,ss:stack
start:
mov ax,data
mov ds,ax
cld
mov cx,12
mov al,'s'
lea di,str1
repne scasb
jne notfound
ptrf msg1
close:
mov ax,4c00h
int 21h
notfound:
ptrf msg2
mov ax,4c00h
int 21h
code ends
end start