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

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 Databases Questions!