Question: D.29 [M] The decimal-to-binary conversion program of Problem D28 is to be implemented using two nested subroutines. The main program that calls the rst subroutine

 D.29 [M] The decimal-to-binary conversion program of Problem D28 is to

D.29 [M] The decimal-to-binary conversion program of Problem D28 is to be implemented using two nested subroutines. The main program that calls the rst subroutine passes two parameters by pushing them onto the stack whose pointer registeris R13. The rst parameter is the address of a 3-byte memory bu'er area for storing the input decimal-digit characters. The second parameter is the address of the location where the converted binary value is to be stored. The rst subroutine reads the three characters from the keyboard, then calls the second subroutine to perform the conversion. The necessary parameters are passed to this subroutine via the processor registers. Both subroutines must save the contents of any registers that they use on the stack. (0) Write the two subroutines for the ARM processor. (45) Give the contents of the stack immediately after the execution of the instruction that calls the second subroutine

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!