3. This program is for extra credit. Write a MARIE program that takes you name as input and outputs the string "Hello, yourname". Modify the pointer example from the .pdf Powerpoint slides so that string output is performed in a subroutine. The input to the subroutine will be the starting location of the string in memory. This function assumes that the string is null terminated (i.e., the last character in the string is Dec 000). The function should use a loop to access the characters which ends when the null terminator is accessed. Write another subroutine that will input a string by getting the individual characters of the string and storing them sequentially in memory. The input to the function will be the pointer to the first location for the string. The function should use a loop to input the characters and will end when the user enters the null terminator. When you input the characters, you can set the input mode to Unicode if you want to enter the actual letters, however, for non-printable characters like [space] and [null], you will need to switch the input mode to decimal or hex. You can always choose to enter the characters using their hex or decimal ASCII codes. There are numerous ASCII tables on the internet where you can look up the appropriate ASCII encodings for your characters. Lay out your memory so that the constant string comes last and is followed by a named location for your name variable (initialized to Dec 000). Your name will be stored at the very end of the program starting at this identifier. (Hint, switch the output mode to Unicode for display).
3. This program is for extra credit. Write a MARIE program that takes you name as input and outputs the string "Hello, yourname". Modify the pointer example from the .pdf Powerpoint slides so that string output is performed in a subroutine. The input to the subroutine will be the starting location of the string in memory. This function assumes that the string is null terminated (i.e., the last character in the string is Dec 000). The function should use a loop to access the characters which ends when the null terminator is accessed. Write another subroutine that will input a string by getting the individual characters of the string and storing them sequentially in memory. The input to the function will be the pointer to the first location for the string. The function should use a loop to input the characters and will end when the user enters the null terminator. When you input the characters, you can set the input mode to Unicode if you want to enter the actual letters, however, for non-printable characters like [space] and [null], you will need to switch the input mode to decimal or hex. You can always choose to enter the characters using their hex or decimal ASCII codes. There are numerous ASCII tables on the internet where you can look up the appropriate ASCII encodings for your characters. Lay out your memory so that the constant string comes last and is followed by a named location for your name variable (initialized to Dec 000). Your name will be stored at the very end of the program starting at this identifier. (Hint, switch the output mode to Unicode for display).
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Knowledge Booster
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.Recommended textbooks for you
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education