Categorygithub.com/deosjr/nand2tetris
modulepackage
0.0.0-20241014161723-4e8c3085d479
Repository: https://github.com/deosjr/nand2tetris.git
Documentation: pkg.go.dev

# README

nand2tetris in golang

# Packages

No description provided by the author

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
take a .asm file and return machine language code.
take a set of .jack files and return machine language code .
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
primitive, uses builtin go.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
rest is not primitive, derives from Nand.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
barrel shifter, does a circular left shift of size n a right shift is just a 16-n left shift if you want a logical shift, mask the input beforehand.
take a set of .vm files and return a single .asm file.
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

This CPU also supports the leftshift operation if instr[2]==0, we ignore ALU output and use barrelshift out instead the first bit after instr[2] (so the a bit in the Hack spec) the a bit still switches A/M, the next bit toggles that or using D as input to shift and the next 4 bits encode how much to shift.
rest is not primitive, derives from DFF.
No description provided by the author
No description provided by the author
components: registers A and D, ALU, counter instr decoding, instr execution, next instr fetching.
No description provided by the author
No description provided by the author
No description provided by the author
primitive, uses builtin go.
No description provided by the author
Hacking the unused instruction bits to support more efficient ROM reading: adds a PC register that can be used to jump back and forth We store the pc output in this register by default instr bit 1 set to 0 disables this update so the value grows stale; next instruction now is read into A without executing and jumps back to where we came from.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Lets leave this one for posterity (ie old asm files) but I misunderstood the default screen dimensions :).
No description provided by the author
No description provided by the author

# Interfaces

No description provided by the author
No description provided by the author
No description provided by the author
NOTE: no way to write to keyboard register.
No description provided by the author
No description provided by the author
writes values from an input file to a specific register Load clears the register and signals to read the next character -> so writing to this register sets it to 0 instead.
reads values to write to an output file or stdout sets the register to 0 when it is _done_ writing a character.