Question
Write an X86-series assembly language program that reads a string from the user and stores it in the data segment. Prompt the user for input,
Write an X86-series assembly language program that reads a string from the user and stores it in the data segment. Prompt the user for input, and then respond by echoing the string, returning the number of characters entered, and printing back the second to last character. You may assume the user will enter a string of 2-9 characters(dont forget about the carriage return).
Sample Execution: A sample execution of the program looks like the following.
Enter a string (between 2-9 char.):
0123569
0123569 You entered 7 characters.
The second last character you entered was 6.
dont use too complicate character to write, i just learn assembly language lately
for example like this code
data:
myStr db 10,11 dup(?)
code:
lea dx, myStr; mov ah, 10
int 21h
mov dl, 10
mov ah, 2 mov dl, myStr[5]
mov ah, 2
int 21h
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started