Question

Complete this task4.s ARM assembly code to produce an assembly program that: • Waits for the...

Complete this task4.s ARM assembly code to produce an assembly program that: • Waits for the user to enter two integers (this part is already coded in). • Places the first integer at r5, and the second integer at r6 (this part is already coded in). • (This is what you need to code in) Adds the two integers together. If the result is between 0 and 9 (including 0 and 9) the program should print the result. If not, is should print a question mark (?). • Assume both integers entered will be no less than 0 and no greater than 50 For example, if the first integer is 4 and the second integer is 5, your output should look exactly like this:

4

5

9

END

If the first integer is 10 and the second is 3, your output should look exactly like this:

1

3

?

END

0 0
Add a comment Improve this question Transcribed image text
Know the answer?
Add Answer to:
Complete this task4.s ARM assembly code to produce an assembly program that: • Waits for the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a program in ARM assembly using ARMSim# to perform the following tasks: 1. Open a...

    Write a program in ARM assembly using ARMSim# to perform the following tasks: 1. Open a file named "integers.dat" and keep track of the following information: a.The first integer value is (i) b. The ith integer value is (j) c. Count the total number of integers in the file d. Count the number of integers that are less than j e. Count how many even numbers are less than j f. And how many odd numbers are less than j...

  • IN ARM7TDMI Problem 2 ARM Assembly Programming; Splitting Array an - Write an ARM assembly program...

    IN ARM7TDMI Problem 2 ARM Assembly Programming; Splitting Array an - Write an ARM assembly program to split to the end. This program first accepts an array. Then splits specification. Now it becomes 2 parts and then add first part of an array at the end of the second part. Assume an array of size 50 elements and define its elements using DCD directive an array from specified position and add first part an array according to the user Draw...

  • Finish the MARIE assembly language code below to determine the largest integer, the smallest integer, and...

    Finish the MARIE assembly language code below to determine the largest integer, the smallest integer, and the sum of integers for a sequence of 5 signed integers. The program already calculates the largest integer, just need it to calculate the smallest integer and the sum of the integers. The 5 integers should first be entered by the user via the input device. Your program is then assembled and run to determine the largest integer, the smallest integer, and the sum...

  • Write an assembler program that asks the user (as shown below) for two integers and a...

    Write an assembler program that asks the user (as shown below) for two integers and a single character representing the arithmetic operations: addition, subtraction, multiplication and integer division (displays both quotient and remainder). Perform the requested operation on the operands and display the result as specified below. Assume SIGNED NUMBERS. The program should not divide by 0! If the user attempts to divide by 0, display the error message: "Cannot divide by zero." If this error occurs, the program should...

  • Write MARIE assembly language programs that do the following: I. Write a program that inputs thre...

    Write MARIE assembly language programs that do the following: I. Write a program that inputs three integers, a, b, and c, in that order. It computes the following ia-bi-fc+ c The result should be written to output 2. Write a program that inputs integers, s. y, and z. It outputs the difference of the langest and first element entered. You may assume x. y, and z all have different values. So if 8, 12, and 9 are input, the output...

  • Arm Assembly Programming : Total of 3 assembly files using VisUAL arm emulator ( save as...

    Arm Assembly Programming : Total of 3 assembly files using VisUAL arm emulator ( save as .S file) 1. Write a program to solve the below expression:      Z= (a << 2) | (c & 15) 2. Write a program that adds the 32-bit two’s complement representations of −149 and 5 . Place the result in register r7. Submit your code with the resulting value in register r7 commented. 3. Write a program to mask first 9 bits of a...

  • Write a complete C++ program to ask the user to enter 4 integers. The program must...

    Write a complete C++ program to ask the user to enter 4 integers. The program must use a function to find the smallest integer among them and print it on the screen. Typical output screen should be as following: Write a complete C++ program to ask the user to enter 4 integers. The program must use a functionto find the smallest integer among them and print it on the screen. Typical output screen should be as following: Note: the code...

  • Write the assembly code that will transform a squared image into a negative print. (HARD-CODED OUTPUT...

    Write the assembly code that will transform a squared image into a negative print. (HARD-CODED OUTPUT WILL RESULT IN ZERO.) That is, every pixel whose unsigned value is 0 should change to 255, 1 should change to 254, 2 should change to 253, ... 255 should change to 0. $a0 contains the address of the input buffer, $a1 contains the address of the output buffer address, and $a2 contains the image dimension. Look at the below image for your reference:...

  • I need help with ARM assembly program : Using the following code as basic : 1...

    I need help with ARM assembly program : Using the following code as basic : 1 ) Write a program code that is able to calculate the following : Result = A + ( B * C ) - D Place the result as the return value so you can print it afterwards in the command prompt. 2) This time, use MLA instruction to reduce the number of instructions in question 1. Place the result as the return value so...

  • ARM assembly language Write a program "fibonacci.s" that computes the Nth Fibonacci number where N is...

    ARM assembly language Write a program "fibonacci.s" that computes the Nth Fibonacci number where N is not so large that overflow of integer arithmetic is a concern. When your assembly language program is called it should expect the value of N to be passed using register r0 and your program should return the Nth Fibonacci number in register r0. Please include comments as well. Do not just use the output generated by gcc -S

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT