Question
Suppose we define a new service routine starting at memory location x4000. Suppose memory location x0072 contains the value x4000. How would you invoke this
Suppose we define a new service routine starting at memory location x4000. Suppose memory location x0072 contains the value x4000. How would you invoke this service routine?
2. The following program is supposed to display the number 5 on the screen.
a. What is the purpose of subroutine B?
b. The program as written does not work. Describe how the program should be fixed and give the assembly language instructions that will fix the problem. Be very clear as to where you will insert the new instructions.
.ORIG x3000
JSR A
OUT
HALT
A AND R0, R0, #0
ADD R0, R0, #5
JSR B
RET
B LD R1, ASCII
ADD R0, R0, R1
RET
ASCII .FILL 30
.END
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