Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Help with ARM Assembly Language. Here is my code. The program runs fine but how do I fix the code so the output is The

image text in transcribed

image text in transcribed

Help with ARM Assembly Language. Here is my code. The program runs fine but how do I fix the code so the output is "The sum of %d and %d is %d" instead of just "The sum of the two numbers is %d". the fix would be for the addition,subtraction and multiplication outputs. we had to convert from a C++ program into Assembly Language. he wants both user inputted integers as well as final integer value for each output display. thanks.

global main data It Section for constants, variables and literals intro: .asciziellot Welcome to Two Integers.n prompt 1: .asciz "Enter an integer for first ber: prompt 2: .asciz Enter an integer for second mumber: II Introduction messages to start program /t Prompt for user to enter first integer value It Pronpt for user to enter second integer value output1: asciz-vme sun of the two rulers is san" output2: .asciz "Vime difference of the two nubers is %dv- output3: .asciz-vme product of the to rubers is %dM" I Outputs sum of both integers // Outputs differnce of both integers ii Outputs product of both integers It Handles inputted integer values 1 Label for integer 1 inti: .word o int2: word 0 sunword 0 difference: .word 0 product: .word o Label for integer 2 / Label for sm of both integers // Label for difference of both integers /Label for prodcut of both integers i1 Sections that contains the program's code .text main: push (ir) I1 Saves return address forhen progran finishes /1 outputs introduction nessage II Prompts user to enter first II Scans keyboard for first inputted integer ldr ro. -intro bl printf ldr ro. -prompt bl printf ldr ro. scan pattern ldr ri. intl bl scanf I1 Pronpts user to enter second integer bl printf I1 Scans keyboard for second inputted integer ldr ro. -scan pattern ldr ri. -int2 bl scant global main data It Section for constants, variables and literals intro: .asciziellot Welcome to Two Integers.n prompt 1: .asciz "Enter an integer for first ber: prompt 2: .asciz Enter an integer for second mumber: II Introduction messages to start program /t Prompt for user to enter first integer value It Pronpt for user to enter second integer value output1: asciz-vme sun of the two rulers is san" output2: .asciz "Vime difference of the two nubers is %dv- output3: .asciz-vme product of the to rubers is %dM" I Outputs sum of both integers // Outputs differnce of both integers ii Outputs product of both integers It Handles inputted integer values 1 Label for integer 1 inti: .word o int2: word 0 sunword 0 difference: .word 0 product: .word o Label for integer 2 / Label for sm of both integers // Label for difference of both integers /Label for prodcut of both integers i1 Sections that contains the program's code .text main: push (ir) I1 Saves return address forhen progran finishes /1 outputs introduction nessage II Prompts user to enter first II Scans keyboard for first inputted integer ldr ro. -intro bl printf ldr ro. -prompt bl printf ldr ro. scan pattern ldr ri. intl bl scanf I1 Pronpts user to enter second integer bl printf I1 Scans keyboard for second inputted integer ldr ro. -scan pattern ldr ri. -int2 bl scant

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Spatio Temporal Database Management International Workshop Stdbm 99 Edinburgh Scotland September 10 11 1999 Proceedings Lncs 1678

Authors: Michael H. Bohlen ,Christian S. Jensen ,Michel O. Scholl

1999th Edition

3540664017, 978-3540664017

More Books

Students also viewed these Databases questions

Question

How was their resistance overcome?

Answered: 1 week ago

Question

3. What strategies might you use?

Answered: 1 week ago