Question

I need help with this. Thanks. Write a program in assemble to calculate the area of...

I need help with this. Thanks.

Write a program in assemble to calculate the area of a trapezoid of the following parameters.

- shorter side a=3,

- longer side b=7,

- height h=4.

result= (a+b)/2 x h

the whole code is not required. Just show how you would declare all variables that you would need to calculate the area of trapezoid (a, b, h).

0 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE:

move.1 (base1), d0

move.1 (base2), d1

add.w d0,d1 ;add the bases

move.1 (height), d3

mulu d1,d2 ;multiply height and sum of bases

divu #2,d3 ;divide the result by 2

NOTE(Is it enough  for you ?)

Add a comment
Know the answer?
Add Answer to:
I need help with this. Thanks. Write a program in assemble to calculate the area of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a JavaScript program to calculate Area of a trapezoid Equation: Area = (top side +...

    Write a JavaScript program to calculate Area of a trapezoid Equation: Area = (top side + bottom side) * height / 2 1. Use prompt() function to take top side, bottom side, and height values from user 2. For validation, if user did not put in a number, your program must send out 3. "Input must be number" error message using alert() function. 4. If user put in all numbers, use alert() function to output correct answer

  • Write a JavaScript program to calculate Area of a trapezoid Equation: Area = (top side +...

    Write a JavaScript program to calculate Area of a trapezoid Equation: Area = (top side + bottom side) * height / 2 1. Use prompt() function to take top side, bottom side, and height values from user 2. For validation, if user did not put in a number, your program must send out 3. "Input must be number" error message using alert() function. 4. If user put in all numbers, use alert() function to output correct answer

  • 2. Write a program with three functions that will be called from the main function The functions will calculate the...

    2. Write a program with three functions that will be called from the main function The functions will calculate the volume, area and perimeter of a cuboid. You should able to pass three parameters such as length, width and height, and a function will return area, another will return volume and final one will return perimeter. Define all your variables in floating point numbers 3. Modify the problem#2 to calculate the volume, area and perimeter in a sing le function...

  • I need help with the following. I need to write a program code in Java using...

    I need help with the following. I need to write a program code in Java using NetBeans. It is from How to Program Java book Chapter 2. This program should calculate the packing of Candles. First read: The number of candles The number of candles that fit in each case Then calculate and print: The number of full cases The number of candles left over (partial case) If this order is large (more than 5 full cases needed) An extra...

  • 5. (30 pts) Write a program that calculates the surface area of a cube (see the...

    5. (30 pts) Write a program that calculates the surface area of a cube (see the formula below). The user inputs the cube's side length and your program will then print out the surface area of that cube. Your code must follow the output in the sample run below. Your program must be complete and correct, but you do not need to include comments. Here is the formula to calculate surface area given a cube's side length: surface area 6...

  • I need help with this assignment. Please include comments throughout the program. Thanks Develop an algorithm...

    I need help with this assignment. Please include comments throughout the program. Thanks Develop an algorithm and write the program in java for a simple game of guessing at a secret five-digit code. When the user enters a guess at the code, the program returns two values: the number of digits in the guess that are in the correct position and the sum of those digits. For example, if the secret code is 13720, and the user guesses 83521, the...

  • ******** IN JAVA ********* I have a program that I need help debugging. This program should...

    ******** IN JAVA ********* I have a program that I need help debugging. This program should ask a user to input 3 dimensions of a rectangular block (length, width, and height), and then perform a volume and surface area calculation and display the results of both. It should only be done using local variables via methods and should have 4 methods: getInput, volBlock, saBlock, and display (should be void). I have most of it written here: import java.util.*; public class...

  • Using C++, Write a program that will provide the user a menu from which the user...

    Using C++, Write a program that will provide the user a menu from which the user may select to calculate the area of one of four geometric shapes: a circle, a rectangle, a triangle, and a trapezoid. You should use the most appropriate SWITCH block for this program. The user will input all data needed to calculate the area. The program should output all data input by the user, the calculated area, and the geometric shape selected. Run this program...

  • Hi there in need of help with illustrating a code for this problem using python. Thanks....

    Hi there in need of help with illustrating a code for this problem using python. Thanks. Problem 2: Write a program based on the following lowchart 50 marks for correct working Start Declare float celsas tahrenheit Display Enter a Calsius temperature Input celsius Set fafrenhek (9.0150) celsius 32 Display "That ls equal to tahrenheit degrees Fahrenhai End 100

  • guys can you please help me to to write a pseudo code for this program and...

    guys can you please help me to to write a pseudo code for this program and write the code of the program in visual studio in.cpp. compile the program and run and take screenshot of the output and upload it. please help is really appreciated. UTF-8"CPP Instruction SU2019 LA X 119SU-COSC-1436- C Get Homework Help With Che X Facebook -1.amazonaws.com/blackboard.learn.xythos.prod/584b1d8497c84/98796290? response-content-dis 100% School of Engineering and Technology COSC1436-LAB1 Note: in the instruction of the lab change "yourLastName" to your last...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT