Skip to content

Instantly share code, notes, and snippets.

@augustoguerrero
Created July 11, 2016 03:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save augustoguerrero/0847280a57cc6a61186256d572cd69ea to your computer and use it in GitHub Desktop.
Save augustoguerrero/0847280a57cc6a61186256d572cd69ea to your computer and use it in GitHub Desktop.
ORG 1000H
FRASE_1 DB "ESTA ES UNA FRASE"
LETRA_A DB "A"
FRASE_2 DB "ESTO ES OTRA COSA"
ORG 2000H
MOV CX, OFFSET FRASE_1 ; Se guarda las direcciones
MOV DX, OFFSET FRASE_2 ; de las frases
MOV AL, 0 ; Inicializa este contador en 0
SEGUIR: MOV BX, CX ; Se guarda la direccion de la frase 1 en BX
MOV AH, [BX] ; Le pasa el ¿contenido? de BX a AH
MOV BX, DX ; Guarda en BX la direccion de frase 2
CMP AH, [BX] ; Compara el ¿contenido? de BX a AH
__ NO ; Instruccion a completar
NO: INC CX ; Incrementa lo que tenia CX
INC DX ; Incrementa lo que tenia DX
CMP __, __ ; Instruccion a completar
JNZ SEGUIR ; Jump if Not Zero a Seguir
FIN:HLT
END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment