Assignment 2 Description
Assignment 2 - Writing an Assembler Weighting and Due Dates
Marks for this assignment contribute 10% of the overall course mark.
Marks for functionality will be awarded automatically by the web submission system.
Core Body of Knowledge (CBOK) Areas: abstraction, design, hardware and software, data and information, and programming.
In this assignment you will complete a variation of project 6 in the Nand2Tetris course. A detailed description of Nand2Tetris Project 6 tailored to this course is shown below. In this assignment the assembler will be written as two separate programs. The executable program, parser, will read a Hack Assembly Language program from standard input and produce an abstract syntax tree on standard output. The executable program, translator, will read the abstract syntax tree from standard input and assemble a machine code representation of the original Hack Assembly Language program. The assembled code will be formatted as sixteen zeros or ones per line and it will be written to standard output. In addition to an assembler you will also write a program to dis- assemble machine code. The executable program, disassembler, will read a Hack Machine
Code program from standard input and write an equivalent Hack Assembly Language program to standard output.
You must create a directory in your svn repository named: //cs/assignment2.
Makefile - this file is used by make to compile your programs - do not modify this file. Makefile-extras - this file is included by Makefile - do not modify this file. parser.cpp - C++ source file
parser - executable script that will run your compiled parser program - do not modify this file.
translator.cpp - C++ source file
translator - executable script that will run your compiled translator program - do not modify this file.
disassembler.cpp - C++ source file
disassembler - executable script that will run your compiled disassembler program - do not modify this file.
bin - this directory contains precompiled programs and scripts - do not modify this directory.
lib - this directory contains precompiled components - do not modify this directory. includes - this directory contains .h files for precompiled classes - do not modify this directory.
tests - this directory contains test data, you can add your own tests here
Note: if the lib/macos/lib.a and lib/cats/lib.a files do not get added to your svn repository you will need to explicitly add them using
Submission and Marking Scheme
Submissions for this assignment must be made to the web submission system (https://cs.adelaide.edu.au/services/websubmission) assignment named: Assignment 2 - Submit Here. The assessment is based on "Assessment of Programming Assignments (https://myuni.adelaide.edu.au/courses/54310/pages/assessment-of-programming-assignments) ".
Note: the Submit Here assignment will show a breakdown of your marks by category but it will always show your total mark as capped at 0.
Your programs must be written in C++. Your programs will be compiled using the Makefile included in the zip file attached below. The parser program will be compiled using the file parser.cpp, the translator program will be compiled using the file translator.cpp file and the
disassembler program will be compiled using the file disassembler.cpp file. No other .cpp or
.h files should be present in your svn directory. Your programs will then be tested using the set of test files that are attached below. In addition a number of secret tests will also be run. Note: if your program fails any of these secret tests you will not receive any feedback about these secret tests, even if you ask!
Assignment 2 - Milestone Submissions: due 11:55pm Tuesday of week 9
The marks awarded by the web submission system (https://cs.adelaide.edu.au/services/websubmission) for the milestone submission contribute up to 20% of your marks for assignment 2. The marks for the Milestone Tests are used as the marks for the milestone submission. Your milestone submission mark, after the application of late penalties, will be posted to the myuni gradebook when the assignment marking is complete.
The Milestone Tests are just those where the Hack Assembly language is syntactically correct and does not use symbols. The marks for the Milestone Tests for each component program will
be weighted as follows:
parser - 40%
translator - 40%
disassembler - 20%
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.
Get Free Quote!
259 Experts Online