Implement a reverse polish calculator in marie

Assignment Help Assembly Language
Reference no: EM131458659

Implement the following in MARIE.

Instructions

I want you to implement a reverse polish calculator in MARIE. This calculator must be implemented with or support the following requirements.

- Stack-Based (not a fake stack, a true, potentially very, very large stack, stored
- below all the instructions and other variables)
Proper subroutines using JNS calls for each "sub process" of your code
- All inputs and outputs must be in ASCII (not integer or decimal)
- The ASCII inputs of +, -, *, /, %, and ^ should properly perform the
corresponding integer arithmetic operations. These should operate stack based using
RPN (i.e. the operation should pop the top two elements, perform the operation, then
push the result back on the stack).
? +: A B + = A + B
? -: A B - = A - B
? *: A B * = A * B
? /: A B / = A / B (integer division, no remainder) (e.g. 14 / 4 = 3)
? %: A B % = A % B (modulus, ONLY the remainder of the division) (e.g. 14 % 4 = 2)
? ^: A B ^ = AB (i.e. A raised to the B, or A multiplied by itself B times)
- Each arithmetic operation should be implemented as a subroutine. You
shouldn't need to worry about parameters, since the subroutine should access the
- stack pointer and pop the top two values itself.
ASCII letters will be input to execute command functions
? c = Clears the stack
? d = Duplicates the value on the top of the stack, pushing another copy of it
? r = Reverses the order of the top two values on the stack
? p = Prints the value on the top of the stack without modifying the stack (Peek

command). Prints a blank line (or a space) after.

? n = Prints the value on the top of the stack, popping it off. Prints a blank line (or a space) after.

? f = Prints the entire stack, starting from the beginning (bottom) of the stack. Prints a blank line (or a space) after.

? q = Exits the program

Notes
Significant points will be lost for the following errors/mistakes:

- Submission not in .mar format

- Submission lacking clear quality comments

- Submission does not compile

- Program does not perform accurate arithmetic

Reference no: EM131458659

Questions Cloud

How much can you withdraw each month from account assuming : You are planning to save for retirement over the next 30 years. How much can you withdraw each month from your account assuming a 25-year withdrawal period?
Why it important-salespeople to maintain ethical behaviour : Why is it important for salespeople to maintain ethical behavior? Salespeople need to maintain ethical behavior because it is vital to their firm's relationship
Example of the failure of governance : This week, let's look at an infamous example of the failure of governance -- the Volkswagen "pollution test firmware hack" that made the news in 2015.
What interest rate a lender will charge on a mortgage loan : Which of the following does NOT influence what interest rate a lender will charge on a mortgage loan?
Implement a reverse polish calculator in marie : Implement a reverse polish calculator in MARIE. This calculator must be implemented with or support the requirements - Proper subroutines using JNS calls for each sub process of your code
How much is the amount of qualified educational expenses : In September Ashley spent $5,000 on qualified educational expenses. How much is the amount of qualified educational expenses?
Health information system acquisition : Discuss some options that are available for health information system acquisition.
How unique was the context : How unique was the context? How creative was your strategy? How did you meet expected and unexpected challenges?
Explain how the marketing plan targets the market segment : Explain how the marketing plan targets the market segment.Provide a positioning statement for your project.Define the products and services you will offer.

Reviews

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd