CSC 215 Weekly Assignments: Week 7

CSC 215


Overview

This week we will introduce our last two assembly language instructions for this course, CALL and RET.

Tuesday, October 13th

Classwork

Today in class you will present the reverse string programs you were assigned in class last week.

StepInstruction SP beforeSP afterBytes written/read
1LXI SP,2400H?2400-
2LXI H,2400H24002400-
3LXI B,1111H24002400-
4LXI D,2222H24002400-
5LXI H,3333H24002400-
6PUSH B2400?mem[?]=11,mem[?]=11
7PUSH D??mem[?]=22,mem[?]=22
8PUSH H??mem[?]=33,mem[?]=33
9MVI a,44H??-
10PUSH PSW?? mem[?]=44, mem[?]=flags
11POP PSW??-
12POP H??-
13POP D??-
14POP B??-
15HLT??-

You should be able to fill in this table as you make your presentation, explaining each step as you go.

After we present that, we will form new pairs:

  • Pair A: Giselle and Mason
  • Pair B: Delaine and Dimitri
  • Pair C: Waleed and Nathan
  • Pair D: Stephan and Chris

And work on the project described below.

Using the Teletype Model ASR-33

Our simulator now provides us with an Teletype Model 33, the same one computer geeks at your ancient computer science teacher's high school back when he was in high school (and dinosaurs roamed the earth). Here's a picture of the setup an Altair user in the late 1970s might have had, and the one which our simulator will provide to us:

This provides us with a revolutionary new user interface, replacing switches and lights with ASCII text.

Our new simulator comes with several sample programs to help you learn this new tool. Your mission, should you decide to accept it, is to study those sample programs and to learn to use our ASR-33.