Question: 6 . Write a program called p 4 . asm that prompts the user for a two character string. Once the string is entered, swap
Write a program called pasm that prompts the user for a two character string. Once the string is entered, swap the characters in the string and then print the result. You must swap the characters in the string in other words, swap the bytes that are stored in memory and then print the modified string to get credit for this program. Allocate the memory for the string in a single directive in the bss section, such as:
twocharstring: resb ; added an extra character to put a newline into when printing
Here is what the output should look like.
Example output:
The Swapping Program
Please enter a two character string: We
The answer is: eW
This program is meant to be done using NASM
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
