Created
June 9, 2020 23:43
-
-
Save brandon22esquivel/08cd83cf7c3f451f04638e998a337298 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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