Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question :

Suppose you have two arrays of 8-bit signed integers P[i] and Q[i] for 0 = i < N. Write a subroutine mdiff that will find the maximum of (Q[i]-P[i]) for 0 = i < N.

A pointer to the array P is passed in register X and a pointer to the array Q is passed in register Y. The number of elements in each array N is passed in accumulator A.

The result should be returned in accumulator A, overwriting the value N. (You can assume that the values of P(i) and Q(i) lie between -63 and +63 so that their difference is always representable as an 8-bit signed quantity)

(i) You are required to save and restore any accumulators and/or registers used by the subroutine (other than A). The pointers in X and Y should be returned unchanged to the calling program.

(ii) The contents of the arrays P and Q should not be changed. (HSC12 Assembly language)

(a) Draw the stack frame as seen by the subroutine

(b) Write the code for the subroutine

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M93130815

Have any Question?


Related Questions in Computer Engineering

Algorithms assignment -task -1 design and implement an

Algorithms Assignment - TASK - 1. Design and implement an efficient algorithm for determining the best route between two given stations in a given rail network. 2. The rail network should be passed to your program as an ...

When selecting a new computer identify the key components

When selecting a new computer, identify the key components that drive the performance of the machine. And, if you were to spend additional funds on increasing the computer's performance, which component would provide the ...

Question have you received emails like thesewhat actions if

Question : Have you received emails like these? What actions, if any, have you taken to limit the permissions of the sender? Why or why not? In your chapter reading, you learned about the CAN-SPAM law From your perspecti ...

Question do a research on the internet and discuss about

Question : Do a research on the Internet and discuss about the history of development of the networking field. Also discuss some of the recent trends in the networking area, (approx 200 words)

Language is cgenerate a sparse vector class with operator

Language is C++ Generate a sparse vector class with * operator, such as Vector Vector::operator * (Vector& param) A multiplication (*) operators returns element-wise multiplication of two vectors in another vector. Given ...

Calculate the present worth of all costs for a newly

Calculate the present worth of all costs for a newly acquired machine with an initial cost of $30,000, no trade-in value, a life of 15 years, and an annual operating cost of $13,000 for the first 4 years, increasing by 1 ...

Can someone help me identify how intrustion detection

Can someone help me identify how Intrustion detection system and intrusion prevent system can help protect confidentiality, integrity and availability

Questionbased on the option chain below consider an

Question: Based on the option chain below : Consider an asymmetric butterfly constructed using the given put options with the low strike at 58, the peak at 60 and the high strike at 64, for one unit of the underlying ass ...

We say that a binary tree t is perfectly balanced if for

We say that a binary tree T is perfectly balanced if, for each node n in T , the number of keys in the left and right subtrees of n differ at most by 1. Write an algorithm called Is-Perfectly-Balanced that, given a binar ...

Assessment details part 1 design documentation and peer

Assessment Details: Part 1: Design Documentation and Peer Review This stage requires you to select a problem to solve using one of the available Mindstorms Robots, design a possible solution to this problem and submit th ...

  • 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