CS2610: Computer Organization and Architecture Lab Assignment – 2 solution


Original Work ?


5/5 - (1 vote)

1 Problem – Encryption

Write an assembly language program to encrypt digits as shown below:
Input digit 0 1 2 3 4 5 6 7 8 9
Encrypted digit 5 7 9 1 3 6 8 0 2 4

Your program should accept a string consisting of digit and non-digit characters.
The encrypted string should be displayed in which only the digits are affected.
For example, if the input is C5o2A3L4a1B, the output will be C6o9A1L3a7B.

The user should be queried whether he or she wants to terminate the program.
If the response is either y or Y you should terminate the program; otherwise,
you should request another input string from the keyboard. You can assume
that the input string will not exceed 20 characters.

2 Submission Guidelines

• Write the code with proper comments wherever necessary and maintain
proper indentation.
• Name the program with your roll no. Ex: If your roll no is CS20B001,
your file name should be CS20B151.asm. If there are multiple files, use
CS20B151 1.asm, CS20B151 2.asm etc.
• Place all the required files in a folder and compress the folder using zip
compression. Name your folder in the following format. If your roll no is
CS20B151, name it as CS20B151 A$.zip, where ’$’ denotes the assignment