logo Use SA10RAM to get 10%* Discount.
Order Now logo

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Shubham HasijaEngineering
(5/5)

609 Answers

Hire Me
expert
Mette BabstockScience
(5/5)

838 Answers

Hire Me
expert
Violeta BaoMarketing
(5/5)

903 Answers

Hire Me
expert
Neha SharmaOthers
(5/5)

802 Answers

Hire Me
C++ Programming

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

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

Project Description

In this assignment you will complete a variety 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 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.

Makefile - this file is used by make to compile your programs - do not modify this file. parser.cpp - C++ source file

translator.cpp - C++ source file

my*.cpp C++ source files with names that start with my my*.h C++ include files with names that start with my

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

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. Your milestone submission mark, after the application of late penalties, will be posted to the myuni gradebook when the assignment marking is complete.

Your programs must be written in C++ and will be tested using Hack Assembly Language programs  that that may or may not be syntactically correct. Although a wide range of tests may be run, including a number of secret tests, marks will only be recorded for those tests that are syntactically correct and do  not use symbols. 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 and the translator program will be compiled using the file translator.cpp file. In both cases any .cpp files with names starting with my will   be also included together with the precompiled library functions.

Automafic Marking

The automatic marking will compile and test both of your programs in exactly the same way as for the milestone submission. The difference is that marks will be recorded for all of the tests including

the secret tests. Note: if your programs fail any of these secret tests you will not receive any feedback about these secret tests, even if you ask

Nand2Tetris Project 6: The Assembler

Background

Low-level machine programs are rarely written by humans. Typically, they are generated by compilers. Yet humans can inspect the translated code and learn important lessons about how to write their high- level programs better, in a way that avoids low-level pitfalls and exploits the underlying hardware better. One of the key players in this translation process is the assembler -- a program designed to translate code written in a symbolic machine language into code written in binary machine language.

This project marks an exciting landmark in our Nand to Tetris odyssey: it deals with building the first rung up the software hierarchy, which will eventually end up in the construction of a compiler for Java/C++ like high-level language. The relevant reading for this project is Chapter 6. Some of the useful tools available include, the Hack Assembler, the CPU Emulator and working versions of the two programs, bin/parser and bin/translator.

Objective

The Hack assembler is a relatively simple program however, so that you can gain experience with the tools used in other workshops and assignments, you will build your assembler from three parts. This will involve using a precompiled tokenizer for the Hack assembly language to implement a parser that recognizes labels, A-instructions and C-instructions using tokens returned by the tokenizer. The parser will construct a tree representation of the program that the translator will walk over in order to assemble the final machine code If you wish to create additional source files that can be used by your programs the .cpp and .h files must have names that start with mine. All my*.cpp files will be compiled as part of both you parser and translator programs.

Related Questions

. The fundamental operations of create, read, update, and delete (CRUD) in either Python or Java

CS 340 Milestone One Guidelines and Rubric  Overview: For this assignment, you will implement the fundamental operations of create, read, update,

. Develop a program to emulate a purchase transaction at a retail store. This  program will have two classes, a LineItem class and a Transaction class

Retail Transaction Programming Project  Project Requirements:  Develop a program to emulate a purchase transaction at a retail store. This

. The following program contains five errors. Identify the errors and fix them

7COM1028   Secure Systems Programming   Referral Coursework: Secure

. Accepts the following from a user: Item Name Item Quantity Item Price Allows the user to create a file to store the sales receipt contents

Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip

. The final project will encompass developing a web service using a software stack and implementing an industry-standard interface. Regardless of whether you choose to pursue application development goals as a pure developer or as a software engineer

CS 340 Final Project Guidelines and Rubric  Overview The final project will encompass developing a web service using a software stack and impleme

Get Free Quote!

356 Experts Online