18 lines
451 B
Plaintext
18 lines
451 B
Plaintext
// 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/builtInChips/Keyboard.hdl
|
|
/**
|
|
* The keyboard (memory map).
|
|
* Outputs the character code of the currently pressed key,
|
|
* or 0 if no key is pressed.
|
|
*
|
|
* This built-in implementation has a visualization side effect.
|
|
*/
|
|
CHIP Keyboard {
|
|
|
|
OUT out[16];
|
|
|
|
BUILTIN Keyboard;
|
|
}
|