I downloaded and installed the Nand2Tetris software from Github on an Archlinux installation and can successfully run the demo script Xor.hdl and test the chip with various inputs.
However, a (functionally) identical Xor.hdl script I wrote as a test fails to work. The calculator icon is always greyed out and changing the input values does not seem to have any effect on the values the simulator passes down to the logical gates.
It seems as if the simulator is not properly loading the script, but no error message is displayed
I have tried different jre's (both Oracle's and openjdk), to no avail. I am enclosing my simple Xor.hdl script I wrote below.
Help is appreciated.
Stefano
P. S.
I posted a similar message a few days ago on the Coursera's course website but I haven't received any reply, so I'm reposting it here.
---------------Xor.hdl-------------------------
// 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/01/Xor.hdl
/**
* Exclusive-or gate:
* out = not (a == b)
*/
CHIP Xor {
IN a, b;
OUT out;
PARTS:
Not (in=a, out=nota);
Not (in=b, out=notb);
And (a=a,b=notb,out=aAndNotb);
And (a=nota, b=b, out=notaAndb);
Or (a=aAndNotb, b=notaAndb, out=out);
}