Scusate se risollevo un "vecchio" thread ma sono stato via per un po' di tempo.
allora prova questo codice:
codice:
dosseg
.model small
.stack 64
.data
STR1 DB 2D,'12'
STR2 DB 2D,'12'
INS_STR1 DB 'Inserisci la prima stringa di 8 caratteri ','$'
INS_STR2 DB 10,13,'Inserisci la seconda stringa di 8 caratteri ','$'
MESSAGE1 DB 10,13,'le stringhe sono uguali','$'
MESSAGE2 DB 10,13,'le stinghe non sono uguali','$'
.code
main proc far
mov ax,@data
mov ds,ax
mov es,ax
;***INSERIMENTO STRINGHE***
mov ah,09h
mov dx,offset INS_STR1
int 21h
mov dx,offset STR1
mov ah,0Ah
int 21h
mov ah,09h
mov dx,offset INS_STR2
int 21h
mov dx,offset STR2
mov ah,0ah
int 21h
cld
mov si,offset STR1+2
mov di,offset STR2+2
mov cx,08h
repe cmpsb
je passe
mov dx,offset message2
jmp affichage
passe: mov dx,offset message1
affichage: mov ah,09h
int 21h
mov ax,4c00h
int 21h
main endp
end main