This is a second time posting this question, please do not use MIPS this is impl
ID: 3600489 • Letter: T
Question
This is a second time posting this question, please do not use MIPS this is implemented using ARM Assembly!
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 + ", which unambiguously means "3 (4 5 +) ". Interpreters of Reverse Polish notation are stack-based; that is, operands are pushed onto a stack, and when an operation is performed, its operands are popped from a stack and its 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.
This should be completed using ARM Assembly, no MIPS.
Explanation / Answer
Burlesque is a stack-based, lazy, concatenative esoteric programming language. It was designed as a utility for students of computer science but it has become a language used for golfing. Since Burlesque has two character built-ins programs obviously grow twice as fast as programs in golfing languages with one character built-ins do. Burlesque is more like a command line utility tool for easy homework or related things like when you need to know what that number in base 4 is or what are the subsequences of this set or what are the permutations of this string and the like.
Burlesque has 400+ built-ins and growing. This also means that Burlesque's power stems from two main factors: The laziness and the amount of built-ins. The drawback is that the language is not very verbose and you can't infer what a code is doing by simply looking at the syntax and control structures since those don't really exist in Burlesque. The only way to understand Burlesque programs is by either looking everything up all the time or by memorizing a lot of built-ins.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.