Question
The decimal-to-binary conversion program of Problem D.28 is to be implemented using two nested subroutines. The main program that calls the first subroutine passes two
The decimal-to-binary conversion program of Problem D.28 is to be implemented using two nested subroutines. The main program that calls the first subroutine passes two parameters by pushing them onto the stack whose pointer register is R13. The first parameter is the address of a 3-byte memory buffer 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 first 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.
(a) Makethe two subroutines for the ARM processor.
(b) 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started