Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

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

Question - show that the zero-point energy of a simple

Question - Show that the zero-point energy of a simple harmonic oscillator does not contribute to its entropy or heat capacity, but does contribute to its energy and Helmholtz function.

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 ...

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 ...

Assessment practical reportproduce a short technical report

Assessment: Practical Report Produce a short technical report in a form consistent with proteomic journals covering the techniques, results and interpretation of your proteomics experiment in the practical classes. The r ...

Question 1 define rock mechanics discuss the main

Question 1 . Define rock mechanics. Discuss the main objectives of the application of rock mechanics in mining. Question 2. Define stress. Draw a diagram and define the normal and shear stress by resolving the resultant ...

Q 1a discontinuity is found fully developed from the toe to

Q. 1 A discontinuity is found fully developed from the toe to the bench surface on a 15 m high slope, slope angle 65°. The discontinuity (frictional angle 32° and cohesion 20 kN/m2) is planar and its strike is parallel t ...

This is your second design assignment this assignment

This is your second design assignment. This assignment requires you to design a complex state machine. You are designing a digital alarm clock. There are various designs you can attempt. More complex designs are worth mo ...

1 online discussion forum - post your proposed topic and

1. Online Discussion forum - Post your proposed topic and chosen data set as well as a short plan for the project. This is required for approval of the topic. As discussed, students must select unique topics, therefore i ...

Engineering analysis assignment -for every problem provide

Engineering Analysis Assignment - For every problem, provide The MATLAB script/function files that solve the problems. Problem 1: Plot the function f(t) = (x+5) 2 /(4+3x 2 ) for -3 ≤ x ≤ 5. using plot command. Use the ar ...

  • 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