Anatomy of a Hack assembly program

Anatomy of a Hack assembly program

In order to do so, the Hack platform consists of a CPU, two separate memory modules serving as instruction memory and data memory, and two memory-mapped I/O devices: a screen and a keyboard. The Hack CPU consists of the ALU and three registers called data register (D), address register (A), and program counter (PC). In order to implement the Hack CPU, we need an ALU chip capable of computing arithmetic/logical functions, a set of registers, a program counter, and some additional gates (Control Unit) designed to help decode, execute, and fetch instructions.

Source: onatm.dev