project08 template files

This commit is contained in:
2025-10-26 17:51:57 -04:00
parent be00f40a6b
commit 38721f77c0
24 changed files with 1180 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
// This file is part of www.nand2tetris.org
// and the book "The Elements of Computing Systems"
// by Nisan and Schocken, MIT Press.
// File name: projects/8/FunctionCalls/FibonacciElement/Sys.vm
// Containts one function: Sys.init.
// Pushes a constant n onto the stack, and calls the Main.fibonacii
// function, which computes the n'th element of the Fibonacci series.
// Note that by convention, the Sys.init function is called "automatically"
// by the bootstrap code generated by the VM translator.
function Sys.init 0
// Computes fibonacci(4)
push constant 4
// Calls the function, informing that one argument was pushed onto the stack
call Main.fibonacci 1
label END
goto END // loops infinitely