What is code-warrior simulation result after moving the data

Assignment Help Other Engineering
Reference no: EM131065775

Please use either call-by-value or call-by-reference method to transfer your subroutine input/output parameters.

Your code shall be able to compute the above calculations for the following five sets of test data M and N, at least.

M

$5C

$42

$36

$6A

$88

N

$14

$26

$38

$42

$6E

a) Please store the source data M in the memory locations starting from $2000 to $2004 using data directives.

b) Please store the source data N in the memory locations starting from $2010 to $2014 using data directives.

c) Please store the result data Z in the memory locations starting from $2020 to $2029.

Please provide the following answers in your test submission.

a) Did you choose Call-by-value or Call-by-reference method for this task?

b) What shall be the correct answer to this test program?

M

$5C

$42

$36

$6A

$88

N

$14

$26

$38

$42

$6E

Z

 

 

 

 

 

c) What is your assembly program?

d) What is the code-Warrior simulation result (showing register and memory contents from address $ 2000 to $ 202F) before subroutine calculations?

e) What is the Code-Warrior simulation result (showing register and memory contents from address $2000 to $202F) after subroutine calculations?

PULA
PULY
PULB

Part C: Design and Implementation of Assembly Language Programs

This section asks you to design and implement assembly language programs that complete specific tasks.

Please design your program efficiently and implement your code in Code Warrior to test it.

For this part, please include appropriate comments in your assembly program.

Task 1: Use loop and stack operations to move data from one memory location to another memory location while reversing the order of data. For this task, please design a program that is able to copy data from one memory location to another memory location and reverse the order of data.

Test your code using the following test case:

Move six bytes of data from memory location $2100 to memory location $2120.

a) The following six hexadecimal data: $61, $A8, $43, $76, $B6 and $2F shall be stored in memory locations starting from $2100 before you test your program.

b) After your program is executed, the following six hexadecimal data $2F, $B6, $76, $43, $A8 and $61 shall be stored in memory locations starting from $2120. Please notice this list of data is in reverse order comparing to the original data set.

c) You must use two loops with stack operations in the loop (one loop for pushing data onto stack; and another loop for pulling data off the stack) in your program to complete this data transfer.

Please provide the following answers in your test submission.

a) What is your assembly program for this task?

b) What is the Code-Warrior simulation result (showing register and memory contents from address $2100 to $213F) before moving the data?

c) What is the Code-Warrior simulation result (showing register and memory contents from address $2100 to $213F) after moving the data?

Task 2: Use subroutine to complete certain arithmetic operations

For this task, design an assembly program with a subroutine that is able to complete the following calculation:

Z = (M + N x 3)/2 - 4 ;

Where a) Z is a 16-bit unsigned number to be stored into memory locations starting from M [$2020];
b) M is an 8-bit unsigned number to be retrieved from memory locations starting from M [$2000];
c) N is an 8-bit unsigned number to be retrieved from memory locations starting from M [$20 I 0];

Reference no: EM131065775

Questions Cloud

Personal budget financial planning tool for making decisions : Analyze your personal budget as a financial planning tool for making decisions in the following situations. In each case, how will they affect your budget (consider each individually)? A neighbor and coworker suggest that he and you commute to work t..
What are the earnings per share for the firm common stock : A company has 1,000 shareholders who own a total of one million shares of its common stock currently selling at $7 per share. The company earned $11,000,000 after taxes. The annual dividend is $.80 per share. The firm has assets of $137,000,000 and l..
Food ordering system in a restaurant : Draw the DFDs (Context and level 0) for a Food Ordering System in a restaurant. The Food Ordering System works as follows: Customer places their orders.
Risk is unchanged by the expansion : JRN enterprises just announced that it plans to cut its dividend from $2.25 to $1.30 per share and use the extra funds to expand its operations. Prior to this announcement, JRN's dividends were expected to grow at 5% per year and JRN's stock was trad..
What is code-warrior simulation result after moving the data : What is the Code-Warrior simulation result (showing register and memory contents from address $2000 to $202F) after moving the data?
What is the numerical value of the multiplier : What is the numerical value of the multiplier?
Annual rates charged by these two credit cards : Two credit cards both state an APR of 10%. First National Bank’s card charges 0.8333% compounded monthly. First United Bank’s card charges 5% compounded semiannually (twice a year). Given these APR’s, what are the effective annual rates charged by th..
Where they hope to achieve and to be : External environment analysis is focuses on factors outside the chosen company (not on company), the trend of these factors, their forecast implication and their impact on the company as Opportunity or Threat - and thus, these become the issues wh..
What is the current stock price : Marcel Co. is growing quickly. The company just paid a dividend of $2.00. Dividends are expected to grow at a 25% rate for the next three years, with the growth rate falling off to a constant 5% thereafter. If the required return is 7%, what is the c..

Reviews

Write a Review

Other Engineering Questions & Answers

  What is the friction factor of the tunnel

determine the resistance of the tunnel. If 70 m3 /s of air is passed along this tunnel what would be the pressure drop along the tunnel and what is the friction factor of the tunnel?

  Find the values of ra and rb

Using a 680-pF capacitor, design the astable circuit of Fig. to obtain a square wave with a 20-kHz frequency and an 80% duty cycle. Specify the values of RA and RB.

  What is percentage of th that is caused by interaction

For a CS amplifier with gm = 5 mA/V, Cgs = 5 pF, Cgd = 1 pF, CL = 5 pF, R1 sig = 10 kΩ, and R1L = 10 kΩ, find τH and fH. What is the percentage of τH that is caused by the interaction of R_ sig with the input capacitance? To what value must R_ sig..

  Environmental engineeringquestion 1 sulfur dioxide so2 is a

environmental engineeringquestion 1 sulfur dioxide so2 is a gas that is released from the burning of fossil fuels in

  Discuss the physiology associated with the loss of vision.

Describe at least three case studies concerning this topic and the findings from these case studies.

  It is important to include who worked on what questions on

working with your group detail the steps needed to monitor administrate and secure the network in regard to online

  Find the low-frequency gain am

Consider a bipolar cascode amplifier biased at a current of 1 mA. The transistors used have β = 100, ro = 100 KΩ , Cπ =10 pF, Cμ =2 pF, Ccs =0, and rx =50Ω. The amplifier is fed with a signal source having Rsig = 5 kΩ. The load resistance RL = 2 k..

  Ultrasonic and electrical capacitance tomography sensor

Use of ultrasonic and electrical capacitance tomography sensor for characterisation of multiphase flow in subsea metering

  What would be the dwell time in seconds

Plot the displacement diagram. Find the profile for a cam with a base radius of 4 cm (Assume knife edge follower). If the rotational speed of the cam is 240 rpm, what would be the dwell time in seconds and how long will it take the follower to rise ..

  What is communication overhead in networking

what is communication overhead in networking?what are the types of overhead?How to reduce communication overhead in broadcasting?

  Temperature end of expansion process

A four-cylinder, four-stroke, 2.2-L gasoline engine operates on the Otto cycle with a compression ratio of 10. The air is at 100 kPa and 60°C at the beginning of the compression process, and the maximum pressure in the cycle is 8 MPa. The compress..

  Demonstrate knowledge of it structures

Radio Frequency Identification Tags (RFIDs) are being used in ever greater numbers for an increasing diverse number of applications, from libraries to retail shops to Oyster cards.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd