Jump to content

Small encryptor 16b

- - - - -

  • Please log in to reply
No replies to this topic

#1
B14573R

B14573R

    Newbie

  • Members
  • Pip
  • 4 posts
Hi, well first of all I reguistre here today and this very, very good with all mm .. my contribution is as follows

. 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. ;-)




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users