Logo 
Search:

Assembly Language Articles

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

Program to encrypt the given string

Posted By: Hilma Miller     Category: Assembly Language     Views: 4769

Write a program to encrypt the given string.

Code for Program to encrypt the given string in Assembly Language

.model small

.data
        str1 db 'AaOLZzs'
        len equ $ - str1

.code
        mov ax,@data
        mov ds,ax
        LEA SI,str1
        mov cx,7
        L1:
                mov bl,BYTE PTR [SI]
                cmp bl,'Z'
                je encrpZ
                cmp bl,'z'
                je encrpZ1
                add bl,1
                mov [SI],bl
                INC SI
                Loop L1
                jmp ext

        encrpZ:
                mov BYTE PTR [SI],'A'
                INC SI
                Loop L1
                jmp ext

        encrpZ1:
                mov BYTE PTR [SI],'a'
                INC SI
                Loop L1

      ext:
        mov ax,4C00h
        int 21h
end
  
Share: 


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

Hilma Miller
Hilma Miller author of Program to encrypt the given string is from Frankfurt, Germany.
 
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!