Ask Other Engineering Expert

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];

Other Engineering, Engineering

  • Category:- Other Engineering
  • Reference No.:- M91790158

Have any Question?


Related Questions in Other Engineering

Register design a cpu register is simply a row of

Register design A CPU register is simply a row of flip-flops (i.e. SR, JK, T, etc) put side by side in an array to make the size of register required. For example, an 8 bit register has 8 flip-flops side by side for stor ...

A detailed review of spatial modulation and simulation

A Detailed Review of Spatial Modulation and Simulation Learning Outcomes a. Learn how to model mobile communication channels d. Discern knowledge development and directions on the recent advances in 4G to the research pr ...

Mine safety amp environmental engineering assignment -part

Mine Safety & Environmental Engineering Assignment - Part 1 - Questions 1. Occupational health and safety is the primary factor that needs to be considered in the mining industry. Discuss this statement. 2. Define the fo ...

Projectflow processing of liquor in a mineral refining

Project Flow Processing of Liquor in a Mineral Refining Plant The aim of this project is to design a flow processing system of liquor (slurry) in a mineral (aluminum) refining plant. Aluminum is manufactured in two phase ...

Learning outcomes evaluate multiuser communication and

Learning Outcomes Evaluate multiuser communication and resource sharing techniques; Apply the techniques of, and report on, digital communication applications using Matlab and hardware devices. Assignment Description The ...

Operations engineering assignment -please select only one

Operations Engineering Assignment - Please select only one of the following case studies for your assignment: CASE A. Tesla Motors Tesla is an innovative manufacturer that designs, assemble and sells fully electric vehic ...

Select a risk problem from the list below and prepare a

Select a risk problem from the list below and prepare a risk management plan in accordance with AS/NZS ISO 31000:2009. Please ensure that: - Establish the context clearly, in accordance with the Standard; - Define your s ...

Engineering materials term paper assignment -conduct a

ENGINEERING MATERIALS TERM PAPER ASSIGNMENT - Conduct a thorough literature search and write a 15-20 page technical review paper on the evolution of the engineering materials used in the manufacturing of any one of the f ...

Task 1using the lab kit design a circuit for the processor

Task 1: Using the lab kit, design a circuit for the processor to control the output of a connected 7-segment LED display device. You will be provided with a standard common anode 7-segment display of the type FND-507 (or ...

Control theory - lab reportsfor experiments 1 to 4 you must

Control Theory - Lab Reports For experiments 1 to 4 you must undertake the following: a) At the start of each section (including the pre-lab activities) there are a number learning outcomes. That is, what students should ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As