Programas debug
[bits 16]
segment .data
cade: resb 30
dame: db 'Teclea una cadena que termine en pesos',0ah,0dh,'$'
sale: db 'La cadena convertida es:', 0ah,0dh,'$'
pala: db 0ah,0dh,'$'
segment .text
..start:
mov ax,data
mov ds,ax
mov dx,dame
mov ah,09h
int 21h
mov bx,cade
otro:mov ah,01
int 21h
mov byte[bx],al
inc bx
cmp al,'$'
jne otro
mov bx,cade
mov cl,0
mov cl,20h
mas
cmp byte [bx],'$'
je fin
cmp byte [bx],60h
jl sum
jmp mayo
sumcmp byte [bx],' '
je masi
mov dl,[bx]
add dl,cl
mov [bx],dl
inc bx
jmp mas
masi:inc bx
jmp mas
mayo
cmp byte [bx],' '
je masi
mov dl,[bx]
sub dl,cl
mov [bx],dlinc bx
jmp mas
fin
mov dx,pala
mov ah,09
int 21h
mov dx,sale
mov ah,09
int 21h
mov dx,cade
mov ah,09
int 21h
mov ah,4ch
int 21h
2.
3. Programa queverifica si un password es correcto o no.
[bits 16]
segment .data
cade: resb 30
dame: db 'Teclea tu password que termine en pesos', 0ah,0dh,'$'
resa:db 'password correcta','$'
pas:db'arqui2$'
repi:db 'password incorrecta',0ah,0dh,'$'
salto: db 0ah,0dh,'$'
segment .text
..start:
mov ax,data
mov ds,ax
mov es,ax
mov dx,dame
mov ah,09h
int 21h
mov bx,cade
otro:mov ah,08h
int 21h
mov byte[bx],al
mov dl,'*'
mov ah,02
int 21h
cmp byte [bx],'$'
jne otro1
jmp final
otro1:inc bx
jmp otro
final: mov si,0
mov bx,0
movbx,cade
mov bp,pas
mas:
mov cl,[bp+si]
cmp [bx+si],cl
jne fin
jmp sigue
sigue: inc si
;inc bp
cmp byte [bx+si],'$'
je vaya
jmp mas
fin: mov dx,salto
movah,09h
int 21h
mov dx,repi
mov ah,09
int 21h
mov ah,4ch
int 21h
vaya: mov dx,salto
mov ah,09h
int 21h
mov dx,resa
mov ah,09h
int 21h
mov ah,4ch
int 21h
Regístrate para leer el documento completo.