Write a program larger that reads two numbers

Assignment Help Programming Languages
Reference no: EM131263296

Write the following simple programs in ARM assembly language. You cannot use gcc-S as a "template". You have to write your own programs by hand in assembly.

1. Write a program larger.s that reads two numbers from stdin, and prints the larger of the two numbers. The numbers can be positive, negative, or zero. To input the numbers to your program, you can use 'scanf' or something similar. Type one number followed by the enter key, then type the second number followed by the enter key, and then print the result to the terminal by using 'printf' or something similar. An example of what the output should look like is shown below.

pi@raspberrypi:∼/cs250/lab-src$ ./larger

-5

7

7

pi@raspberrypi:∼/cs250/lab7-src$ ./larger

1501

0

1501

2. Write a program length.s that reads a string Morn stdin and prin. the length of the string. You cannot use the C library function "strlen in this assignment. The length of the string is guaranteed to be less than 100 characters long, and there will be no while space. Type the string in the terminal and output the length to the terminal. An example output is shown below.

pi@raspberrypi:∼/cs250/lab7-src$ ./length

HelloWorld!

11

pi@raspberrypi:∼/cs250/lab7-src$ ./length

12345678901234567890

20

3. Write a program sumarray.s that reads 5 numbers from stdin and prints the sum of the numbers. The number of inputs is arbitrary and could be many more, so use a loop to read in the 5 numbers. For example, a loop would look like this. In other words, do not copy/paste the scanf and format character 5 times in your Program.

while x < 5

input [x] = scanf("%d")

x++

Reference no: EM131263296

Questions Cloud

What they are doing to support the sustainability effort : At least 3 sources of information as footnotes or separate bibliography, As a conclusion of your report, state your opinion whether this company is using the right (or wrong) approach and should other companies start adopting their methods?
Journal entries to record the initial capital investments : On February 1, 2014, Tessa Williams and Audrey To formed a partnership in the province of Ontario. Williams contributed $90,000 cash and To contributed land valued at $130,000 and a small building valued at $190,000. Present General Journal entries t..
Business productivity and cost reduction : According to the text, the authors asserted that business productivity and cost reduction were the top concerns by a wide margin among the top five management concerns. Give your opinion on whether or not you agree with this assertion. Justify yo..
Find the transition matrix p and the matrices q and r : For the Markov chain of Exercise , find the average number of years a first-year, second-year and third-year. - Find the transition matrix P and the matrices Q and R.
Write a program larger that reads two numbers : Write a program larger.s that reads two numbers from stdin, and prints the larger of the two numbers. The numbers can be positive, negative, or zero
Use positive or negative accounts receivable confirmations : What best describes the situation for the auditor to use positive or negative accounts receivable confirmations? Use negative requests if accounts receivable consists of many small accounts and positive confirmations if accounts receivable consists o..
What is the optimal amount of output the ?rm : Solve for the marginal cost function using your result from part a). Suppose p = 50 and that the ?rm is a price taker. What is the optimal amount of output the ?rm should produce?
Annual cost data at full capacity : The Dorilane Company specializes in producing a set of wood patio furniture consisting of a table and four chairs. The set enjoys great popularity, and the company has ample orders to keep production going at its full capacity of 4,100 sets per year...
Evaluate the level of impact of it on information management : Evaluate the level of impact of IT / enterprise architecture on information management (e.g., the flow of information throughout the company / organization, etc.) within a company or industry of your choice.

Reviews

len1263296

11/2/2016 5:56:05 AM

This assignment should be completed on a Raspberry Pi 3. It would be great if you can add some comment on the code, explain how the instruction works. Write the following simple programs in ARM assembly language. You cannot use gcc-S as a "template". You have to write your own programs by hand in assembly.

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

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