Question

1. Write a program to evaluate 3ab - 2bc - 5a + 20ac - 16 Prompt...

1. Write a program to evaluate 3ab - 2bc - 5a + 20ac - 16 Prompt the user for the values a, b, and c. Try to use a small number of registers. Use the stack to hold intermediate values. Write the final value to the monitor. Hint: please use ‘syscall’ learned in Chapter 22 to read string and print integer and stack operations learned in Chapter 25 to hold intermediate values. You may also look at the example in Chapter 25.

2. Please convert 8-bit fixed point expression 10110111 to decimal (Chapter 29).

3. Please convert decimal expression 65.71875 to hexadecimal in 32-bit IEEE 754 single precision format (Chapter 30).

Book Link: http://chortle.ccsu.edu/AssemblyTutorial/index.html

0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 10 more requests to produce the answer.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
1. Write a program to evaluate 3ab - 2bc - 5a + 20ac - 16 Prompt...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • 1 please IEEE-754 Floating point conversions problems (assume 32 bit machine): 1. For IEEE 754 single-precision...

    1 please IEEE-754 Floating point conversions problems (assume 32 bit machine): 1. For IEEE 754 single-precision floating point, write the hexadecimal representation for the following decimal values: a. 27.1015625 b.-1 2. For IEEE 754 single-precision floating point, what is the decimal number, whose hexadecimal representation is the following? a. 4280 0000 b. 7FE4 0000 c. 0061 0000 3. For IEEE-754 single-precision floating point practice the following problem: Suppose X and Y are representing single precision numbers as follows: X 0100...

  • Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the...

    Using the AddTwo program from Section 3.2 as a reference, write a program that calculates the following expression, using registers: A = (A + B) + (C + D). Assign integer values to the EAX, EBX, ECX, and EDX registers. AddTwo program: ; AddTwo.asm - adds two 32-bit integers ; Chapter 3 example .386 .model flat,stdcall .stack 4096 ExitProcess PROTO, dwExitCode:DWORD .code main PROC mov eax,5 ; move 5 to the eax register add eax,6 ; add 6 to the...

  • JAVA, please You must write a robust program meaning that your program should not crash with...

    JAVA, please You must write a robust program meaning that your program should not crash with any given data. Data validation must be done any time that user enters an input. Write a program that 1. Gets an infix expression form the user and evaluate the expression using stack ADT a. Finds the postfix equivalent of the given infix expression b. Evaluate the created postfix expression. c. Note: your program should not crash when you enter an invalid expression such...

  • Question#1 Write a short program demonstrating that the INC and DEC instructions do not affect the...

    Question#1 Write a short program demonstrating that the INC and DEC instructions do not affect the Carry flag. Question#2 Write a program that uses addition and subtraction to set and clear the Overflow flag. After each addition or subtraction, insert the call DumpRegs statement to display the registers and flags. Make sure to include an ADD instruction that sets both the Carry and Overflow flags. Using comments, explain how and why the Overflow flag was affected by each instruction. Question#3...

  • Write a program to evaluate the arithmetic expression: (25xy - 10x - 6y + 28)/7 Use...

    Write a program to evaluate the arithmetic expression: (25xy - 10x - 6y + 28)/7 Use symbolic addresses x, y, answer, and remainder. Pick two registers for x and y and load them from memory. At the end of the program, store the answer and remainder to memory. Assume that the values are small enough so that all results fit into 32 bits. Since load delays are turned on in SPIM be careful what instructions are placed in the load...

  • Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQ...

    Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQUIRED for this program will use two stacks, an operator stack and a value stack. Both stacks MUST be implemented using a linked list. For this program, you are to write functions for the linked list stacks with the following names: int isEmpty (stack); void push (stack, data); data top (stack); void pop (stack); // return TRUE if the stack has no...

  • Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQ...

    Infix Expression Evaluator For this project, write a C program that will evaluate an infix expression. The algorithm REQUIRED for this program will use two stacks, an operator stack and a value stack. Both stacks MUST be implemented using a linked list. For this program, you are to write functions for the linked list stacks with the following names: int isEmpty (stack); void push (stack, data); data top (stack); void pop (stack); // return TRUE if the stack has no...

  • **Write In JAVA Please!!** 2. Write a program to apply the Modified Newton's Method Tn-1 to...

    **Write In JAVA Please!!** 2. Write a program to apply the Modified Newton's Method Tn-1 to the equation ()3r2 +4 0 starting with o 3. Use m and 2 and make separate numerical runs. In each case, set the maximum number of iterations to 25, but stop the computation when the backward error, i.e. f(n), is less than 10-12, Print all intermediate points xn and backward errors f(xn). Verify the convergence rates of your numerical solutions in both cases. (For...

  • **URGENT** Please help with this MIPS program? (calculator program that uses values from a user's input...

    **URGENT** Please help with this MIPS program? (calculator program that uses values from a user's input file and solves them; needs order of operations) Write a MIPS Assembly Language program to read hexadecimal values and operations (one per line) from a file. The file name should be requested and read in from the console. Once the ascii number has been read in, convert it to internal, binary, storage (decimal). The input format may be either fixed-format, 32-bit, twos compliment values,...

  • . Use what you learned from our First Python Program to write a Python program that...

    . Use what you learned from our First Python Program to write a Python program that will carry out the following tasks. Ask user provide the following information: unit price (for example: 2.5) quantity (for example: 4) Use the following formula to calculate the revenue: revenue = unit price x quantity Print the result in the following format on the console: The revenue is $___. (for example: The revenue is $10.0.) . . Use the following formula to calculate the...

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
Active Questions
ADVERTISEMENT