Question: You are required to write an efficient assembly language program to encrypt a byte-wide data value stored in a memory location at address Ox100. The
You are required to write an efficient assembly language program to encrypt a byte-wide data value stored in a memory location at address Ox100. The encrypted data value must be stored in a memory location at address 0x200. Write a subroutine or function called ENCRYPT by following the steps in the algorithm given below. 1. Load data byte value from source location 2. Make the value negative 3. Divide the value by 3 (without affecting the sign of the number and without repeated subtraction) 4. Exchange the upper 4 bits of the data byte with the lower 4 bits 5. Make the value negative 6. Multiply the value by 5 (without using multiply or repeated addition) 7. Store the encrypted value in target location You are required to write an efficient assembly language program to encrypt a byte-wide data value stored in a memory location at address Ox100. The encrypted data value must be stored in a memory location at address 0x200. Write a subroutine or function called ENCRYPT by following the steps in the algorithm given below. 1. Load data byte value from source location 2. Make the value negative 3. Divide the value by 3 (without affecting the sign of the number and without repeated subtraction) 4. Exchange the upper 4 bits of the data byte with the lower 4 bits 5. Make the value negative 6. Multiply the value by 5 (without using multiply or repeated addition) 7. Store the encrypted value in target location
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
