Each test program except the first one comes in two versions: Prog.asm is an assembly program; ProgL.asm
Question:
Each test program except the first one comes in two versions: Prog.asm is an assembly program; ProgL.asm is the very same program, Less the symbols (each symbol is replaced with an explicit memory address).
Symbolic Program
Add.asm
Symbolic Program
Max.asm
Symbolic Program
Rect.asm
Symbolic Program
Pong.asm
Symbolic Program
Without Symbols
Without Symbols
Without Symbols
MaxL.asm
Without Symbols
RectL.asm
Without Symbols
PongL.asm
Description
Adds up the constants 2 and 3 and puts the result in R0.
Description
Computes max(R0,R1) and puts the result in R2.
Description
Draws a rectangle at the top-left corner of the screen. The rectangle is 16 pixels wide and R0 pixels high.
Description
A single-player Pong game. A ball bounces off the screen's "walls". The player attempts to hit the ball with a paddle by pressing the left and right arrow keyboard keys. For each successful hit, the player gains one point and the paddle shrinks a little, to make the game slightly more challenging. If the player misses the ball, the game is over. To quit the game, press the ESC key.
Description
The Pong program supplied above was written in the Java-like high-level Jack language and translated into the Hack assembly language by the Jack compiler (Jack and the Jack compiler are described in Chapter 9 and in Chapters 10-11, respectively). Although the original Jack program is only about 300 lines of Jack code, the executable Pong code is naturally much longer. Running this interactive program in the supplied CPU Emulator is a slow affair, so don't expect a high-powered Pong game. This slowness is actually a virtue, since it enables your eye to track the graphical behavior of the program. And don't worry! as we continue to build the software platform in the next few projects, Pong and and other games will run much faster.
Part of the nand2tetris Companion.
Discrete and Combinatorial Mathematics An Applied Introduction
ISBN: 978-0201726343
5th edition
Authors: Ralph P. Grimaldi