Implement a reverse polish calculator in marie

Assignment Help Assembly Language
Reference no: EM131458989

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.

Attachment:- Assignment File.rar

Reference no: EM131458989

Questions Cloud

Database implementation and system prototype : AACS3154 WEB-BASED SYSTEMS DEVELOPMENT Project Specification - construct the DFD (using standard notations as recommended by your supervisor) that models the proposed system.
List some other ways in which you think observation method : Interpretative research offers marketing researchers many possibilities, including the opportunity to improve product features such as packaging for food.
Describe one of paul and elders ideas for improving studies : Describe the two ways that students normally study in a typical college course. Why do these techniques fail to promote deep learning?
Companies can get real creative promoting products : What are some ways you can control your company's image and brand while using the internet and social media platforms?
Implement a reverse polish calculator in marie : I want you to implement a reverse polish calculator in MARIE. This calculator must be implemented with or support the following requirements
What sorts of questions could multinational firms : McDonald's conducts extensive marketing research for all its new products, including new menu items for its overseas stores. Because of cultural and other.
Not all companies are viewed as equal : In the land of free trade, the public does not view all industries as equal. Do you believe that is ethical?
Prepare and submit a two-page reflection : Prepare and submit a two-page reflection, ideally based on the outline assignment from Unit VI. Create and submit a visual presentation with your reflection.
Where and how would you obtain the information : Some companies are broadening their markets by updating classic products to appeal to younger people's tastes and preferences.

Reviews

len1458989

4/11/2017 8:36:31 AM

Assignment Work with following details. Subject: MARIE assembly language. Details are in attached file. 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 and Program does not perform accurate arithmetic.

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