Write a main program to call a procedure

Assignment Help Programming Languages
Reference no: EM13802745

Study the steps in the program shown in example above and predict the return value in variable z. The program simply implements the algorithm for the formula z = (2w+3)/4.

 

A. Edit, assemble, and run the program shown in the example above on the Tower.  Check the value that it produces in z on your calculator.

 

B. Cut and paste memory to show the value of z.

 

C. Cut and paste the Register window to show the remainder.

 

2. Write a main program to call a procedure that converts the Fahrenheit temperature value stored in the location labeled TdegF to its Celsius equivalent. The range of temperatures is 32°F to 212°F. The procedure stores the converted temperature in location TdegC. 

 

The following is the algorithm for temperature conversion:

 

-  Subtract 32 from Fahrenheit temperature;

 

-  Multiply the result of subtraction by five; and

 

-  00000000Divide the result of multiplication by nine.

 

A. Cut and paste the source code.

 

B. Test your program for three different values and show the result of each one by dumping memory.

 

3. Edit, assemble, and run the program shown in Example 2 above on the Tower. 

 

A. Check the code for the value, $73. Cut and paste the memory to show the number of zeros for this value.

 

B. Check the code for the value, $88. Cut and paste the memory to show the number of zeros for this value.

 

3. Even parity is where there is an even number of 1s in a string of data bits. Write a program to check the value loaded into Accumulator B and determine the state of the extra bit that would need to be added to the string in B in order to make all nine-bits have EVEN parity. Store that ninth (parity) bit as the MSB of Accumulator A and exit.

 

Example: If the value of B is 00111010, the number of ones in this pattern is four. This number is already even. Therefore, the extra bit is zero.

 

Example: If the value of B is 00101100, the number of ones in this pattern is three. This number is odd. Therefore, the extra bit is 1. The total number of ones, including the extra bit, becomes even.

 

A. Cut and paste the source code.

 

B. Test the code with the two values, 00111010 and 00101100. Cut and paste the Register window for each case to show the value of the extra bit in Register A.

Reference no: EM13802745

Questions Cloud

Differentiate between the concepts of ethics and morals : differentiate between the concepts of ethics and morals
Write an bibliography paper about gun violeneces in miami : Write an Annotated Bibliography paper about gun violeneces in miami.
Explain the duties of the public servant : Explain the duties of the public servant.
Sabermetric-based player evaluation : Examine why sabermetric-based player evaluation is such a shock to other executives in baseball. Evaluate why Beane is much more effective in his success by constructing a matrix of pitfalls and heuristics that highlight the differences between Bea..
Write a main program to call a procedure : Write a main program to call a procedure that converts the Fahrenheit temperature value stored in the location labeled TdegF to its Celsius equivalent. The range of temperatures is 32°F to 212°F
What are power factor improvement methods : What are Power Factor improvement Methods ? and what Their advantages & Disadvantages ?
What would be the dilemma and the implications : How do they differ from other situations resulting in disagreement between conflicting preferences, needs, or expectations?
What are common stereotypes and how can they be reversed : What are common stereotypes and how can they be reversed?
Work breakdown structure : See page 33 of the text for a graphic example of a work breakdown structure (WBS) hierarchy. Create a three level product-based WBS from a project you have managed or have experience with as a team member and present a graphic representation of yo..

Reviews

Write a Review

 

Programming Languages Questions & Answers

  Program display meal cost and tax amount

The program should then display the meal cost,taxAmt, and total bill respectively and use named constants Tax and tip to initialize the tax and the tip values.

  Write script to get gross sales for each employee by xhtml

Use a one-dimensional array to solve the folloing problem: Write a script (using an array of counters) that obtains the gross sales for each employee through an XHTML form and determines how many of the salespeople earned salaries

  Subdividing address block among four different customers

The ISP needs to subdivide the address block among four different customers, requiring 29, 28, 27, and 26 hosts respectively.

  Compute service charge customer owes for writing bad check

Create the output and sketch the flowchart or write pseudocode for program which computes service charge a customer owes for writing bad check.

  Aggregate planning for a bottling companya bottling company

aggregate planning for a bottling companya bottling company has decided to introduce a new line of premium bottled

  Write a program that will generate an array

Write a program that will generate an array

  Design a math sorting game

Using Visual Studio 2010, design a math sorting game. A random number between 1 and 99 will be generated and displayed to the user. User will quickly have to divide that number by 3, and come up with remainder.

  Create a list of short bulleted phrases showing all details

Rewrite this problem statement in your own words. Create a list of short bulleted phrases showing all details about this problem. This list should include both the explicitly defined and implied details in the problem statement.

  Calculate the sum of squares of numbers using for loop

Given int variables k and total which have already been declared, use for loop to calculate the sum of squares of first 50 counting numbers, and store this value in total.

  One-dimensional as array of counters to solve problem

Write program which determines how many salespeople earned salaries in each of following ranges. Use the one-dimensional as the array of counters in solving this problem

  Explain the interaction framework

Explain the Interaction Framework discussed by Steven Heim (2008). Choose a computing device (like an ATM machine or the self-check-out at a grocery store

  Benefits of programming with objects and classes

How is it different from programming with functions alone? Write down benefits of programming with objects and classes in Web applications?

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