Write a subroutine to carry out the operation xy z where x


Question: 1. Why is it a good idea to pass parameters to and from a subroutine by means of the stack?

2. Write a subroutine to carry out the operation X*(Y + Z), where X, Y, and Z are all wordlength (i.e., 16-bit) values. The three parameters, X, Y, and Z, are to be passed on the stack to the procedure. The subroutine is to return the result of the calculation via the stack. Note the 68000 instruction MUTAT DO, D1 multiplies the I 6-bit unsigned integer in DO by the 16-bit unsigned integer in D1 and puts the 32-bit product in Dl. Write a subroutine, call it, and pass parameters X, Y, and Z on the stack. Test your program by using the 68000 simulator debugging facilities.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a subroutine to carry out the operation xy z where x
Reference No:- TGS02326668

Expected delivery within 24 Hours