// 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
