Entradas

Practica 6 / emu8086

Imagen
En el siguiente código lo que hace es comparar dos textos y mostrar el mensaje "Son iguales", solamente si los textos son exactamente idénticos. Código: 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 "Dania Itzel $"   ;Este es el primer mensaje que compara msg2 db "Dania Itzel $"  ;Este es el seguundo mensaje que compara msg3 db "Son iguales $"  ; Mostrara este mensaje en pantalla si es que los dos mensajes son iguales en caso de que no sean iguales no mostrara nada x dw 0 Resultado:

Practica 5 / emu8086

El siguiente código imprime una linea \ en forma diagonal y termina cuando se presiona la tecla "Esc". Código: name "practica5" org 100h ; print a welcome message: mov dx, offset msg mov ah, 9 int 21h ;============================ ; eternal loop to get ; and print keys: wait_for_key: ; check for keystroke in ; keyboard buffer: mov dh, pos  mov dl, pos  mov bh, 0  mov ah, 2  int 10h ;Movemos el cursor  mov al,'\'  mov bh,0  mov bl,1  mov cx,1  mov ah,09h  inc pos ;Imprimimos una linea \  int 10h  mov ah, 1  int 16h  jz wait_for_key ; get keystroke from practica5: ; (remove from the buffer) mov ah, 0 int 16h ; print the key: mov ah, 0eh int 10h ; press 'esc' to exit: cmp al, 1bh jz exit jmp wait_for_key ;============================ exit: ret msg db "Type anything...", 0Dh,0Ah  db "[Enter] - carriage return.", 0Dh,0Ah  db "[Ctrl]+[Enter] - line feed.", 0Dh,0Ah ...