Assignment 1

Finish and/or implement several program in SIC/XE assembly language. Commit changes to your repository regularly. For the final submission create a tag ass1. When grading your assignment the assistant will use the following command

  • svn co

I expect that your solution will be checked out. We will also discuss personally your solutions during the exercises. You will demonstrate use of svn command in the command line. Prepare for at least the following:

  • to show the full log of your repository
  • to check out your assignment from the repository
  • to show and explaining the source code of your solutions
  • to demonstrate the execution of your programs in the simulator.

Prepare yourself before the presentation. Smooth presentations will more likely to get full points.

First part - 2 points

Finish the exercises for the SIC/XE assembly. Consider all four parts (basics, input/output, stack, screen). Commit the solutions to your repository. Hints: use comments and test your programs regularly.

Second part - 2 points

Write a program in the SIC/XE assembly language which consecutively reads numbers (binary number as returned by RD) from the device numbered FA. For each number it should calculate the factorial or Fibonacci number (or something else which uses a stack) and print it to the standard output. The number 0 should finish the program.

In the input device each number is written in its own line (be careful with Windows and Unix newlines) in the ASCII representation. Similarly the output numbers are printed (each in its own line, ASCII format).

The calculation of factorial/Fibonacci must be performed via stack/recursion. Create a separate routine for this.

Instead of the standard output you can also use the textual screen.

Third part - 2 points

Create your own idea for a problem or program and implement the solution in SIC/XE assembly. Discuss your proposal with the assistant before implementing.