Write Assembly Language Program Encrypt Decrypt Data User Press Enc Data Encrypt User Pres Q37200518

write assembly language program to encrypt and decrypt thedata

when the user press enc the data is encrypt and when the userpress dec the data decrypt


Answer


DATA SEGMENT
    MSG1 DB 10,13,’ENTER STRING HERE :-$’   
    MSG2 DB 10,13,’ENCRYPTED STRING IS :- $’
    MSG3 DB 10,13,’DECRYPTED STRING IS : $’
   
    P1 LABEL BYTE
    M1 DB 0FFH
    L1 DB ?
    P11 DB 0FFH DUP (‘$’)
   
DATA ENDS

DISPLAY MACRO MSG
    MOV AH,9
    LEA DX,MSG
    INT 21H
ENDM   
CODE SEGMENT
    ASSUME CS:CODE,DS:DATA
START:
        MOV AX,DATA
        MOVDS,AX                
               
        DISPLAY MSG1
       
        LEA DX,P1
        MOVAH,0AH    
        INT 21H
                      
        LEA SI,P11
        MOV CL,L1
        CALL ENCRYPT
       
        DISPLAY MSG2
        DISPLAY P11
                               
        LEA SI,P11
        MOV CL,L1
        CALL ENCRYPT
       
       

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.