+/TECS

git clone https://git.julia.blue/+/TECS

P1n3appl3Remove headers5e97a3a

v1.0
723 B20 linesraw
1/**
2 * The HACK computer, including CPU, ROM and RAM.
3 * When reset is 0, the program stored in the computer's ROM executes.
4 * When reset is 1, the execution of the program restarts.
5 * Thus, to start a program's execution, reset must be pushed "up" (1)
6 * and "down" (0). From this point onward the user is at the mercy of
7 * the software. In particular, depending on the program's code, the
8 * screen may show some output and the user may be able to interact
9 * with the computer via the keyboard.
10 */
11
12CHIP Computer {
13
14    IN reset;
15
16    PARTS:
17    ROM32K(address=pc,out=inst);
18    CPU(inM=memout,instruction=inst,reset=reset,outM=m,writeM=writem,addressM=a,pc=pc);
19    Memory(in=m,load=writem,address=a,out=memout);
20}