Showing posts with label jack computer. Show all posts
Showing posts with label jack computer. Show all posts

Sunday, August 13, 2017

Jack FAQ

Are fields private? Accessible only to methods? Or, if you have an object, can you do

obj.field from anywhere?

Can't find a good FAQ on their web :(

Saturday, March 11, 2017

Nand2Tetris Screen Addressing

http://www.nand2tetris.org/lectures/PDF/lecture%2005%20computer%20architecture.pdf


So, you have 256 rows each 1 pixel thick.
You have 32 columns each 16 bits thick, or 512 columns, each 1 pixel thick.

So, to set pixel at x,y where x,y within (0-511, 0-255) :

Set (black) the y % 16 bit of the word addressed by Screen[ x*32 + y/16]

where Screen[X] implies memory address 16384 + X.