CS140 HW06 - Assembler

Objective

  • Connect Assembly and Machine Language to computer architecture
  • Write a program to translate from Assembly to Machine Language
  • Learn and practice C programming fundamentals

Background

This assignment is based on material from Nand2Tetris Chapter 6.
See resources here: http://www.nand2tetris.org/course.php

The C Bootcamp lab should be referenced to help you with C.

Assignment



This week's assignment is Nand2Tetris Assignment #6, with the following restrictions and additions.

Pair Programming For this assignment, pair programming is encouraged, subject to:
It not allowed to split up the work of the project, work on the code without the partner present, or to share information between teams.

C Language Required This program must be implemented in the C programming language, and the program must execute on the csgateway linux machine.

Testing and Evaluation Your solution will be tested for correctness, and your code will be evaluated for proper programming style.

C Programming Language Collaboration

You are encouraged to assist eachother with aspects of the C programming language. You may help anybody in the class with topics of: C syntax, C language features, string manipulation, compiling code, makefiles, understanding error messages.

Map Data Structure

I've written some C code for a simple map data structure. You can use this for your symbol table and command lookups. The code is available: here.

Submit



Submission will be on Gradescope. Please clean your submission and submit a zip file containing your code and Makefile at the TOP LEVEL (not inside a folder). Your program must compile and run on the ssh.cs.clarku.edu machine according to the specification above. We should be able to unzip your file, run make, and execute the resulting program as specified above.

Checkpoint Checkpoint output of your program that outputs C_COMMAND, A_COMMAND, L_COMMAND as specified in class. Place your source code files and Makefile into the top level of the zip file and upload to Gradescope.

Academic Conduct Reminder



While pair programming is allowed, collaboration between pairs is not allowed. Each submission must represent the intellectual efforts of the person or persons submitting the assignment. You may access resources about the C programming language, but you may not review code related to this assignment from any sources. Please review the policy on the syllabus and ask questions if you are unsure.