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++
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.
|