Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are to create and test a short assembly language program to perform the following computation. Yoda = (Leia - Han) + (Luke -

You are to create and test a short assembly language program to perform the following computation. Yoda =

You are to create and test a short assembly language program to perform the following computation. Yoda = (Leia - Han) + (Luke - 123) A. Create a .data section and allocate space for one 32-bit word for each of the four variables Leia, Han, Luke, and Yoda (in that order). In your memory allocation directives, specify initial values as follows: Leia = 400, Han = 550, Luke = 200, Yoda = 0 B. The program is to use a separate memory pointer register value for each variable, to read/write the variables. (Example: LDR r0,[r1] where r1 contains the memory address.) C. In the debugger, open a Memory Monitor and select an appropriate "rendering" (signed decimal format is recommended for this exercise) to view and display the values of the data beginning at address Ox2000000. D. Open an Expressions view and display the values of the four variables Leia, Han, Luke, and Yoda. Again select an appropriate format for this data (ex. signed decimal.) E. Execute the program one step at a time, studying the values of the registers, memory locations, and expressions. F. After executing the last instruction, do a screen capture of the Memory and Expressions views and highlight or circle the final value of variable Yoda. Also, hand-calculate the result, write your answer on one of the captured views, and indicate whether it matches the result produced by the program. Submit these captured, annotated debug views with your source program. G. Optional (but recommended) - Reset the program and, after it pauses at main, use GDB commands to change the values of the variables, rerun the program, and verify the results for these new values. 1. The use of GDB commands is described in section F of the Debugging tutorial. 2. GDB commands are entered in the Debugger Console view. For example: set "(int ") &Leia = 200 3. You may enter individual commands to set the value of each variable or execute the commands from a command file (described in section G of the tutorial.)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

The image provided appears to be an assignment or exercise for writing a simple assembly language program that performs the following computation Yoda ... 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: 3

blur-text-image

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

Smith and Roberson Business Law

Authors: Richard A. Mann, Barry S. Roberts

15th Edition

1285141903, 1285141903, 9781285141909, 978-0538473637

More Books

Students also viewed these Programming questions

Question

What are two important limitations of the Heckscher- Ohlin theory?

Answered: 1 week ago

Question

identify the classifications of interventions;

Answered: 1 week ago