Commits


fix jump semantics Use as destination the value of A as it was at the start of the cycle, before possibly updating it with the ALU result.


adjust tests to not rely on wrong jump semantics See previous commit. I actually used the erroneous behavior to save an instruction here and there. So save an instruction elsewhere. :)


test writing to A in a jump instruction An instruction such as A=0;JMP should branch to the address active at the start of the clock cycle rather than the new value of A which does not update until the next cycle.


add README


comment typo


add test to exercise tape input (atoi)


pass prepared input (foo.in) to tests, if it exists


add input tape implementation


run tests at max speed (-s0)


compare tests' output against expectation Includes expected output for hello.hack (hello.out).


add "hello world" test


implement tape output w. busy time


editorial mistake


add controls for clock frequency and time scale


factor cpu() out of main


suppress test script command


add test script and make target The test target will run test.sh with the list of included roms. The test script (test.sh) runs the emulator on its arguments in trace mode and compares the result against the supplied .tsv file. Includes expected .tsv outputs. Also adds a 'clean' target.


add max.rom to roms list


add missing sint()


add license note to add.hack, max.hack


comments/style in .hack files


dummy code for tape punch control word


fix line count in the face of empty lines and comments


add missing empty instruction Oops.


add max.hack example