CS 2700: Assembly Language and Computer Architecture

Spring 2015 - Lab 5

Due 5/20 by 5pm

  1. In order to illustrate the differences in computer architecture between (simulated) computers, and to prepare you for work in CS3740, for Lab 5 you will implement the same functionality you implemented in Lab 2, but you will implement it using the SC123 simulator.

  2. You may wish to spend time reviewing the manual for SC123 before you begin work.

  3. Log in to the Windows operating system, not the Mac operating system. There should be an sc123 icon visible on your Desktop after you log in. Double-click on the sc123 icon to start the simulator.

  4. Write and run a complete SC123 assembly program to do this:

    Read in from the user and store in X a numerical value.
    Calculate X2  and store it in Y
    Output Y to the user
    

  5. You may assume the user will only input a positive integer or 0 for X.

  6. Every single line of code in your program must have a comment clearly explaining the purpose of that line. No exceptions. The comment on the top line of the source code file must include your first and last names. (Lines of source code specifying variable values should be commented appropriately, as well.)

  7. Important:Write a short essay -- a half-page or so -- describing the primary differences and similarities you noticed between sc123 and MARIE. Focus on serious differences. (For example: "MARIE is in our textbook and sc123 is not" is a difference, but not a serious one.) Concentrate your discussion on the simulated architectures and assembly languages.

  8. In addition to your essay, write a brief reflection (about one paragraph, or a half-dozen sentences) about what you learned from working on this lab activity.

  9. Upload the working and tested source code to the CSHomework system by the assignment deadline. Also include your essay and reflection, either in a long comment at the bottom of the source code file, or as a separate plain text file named readme.txt.

Last updated 5/7/2015.