CMPE230 Homework 2 Solved

30.00 $

Category:

Description

Rate this product

In this project, you will implement an A86 assembly language program that will input postfix expression involving hexadecimal quantities and evaluate it. After evaluation, the result should be output. Here are some example inputs to the program and the outputs generated:

The following operations will be supported.

input

output

23+45+*2/

0016

ABC+2+*

00FA

1 2 4 + + FFFF ^

FFF8

operation symbol

meaning

+

addition

*

multiplication

/

integer division

^

bitwise xor

&

bitwise and

|

bitwise or

You can make the following assumptions:

  • ●  The input tokens are separated by a blank character.
  • ●  The postfix expression given is syntactically correct.
  • ●  All values and results of operations will be 16 bit values.

    Grading

    Your project will be graded according to the following criteria:

    Testing

    Your code will be graded automatically in the virtual machine you can find here. Specifically, we will execute the following commands to check the output of your program.

    You can also use the debugger with the following command: d86 postfix_evaluator

Documentation (written document describing how you implemented your project)

12%

Comments in your code

8%

Implementation and tests

80%

Step

Command

Explanation

1

a86 postfix_evaluator.asm

Compiles your code and produces the executable

2

postfix_evaluator

Runs the executable which takes postfix expression and outputs its result

  • postfix-evaluator-a86-main-zzn76b.zip