Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help wriitng the assembly code to execute the addition of the two hex numbers shown in a.) using the steps given in a.)

I need help wriitng the assembly code to execute the addition of the two hex numbers shown in a.) using the steps given in a.)

Help is much appericated!

image text in transcribed

1. Manually calculate the results and write down the 'C' and 'Z' of the condition code register after performing the following additions and subtractions. Write programs to add or subtract the numbers that are stored in the memory and store the sum in memory (i.e. your program should read numbers from the memory, apply mathematical operation to the numbers accordingly and save the result in the memory). Use the Memory Window to initialize the memory locations with values below. Execute the programs and record the sum or subtraction and the C' and 'Z' bits of the condition code register. Verify the results with your manual calculations and the value of the C' and 'Z' bits. Use the following data: a. Addition of two single-byte numbers: 0xC3 +0x8D Helpful steps: 1) Use LDRB to read a byte of data from memory into a register. How does an instruction refer to memory location? Hint: Look at program from previous lab experiment 2) Use ADD to add numbers in registers 3) Use STRH or STR in order to save the result from a register to memory-why shouldn't you use STRB in this case

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_step_2

Step: 3

blur-text-image_step3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions