Skip to content

Instantly share code, notes, and snippets.

@brandon22esquivel
Created June 9, 2020 23:43
Show Gist options
  • Save brandon22esquivel/08cd83cf7c3f451f04638e998a337298 to your computer and use it in GitHub Desktop.
Save brandon22esquivel/08cd83cf7c3f451f04638e998a337298 to your computer and use it in GitHub Desktop.
org 100h
comienzo:
mov si, x
mov al, msg2[si]
cmp msg[si], al ;comparar letra por letra las cadenas, si uno no coincide manda
;directamente a fin y termina el programa
jne fin:
cmp msg[si], "$" ;si es el final y el programa llega aca, quiere decir que son iguales
jz final:
inc x
loop comienzo
final:
mov dx, offset msg3
mov ah, 9
int 21h
fin:
ret
msg db "Hola Mundo $";Cadena 1
msg2 db "Hola Mundo $";Cadena 2
msg3 db "Son iguales $"
x dw 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment