Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

Prepare a short profile of victor marie hugo ?

Answered: 1 week ago

Question

Prepare a short profile of Henry words worth Longfellow?

Answered: 1 week ago

Question

What is RAM as far as telecommunication is concerned?

Answered: 1 week ago

Question

Question 1: What is reproductive system? Question 2: What is Semen?

Answered: 1 week ago