Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

**Please Use Arm Assembly Language** I need it in ARM Language Cortex A-7 NOT MIPS or Intel. PLEASE USE SKELETON BELOW (Fill in solution into

**Please Use Arm Assembly Language**

I need it in ARM Language Cortex A-7

NOT MIPS or Intel.image text in transcribed

PLEASE USE SKELETON BELOW (Fill in solution into "Your Solution Here"):

.global toInFix .data // declare any global variables here .text toInFix: mov r12,r13 // save stack pointer into register r12 sub sp,#32 // reserve 32 bytes of space for local variables push {lr} // push link register onto stack -- make sure you pop it out before you return 
INTRODUCTION: In Reverse Polish (postfix) notation the operators follow their operands, for instance, to add three and four one would write "3 4 rather than "3 4". If there are multiple operations, the operator is given immediately after its second operand, so the expression written "3 4 5" in conventional infix notation would be written "3 4 5 in RPN: first subtract 4 from 3, then add 5 to that. An advantage of RPN is that it obviates the need for parentheses that are required by infix. While "3 4 5" can also be written "(3 4) 5", that means something quite different from "3 (4 5)", and only the parentheses disambiguate the two meanings. In postfix, the latter would be written "3 4 5 +-i, which unambiguously means "3 (4 5 Interpreters of Reverse Polish notation are stack-based, that is, operands are pushed o a stack, and when an operation is performed, its operands are popped from a stack and it result pushed back on. Stacks, and therefore RPN, have the advantage of being easy to implement and very fast. Please complete the implementation of the two functions given in the questions section below QUESTION 1: Write a function to convert a given function from infix to postfix in assembly. The basic structure of the function is given in the attached assembly language file QUESTION 2: Write a function to convert a given function from postfix to infix in assembly language. The basic structure of the function is given in the attached assembly language file INTRODUCTION: In Reverse Polish (postfix) notation the operators follow their operands, for instance, to add three and four one would write "3 4 rather than "3 4". If there are multiple operations, the operator is given immediately after its second operand, so the expression written "3 4 5" in conventional infix notation would be written "3 4 5 in RPN: first subtract 4 from 3, then add 5 to that. An advantage of RPN is that it obviates the need for parentheses that are required by infix. While "3 4 5" can also be written "(3 4) 5", that means something quite different from "3 (4 5)", and only the parentheses disambiguate the two meanings. In postfix, the latter would be written "3 4 5 +-i, which unambiguously means "3 (4 5 Interpreters of Reverse Polish notation are stack-based, that is, operands are pushed o a stack, and when an operation is performed, its operands are popped from a stack and it result pushed back on. Stacks, and therefore RPN, have the advantage of being easy to implement and very fast. Please complete the implementation of the two functions given in the questions section below QUESTION 1: Write a function to convert a given function from infix to postfix in assembly. The basic structure of the function is given in the attached assembly language file QUESTION 2: Write a function to convert a given function from postfix to infix in assembly language. The basic structure of the function is given in the attached assembly language file

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_2

Step: 3

blur-text-image_3

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

Relational Database Design With Microcomputer Applications

Authors: Glenn A. Jackson

1st Edition

0137718411, 978-0137718412

More Books

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago

Question

When would you use one approach, and when would you use another?

Answered: 1 week ago