Workshop In Computer Construction - From Nand to Tetris
Home
Syllabus
Book
Projects
Tools
Guidelines
Administratives
Tools

This section contains all the tools necessary to complete all the projects, collectively known as the TECS software suite.    

  • Compatability: All the tools contained in the TECS software suite can run as is on both Windows and Linux. 

  • Terms of use: The TECS software suite can be used freely and is protected by the GNU GPL License

  • Download the TECS software suite Version 2.5 (400K). After downloading, put this zip file in an empty directory on your computer and extract its contents as is, without changing the directories structure. If your computer is not equipped with a Java run-time environment, see the instructions at the bottom of this page. This version of the TECS software suite (and especially the compiler) were recently significantly improved for the benefit of the students of this year's course. The entire software suite has gone through heavy testing. Regardless, if you think you found a bug please email the course staff.

To view any of the resources listed below, click it; To download a resource, right-click and save-target-as. 

Simulators

Tool

Function

Download

Hardware   Simulator

Simulates and tests gates and chips implemented in HDL (Hardware Description Language).  Used to construct hardware projects.

Tutorial

CPU Emulator

Emulates the computer platform built in the course.  Used to test and run programs written in either machine language or assembler. 

Tutorial

VM Emulator

Emulates a typical stack-based virtual machine.  Used to run and test programs written in the VM language.

Tutorial

Translators

Translator

Function

Download

Assembler

Translates programs from assembly language to machine language.  The resulting code can be executed directly on the Computer chip (in the hardware simulator), or emulated on the CPU emulator (which is much quicker).

Tutorial

VM Translator

A virtual machine implementation (modeled after Java's JVM).  Translates programs written in the VM language into programs written in assembly language.  

Compiler

Translates from Jack (a simple Java-like language described in Chapter 9) into VM code.  The resulting code can run on the VM emulator, or translated further by the VM translator + assembler into binary code that can run on the hardware simulator or on the CPU emulator.  

Operating System

Version 2.0 and above of the TECS Software Suite no longer requires the VM class files of the OS in order to run programs which use the operating system. Follow everything that the book/project says, but simply ignore the step of downloading the OS VM files and copying them to the program directory. Once you start a VM program (compiled jack program) that uses the OS a dialog box will appear asking you whether you wish to use the implentation of the OS built into the VM Emulator. Answer Yes. Your program will now use the built-in implementation of every OS module except those you have yourself implemented in VM files in the current directory.
The built-in implementation of the operating system is much faster and allows the development of more complex real-time games. In addition programming using the new built-in implementation of the operating system is easier because when you debug your program you don't need to step through many lines of OS VM code - you only step through your own code.

The Operating System consists of the following modules:

OS module

 Function

Math

Provides basic mathematical operations (abs, mult, div, min, max, ...).

String

Implements the String type and string-related operations.

Array

Implements the Array type and array-related operations.

Output

Handles text output to the screen (printChar, printString ...).

Screen

Handles graphic output to the screen (drawPixel, drawLine, drawCircle...).

Keyboard

Handles user input from the keyboard (keyPressed, readChar, readLine, ...).

Memory

Handles memory operations (alloc, deAlloc, peek, poke ...).

Sys

Provides execution-related services (init, halt, ...).

Miscellaneous

Text Comparer

Checks if two input text files are identical.  Used in various projects.

Jack IDE

Tool

Function

Jack IDE

Allows editing and debugging programs in the Jack language.  Based on a commercial tool called Edit Plus.  You can use it freely for 30 days, and then you have to pay $30 to continute.

Java Run-Time Environment (JRE)

In order to use our software tools, your computer must be equipped with a Java Run-time Environment, version 1.3.1 or later. The JRE, also called J2RE, can be downloaded freely from many sites including http://www.javasoft.com.  For best performance, download the latest available version.

Trouble Shooting

If our software tools don't work on your computer, and if your computer contains a JDK (Java Development Kit), make sure that the "bin" directory of the JDK (usually something like JDK...\bin) is included in the PATH system variable on your computer. Also, make sure that the CLASSPATH system variable contains the tools.jar file, which is located in the "lib" directory of the JDK.

Changing system variables up to Win98 is done in the "set <variable-name>=..." line in the c:\autoexec.bat file. In NT, WIN2000 and upward it is done by updating the variable line in Control Panel->System->Advanced->Environment Variables.

If the GUI of some of our software the tools doesn't work properly, make sure that you are using version 1.3.1 or later of the JRE or JDK. Our software may work on earlier versions as well, but with many GUI problems.  To test which Java version is presently installed on your computer, type "java -version" at the DOS/shell level.