Logo 
Search:

Assembly Language Articles

Submit Article
Home » Articles » Assembly Language » Homework HelpRSS Feeds

An application to encrypt the given string

Posted By: Lewis Evans     Category: Assembly Language     Views: 6948

Write an application to encrypt the given string.

Code for An application to encrypt the given string in Assembly Language

.model small
.data
    value db 'sanjay', '$'
    v_size dw $-value
    encrypt db 7 dup (?)
    decrypt db 7 dup (?)

.code
begin:
    mov ax, @data
    mov ds, ax

    mov es, ax
    lea si, value
    lea di, encrypt

    mov cx, v_size
    dec cx

    mov ah, 09h
    lea dx, valueint 21h

counter1:
    mov ah, 0000h
    mov al, [si]
    add al, 01h
    mov [di], al
    inc di
    inc si
    loop counter1
        mov [di], '$'

    mov ah, 09h
    lea dx, encrypt
    int 21h

    lea si, encrypt
    lea di, decrypt    
    mov cx, v_size
    dec cx


counter2:
    mov ah, 0000h
    mov al, [si]
    sub al, 01h
    mov [di], al
    inc di
    inc si
    loop counter2
        mov [di], '$'

    mov ah, 09h
    lea dx, decrypt
    int 21h

.exit
end begin
  
Share: 


Didn't find what you were looking for? Find more on An application to encrypt the given string Or get search suggestion and latest updates.

Lewis Evans
Lewis Evans author of An application to encrypt the given string is from London, United Kingdom.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!