Each INDIVIDUAL should submit his/her work online, both source code and output screenshots. All assignments should be submitted ON TIME. Collaboration among students is strongly encouraged. It is legal to get approaches and ideas from students, the internet, etc. However, it is ILLEGAL to get a code (if a part of the code is submitted by two or more students, ALL are guilty of cheating). Any minor cheating will not be toler

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter7: User-defined Simple Data Types, Namespaces, And The String Type
Section: Chapter Questions
Problem 8PE: Write a program that reads in a line consisting of a students name, Social Security number, user ID,...
icon
Related questions
Question
Submitting: Each INDIVIDUAL should submit his/her work online, both source code and output screenshots. All assignments should be submitted ON TIME. Collaboration among students is strongly encouraged. It is legal to get approaches and ideas from students, the internet, etc. However, it is ILLEGAL to get a code (if a part of the code is submitted by two or more students, ALL are guilty of cheating). Any minor cheating will not be tolerated
Write an assembly program that works on the following string in data segment.
msg db "I 1m in engineering student it TTU$"
starto dw 8
endo
dw 19
org 40
buf db 34 dup (?),'$'
The procedures in the following activities should be included in one program. When you run this
program the output should be something like:
The length of the string is:
The string located between offset 8 and 19 is:
The string after replacing 1's with a's is:
4.1 Activity 1
Write an assembly code that copy the contents of msg to buf, using suitable string instructions.
4.2 Activity 2
Add a procedure to find the length of the given string. Name this procedure "strlen". To use this
procedure issue CALL strlen.
4.3 Activity 3
Given a start offset (starto) and end offset (endo), define a procedure that generates and display
the string between the two offsets. Name this procedure "strolo2 and add it to the above program.
You can use this procedure as CALL strolo2.
4.4 Activity 4
Write a procedure and add it to the above program that finds and replaces each numeric character
in buf with letter 'a'. Name this procedure "strrep". You can use it as CALL strrep.
Transcribed Image Text:Write an assembly program that works on the following string in data segment. msg db "I 1m in engineering student it TTU$" starto dw 8 endo dw 19 org 40 buf db 34 dup (?),'$' The procedures in the following activities should be included in one program. When you run this program the output should be something like: The length of the string is: The string located between offset 8 and 19 is: The string after replacing 1's with a's is: 4.1 Activity 1 Write an assembly code that copy the contents of msg to buf, using suitable string instructions. 4.2 Activity 2 Add a procedure to find the length of the given string. Name this procedure "strlen". To use this procedure issue CALL strlen. 4.3 Activity 3 Given a start offset (starto) and end offset (endo), define a procedure that generates and display the string between the two offsets. Name this procedure "strolo2 and add it to the above program. You can use this procedure as CALL strolo2. 4.4 Activity 4 Write a procedure and add it to the above program that finds and replaces each numeric character in buf with letter 'a'. Name this procedure "strrep". You can use it as CALL strrep.
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Module hierarchy chart
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr