Write assembly functions that implement the C functions

Assignment Help Assembly Language
Reference no: EM132245698

Assignment - Write assembly functions that implement the following C functions:

a. uint32_t add32(uint32_t x, uint32_t y) // returns (x+y)%(2^32); any carry out is lost

b. uint64_t add32_64(uint32_t x, uint32_y) // returns x+y; sum contains any carry

c. uint64_t add64(uint64_t x, uint64_t y) // returns (x+y)%(2^64)

d. uint32_t shiftLeftU32 (uint32_t x, uint32_p) // returns x << p = x*2^p for p = 0..31

e. uint32_t shiftU32(uint32_t x, int32_p) // return x*2^p for p = -31..31

f. int32_t shiftLeftS32 (int32_t x, uint32_p) // returns x << p = x*2^p for p = 0..31

g. int32_t shiftS32(int32_t x, int32_p) // return x*2^p for p = -31..31

h. uint32_t isEqual32(uint32_t x, uint32_t y) // returns 1 if x=y, 0 if x!=y

i. int32_t isEqual32(int32_t x, int32_t y) // returns 1 if x=y, 0 if x!=y

j. uint32_t isEven(uint32_t x) // returns 1 if even, 0 if not even

k. uint32_t maxU32(uint32_t x, uint32_t y) // returns the maximum of x, y

l. int32_t maxS32(int32_t x, int32_t y) // returns the maximum of x, y

For each of these programs, submit a file named hw2_4x.s where x is a, b, c, d, e, f, g, h, I, j, k, or l. Each file must include assembler directives so that it can be assembled with the following command as -o hw2_4x_s.o hw2_4x.s with the function being callable from a C program.

Attachment:- Assignment Files.rar

Reference no: EM132245698

Questions Cloud

Examine the decision-making process in business : Examine the decision-making process in business and its importance. Provide an example of a business decision based on multiple choices made.
Are confidence intervals one-tailed or two-tailed : Is there a major difference between the two pieces of equipment? Why or why not?
How many articles were reviewed : Locate a research article with a literature review on a healthcare topic that has been published within the last five years utilizing ProQuest.
How you identify customer requirements : SITXCCS007 Enhance customer service experiences - SITXCCS008 - Develop and manage quality customer service practices
Write assembly functions that implement the C functions : Write assembly functions that implement the following C functions. We are doing assembly in ARM using Raspberry pi
Compare the impact of the previous three presidential agenda : NURS_6050 In Part 1 of this module's Assignment, you were asked to begin work on an Agenda Comparison Grid to compare the impact of the previous.
Personnel policy manual and the employee guide : What are the differences between the Personnel Policy Manual and the Employee Guide?
Define recommendations for improving personal health records : Personal Health Records (PHRs) are designed to give consumers access and control of their health information. PHRs are tools that give consumers.
Calculate reliability for each plan : In either case, three machines would be used with reliabilities equal to the original three. Calculate reliability for each plan?

Reviews

len2245698

2/28/2019 9:29:25 PM

Instructions: Need to write assembly code for the following C functions. We are doing assembly in ARM using Raspberry pi. I have attached the pdf file with question and also 1 sample example of c and assembly code with compile instruction. For each of these programs, submit a file named hw2_4x.s where x is a, b, c, d, e, f, g, h, I, j, k, or l. Each file must include assembler directives so that it can be assembled with the following command as –o hw2_4x_s.o hw2_4x.s with the function being callable from a C program.

Write a Review

Assembly Language Questions & Answers

  Design a simple digital clock

Design a simple digital clock

  Modify the single-cycle mips processor

Modify the single-cycle MIPS processor to implement one of the following instructions. Sec Appendix B for a definition of the instructions. Mark up a copy to indicate the changes to the datapath. Name any new control signals.

  How to express restrictions in register interference graph

The DEC Alpha architecture places the following restrictions on floating-point instructions. Show how to express these restrictions in the register interference graph.

  Write an assembly language program using the pep8 assembler

Write an assembly language program using the PEP8 assembler (free download) that corresponds to the following C++ program

  Write an arm assembly program

Write an ARM assembly program that prints all the integers greater than 0 and less than 1000 that not divisible by 5.

  Create an hla assembly language program

Create an HLA Assembly language program that prompts for a number from the user. Create and call a function that calculates a value in the Fibonacci sequence.

  Write a program in assembly language which uses bios

write a program in assembly language which uses bios interrupt int 21 to read current system time and displays it on

  Write the required embedded assembler code

Write the required embedded (_asm) assembler code for each section in the corresponding inline assembler blocks denoted by the _asm keyword.

  Develop a program that will implement conditional statement

EECS 2110- Using the MARS or SPIM simulator develop a program that will implement the following conditional statement. Write a program with a leaf subprogram that will take two values in $a0 and $a1 and compute their greatest common divisor.

  Design a calculator in assembly

Design a calculator in assembly that can handle +,-,/,%, * and expresses errors in the case of division by zero or invalid characters using the template below.

  Write an assembly language program in armv-eight

Write (and test using DS5) an assembly language program in ARMv8 to find the sum, the largest and the smallest of n non-zero positive integers.

  Write an assembly program that calculates the edit distance

Write an assembly program called editDist.s that calculates the edit distance between 2 strings. An explanation of what edit distance is can be found here while accompanying pseudo code can be found here.

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