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

  Create the application to enter-search-edit information

You are neede to create the application to enter, search, edit and view personnel information of staff in company. This application is used by Human Resource, staff and administrator of application.

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Statement to assig nnew value to first element of array

Suppose that array of integers named a has been declared and initialized. Write single statement which assigns a new value to first element of the array.

  Write program for bucket sort containing method called sort

Columns indexed from 0 to n - 1, where n is the number of values to be sorted. Each row of the two-dimensional array is referred to as a bucket. Write a class named BucketSort containing a method called sort.

  Write bash script to copy file from one location to another

Write a bash script called mycopy that copies a file from one location to another. An example of running the script is given below.

  Program to read the contents of file into the array

Write down the program which asks user for a file name. Suppsoe the file contains the series of numbers, each written on separate line.

  What is the output of the statement

Given the subsequent array declaration, if the array is stored starting at address 2500, what is the output of the following statement?

  Create a user interface that uses the gridlayout manager

Define and compile the following two classes that will represent seats in a stadium and When creating a new Stadium, the constructor above will fill a 27x35 two-dimensional array of Seat objects, where each Seat has a number, row and section.

  In this assignment you will analyze supply chains for

in this assignment you will analyze supply chains for various products to determine the impacts of the designs of the

  Design and write payroll program-employee-s hourly pay rate

Design and write a payroll program that will prompt the user to enter an employee's hourly pay rate and the number of hours worked.

  Create a multi-view program for the iphone

Compress the entire XCode project folder as a single zip, rar or other file format using an "archive file" or compression utility like PKZIP.

  Program to continuously accepts each worker-s first name

Program which continuously accepts each worker's first and last names, this year's number of units produced, and last year's number of units produced.

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