Answered step by step
Verified Expert Solution
Question
1 Approved Answer
The program will start at memory address x3000. An appropriate header is then: 0011 0000 0000 0000 ; bprogram1.bits adds three numbers Choose registers in
The program will start at memory address x3000. An appropriate header is then: 0011 0000 0000 0000 ; bprogram1.bits adds three numbers Choose registers in order from the list R1, R2, R3, ..., R6. Because RO and R7 are special we avoid them as general purpose registers. The RiggX grader assumes these choices. Problem: Add three integers in three memory cells and write the sum to a fourth memory cell. The first number is in memory cell x400F, the second in memory cell x4010, the third in memory cell 4011, and the sum should be placed in memory cell X300C. Load data address x400F into a first register. . Read the first number into a second register using LDR; call this the total register. Read the second number into a third register using LDR; call this the incre- ment register. Add the increment to the total. . Read the third number into the increment register using LDR. Add the increment to the total. Write the value in total to memory cell X300C using st. Write the HALT trap instruction (xF025) to stop execution. . Include the address x400F immediately after the Halt instruction. Including this data, your program should consist of nine lines
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