Dokument erweitert
This commit is contained in:
@@ -1,24 +1,22 @@
|
||||
// This file is part of www.nand2tetris.org
|
||||
// and the book "The Elements of Computing Systems"
|
||||
// by Nisan and Schocken, MIT Press.
|
||||
// File name: tools/builtIn/Screen.hdl
|
||||
|
||||
// File name: tools/builtInChips/Screen.hdl
|
||||
/**
|
||||
* The Screen (memory map).
|
||||
* Functions exactly like a 16-bit 8K RAM:
|
||||
* 1. out(t)=Screen[address(t)](t)
|
||||
* 2. If load(t-1) then Screen[address(t-1)](t)=in(t-1)
|
||||
* Same functionality as a 16-bit 8K RAM:
|
||||
* If load is asserted, the value of the register selected by
|
||||
* address is set to in; Otherwise, the value does not change.
|
||||
* The value of the selected register is emitted by out.
|
||||
*
|
||||
* The built-in chip implementation has the side effect of continuously
|
||||
* This built-in implementation has the side effect of continuously
|
||||
* refreshing a visual 256 by 512 black-and-white screen, simulated
|
||||
* by the simulator. Each row in the visual screen is represented
|
||||
* by 32 consecutive 16-bit words, starting at the top left corner
|
||||
* of the visual screen. Thus the pixel at row r from the top and
|
||||
* column c from the left (0<=r<=255, 0<=c<=511) reflects the c%16
|
||||
* bit (counting from LSB to MSB) of the word found in
|
||||
* Screen[r*32+c/16].
|
||||
* column c from the left (0<=r<256, 0<=c<512) reflects the c%16
|
||||
* bit (counting from LSB to MSB) of the word found in Screen[r*32+c/16].
|
||||
*/
|
||||
|
||||
CHIP Screen {
|
||||
|
||||
IN in[16], // what to write
|
||||
|
||||
Reference in New Issue
Block a user