CSC 215 Weekly Assignments:
Weeks 9 and 10

CSC 215


Overview I

During our last two weeks of Intel 8080 assembly language programming, you will be finishing your four function calculator projects.

Overview II

Chris here - Jeff is out, so I'm taking over this week. In other words:

I'm the captain now

Jeff has tasked us with getting the postfix calculator working by the end of the week, so that's our goal.

Thursday, November 12th

Classwork

3 Cheers to Mason, who did the work to stitch everyone's code together into a single working program, here.

Here's a direct link to the simulator with Mason's code loaded

We started class with Mason talking us through the code. It works pretty well, with a few caveats:

  • As we discussed last class, we're focusing on positive integers
  • Output to the cli doesn't work yet - when the input ends, we can find the answer (in hex) at memory address 0x04FD which is the bottom of the stack.

We had a good discussion about this code. We agreed that we understand the high-level structure but will need to spend individual study time to really grok it. We spent the rest of the class discussing in small groups.

We'll wait on Jeff to set plans for next week. But Chris suggested that Jeff might want to give us a quiz about Mason's code. We're intimidated by that possibility, but we'll do the best to make sure we're prepared.

Monday, November 9th

Classwork

First, our friend Wixette reached out to me to share some cool updates to the Altair simulator. I'd like to share some feedback, so we'll spend a few minutes playing with:

After that, we worked together to come up with a strategy for the `main` loop of our postfix calculator. We did this together as a class, in Python. Delanie was the driver and scribe, so this code is in Delanie's computer. We had some internet issues, so hopefully Delanie will commit to our shared repo soon! I think at the end of this, we all had a better understanding of how this worked.

Finally, everyone worked on getting their add/subtract/multiply/divide functions merged into the shared repo.

Homework / Evaluation

Keep on keepin' on!

Thursday, October 29th

During class, we setup a shared repo at https://codeberg.org/GHC_Students/stackpancake. We added branch protection to main, and agreed that we'll use PRs to submit code.

We also discussed how all of the functions we're working on will interface with each other. Here's what we decided so far:

Tuesday, October 27th: A High Level View of Our Task

We'll do a check-in today on how progress is going with out calculator project, and I thought in preparation for that some high level discussion of the algorithms we will need for the task will be helpful.

Reverse Polish Notation

Reverse Polish notation also called postfix notation is a mathematical notation that places operators after their operands. It was used by several HP calculators in the late 1960s and 1970s, starting with the HP 9100A.

Since postfix notation removes the ambiguity associated with infix notation, it eliminates the need to use parathensis for grouping. Here are some examples to illustrate this:

Infix: (3 + 5) * (7 - 2)
Postfix: 3 5 + 7 2 - *

Infix: 1 + 2 * 3
Postfix: 1 2 3 * + 

Infix: (1 + 2) * 3
Postfix: 1 2 + 3 * 

Infix: (3 - 1) * (2 + 4) / 5
Postfix: 3 1 - 2 4 + * 5 /

A List of Subroutines

To help make this problem more tractable, we should create a collection of subroutines, a list of which might include:

We'll talk a bit about this in class today before letting you get back to work on the project.