Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your task is to write a subroutine that lets users input a string one character at a time, using the Input instruction. The subroutine should

image text in transcribed

Your task is to write a subroutine that lets users input a string one character at a time, using the Input instruction. The subroutine should take an address as its argument and store the string at that address. When the user enters the value 0 (i.e., the integer value 0, not the character 0!), this will signal the end of the string Here is a template that you can start from Load StringAddir Store InputAddr Jns InputString Halt / Get start address where string should be stored / Store as argument of subroutine / Execute input subroutine InputAddr, HEX O / argument: address where string will be stored InputString, HEX 0 / subroutine start / your input code goes here StringAddr, JnS UserInput / Address of the string UserInput, HEX 0 / Start of string data Tip: you can switch the type of input in the MARIE simulator. For the actual string, use the unicode input method so you can enter real characters. For the final 0, switch to the decimal input method Your task is to write a subroutine that lets users input a string one character at a time, using the Input instruction. The subroutine should take an address as its argument and store the string at that address. When the user enters the value 0 (i.e., the integer value 0, not the character 0!), this will signal the end of the string Here is a template that you can start from Load StringAddir Store InputAddr Jns InputString Halt / Get start address where string should be stored / Store as argument of subroutine / Execute input subroutine InputAddr, HEX O / argument: address where string will be stored InputString, HEX 0 / subroutine start / your input code goes here StringAddr, JnS UserInput / Address of the string UserInput, HEX 0 / Start of string data Tip: you can switch the type of input in the MARIE simulator. For the actual string, use the unicode input method so you can enter real characters. For the final 0, switch to the decimal input method

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

Students also viewed these Databases questions

Question

=+How did mindfulness meditation work for you?

Answered: 1 week ago

Question

Methods of Delivery Guidelines for

Answered: 1 week ago