4.4.Hack语言规范
\(4.4.\)Hack Language Specification
1.The binary syntax for A instruction
The first zero of a binary number is called operate code in HL.
Syntax: Starts with
0
, and thevalue
is less or equal than \(2^{15}-1\).- For example:
1
2//set A register to 21
0000000000010101
- For example:
2.The binary syntax for C instruction
The binary syntax correspond to symbolic syntax is as below:
- The
comp
mapping table from symbolic to binary is as below:
- The
dest
mapping table from symbolic to binary is as below:
- The
jump
mapping table from symbolic to binary is as below: