3 ms·
I love this book (the first edition), project, and course. It is incomplete, but I thought I would share my implementation of the software stack in F#. Current
by bmitc 6y ago
I love this book (the first edition), project, and course.
It is incomplete, but I thought I would share my implementation of the software stack in F#. Currently, only the assembler is implemented, but in my personal opinion, I think it showcases the beauty of F# for domain modeling. When I return to the project, I hope to restart the VM implementation and continue adding to the FPGA implementation as well. My eventual goal is to have the entire software stack built using F# that can than be run on an FPGA implementation of the CPU.
https://github.com/bmitc/nand2tetris https://github.com/bmitc/nand2tetris
Types to model the instructions and source file expressions: https://github.com/bmitc/nand2tetris/blob/main/dotnet/Nand2Tetris/Assembler/Types.fs https://github.com/bmitc/nand2tetris/blob/main/dotnet/Nand2T...
The full assembler, mainly consisting of the parser and translator: https://github.com/bmitc/nand2tetris/blob/main/dotnet/Nand2Tetris/Assembler/Core.fs https://github.com/bmitc/nand2tetris/blob/main/dotnet/Nand2T...