Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write an ARMv8 assembly language main function to serve as a simple floating-point calculator It should prompt the user for 2 floating-point numbers and then

image text in transcribed
image text in transcribed
Write an ARMv8 assembly language main function to serve as a simple floating-point calculator It should prompt the user for 2 floating-point numbers and then perform one of the 4 operations (+,, /and print the results as shown in the example output. Your function must be called main and defined like a C main function. It should not accept any parameters and must return an integer (as usual for C main routines). This lab will use the Linux C compiler and the C runtime library along with your assembly language main program. The purpose of this lab is to get some experience calling C runtime functions from an assembly language function. Step Complete Write an ARMv8 assembly language function that will serve as a C 1 main function. Your program should call printf and scanf to do all of this program's input and output. Screen shot the results of this run Example output from this program: odroid@odroid64:~/Desktops gcc -g -std-cll -o Lab9 Lab9s1.s odroid@odroid64:~/Desktop$./Lab9 Enter 2 floating-point numbers (both zero to quit): 2.5 3.5 Enter an operator (+ *, or /): + 2.5000003.500000 6.000000 Enter 2 floating-point numbers (both zero to quit): 0 0 odroid@odroid64:~/Desktop$ Call your assembler source file lab9s1.s. Be sure to save your completed program and screenshot(s) to your usb drive. Then zip them and submit this zip fil e to the Lab BlackBoard site Write an ARMv8 assembly language main function to serve as a simple floating-point calculator It should prompt the user for 2 floating-point numbers and then perform one of the 4 operations (+,, /and print the results as shown in the example output. Your function must be called main and defined like a C main function. It should not accept any parameters and must return an integer (as usual for C main routines). This lab will use the Linux C compiler and the C runtime library along with your assembly language main program. The purpose of this lab is to get some experience calling C runtime functions from an assembly language function. Step Complete Write an ARMv8 assembly language function that will serve as a C 1 main function. Your program should call printf and scanf to do all of this program's input and output. Screen shot the results of this run Example output from this program: odroid@odroid64:~/Desktops gcc -g -std-cll -o Lab9 Lab9s1.s odroid@odroid64:~/Desktop$./Lab9 Enter 2 floating-point numbers (both zero to quit): 2.5 3.5 Enter an operator (+ *, or /): + 2.5000003.500000 6.000000 Enter 2 floating-point numbers (both zero to quit): 0 0 odroid@odroid64:~/Desktop$ Call your assembler source file lab9s1.s. Be sure to save your completed program and screenshot(s) to your usb drive. Then zip them and submit this zip fil e to the Lab BlackBoard site

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems Design Implementation And Management

Authors: Peter Robb,Carlos Coronel

5th Edition

061906269X, 9780619062699

More Books

Students also viewed these Databases questions