. Model small
. Code
encryp segment
assume cs: encryp, ds: encryp, ss: encryp
org 100h
start: jmp index
. Stack
tb1 equ 13
tb2 equ 10
Crepe db dup ('$') 200,0,200
crypt1 db 'Insert a string:', TB1, TB2, '$'
crypt2 db 'encrypted string :','$'
index:
mov ax, encryp
mov ds, ax
read dx, crypt1
mov ah, 09h
int 21h
mov ah, 0Ah; ask string
mov dx, offset pancake, the crepe store
int 21h
mov if crepe offset +1
read bx, crepe +1
mov cl, byte ptr [si]
loop:
inc bx
mov ax, [bx]; encrypt
add ax, 0035h; we add 35 in hexadecimal to decimal string is 53
mov [bx], ax
loop loop
read dx, crypt2
mov ah, 09h
int 21h
mov dx, offset +2 crepe; show the encrypted string
mov ah, 9h
int 21h
mov ah, 10h
int 16h
encryp ends
end start
I hope you like it before hand thank you very much and greetings to all. ;-)


Sign In
Create Account

Back to top









