Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write the following subroutine, which captures a user - entered string at run - time, storing it as a null - terminated character array (

Write the following subroutine, which captures a user-entered string at run-time, storing it as a null-terminated character array (just like the .STRINGZ pseudo-op, with the big difference that .STRINGZ requires a hard-coded character array at compile-time). ;------------------------------------------------------------------------ ; Subroutine: SUB_GET_STRING ; Parameter (R1): The starting address of the character array ; Postcondition: The subroutine has prompted the user to input a string, ; terminated by the [ENTER] key (the "sentinel"), and has stored ; the received characters in an array of characters starting at (R1). ; the array is NULL-terminated; the sentinel character is NOT stored. ; Return Value (R5): The number of non-sentinel chars read from the user. ; R1 contains the starting address of the array unchanged. ;------------------------------------------------------------------------- This subroutine should prompt the user to enter in a string of text, ending with the [ENTER] key. The string of text will be stored starting at whatever address is specified by (R1) and will be NULL-terminated (i.e. the subroutine will store zero (x0000= #0='\0') as a sentinel at the end of the array).

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

Spomenik Monument Database

Authors: Donald Niebyl, FUEL, Damon Murray, Stephen Sorrell

1st Edition

0995745536, 978-0995745537

More Books

Students also viewed these Databases questions

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago

Question

Discuss about training and development in India?

Answered: 1 week ago

Question

Explain the various techniques of training and development.

Answered: 1 week ago