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

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

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