Commit Briefs

b268be4f7c Sven M. Hallberg

fix jump semantics (main)

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


5261f2c888 Sven M. Hallberg

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. :)


aa10ea0fbd Sven M. Hallberg

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.


5c25183eee Sven M. Hallberg

add README


f466152267 Sven M. Hallberg

comment typo


33a53b3653 Sven M. Hallberg

add test to exercise tape input (atoi)


9a77229d55 Sven M. Hallberg

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


fd060ab5f0 Sven M. Hallberg

add input tape implementation


5b16a7cee0 Sven M. Hallberg

run tests at max speed (-s0)


00c9bff7f9 Sven M. Hallberg

compare tests' output against expectation

Includes expected output for hello.hack (hello.out).


1192038877 Sven M. Hallberg

add "hello world" test


099e4c576c Sven M. Hallberg

implement tape output w. busy time


5e4364907c Sven M. Hallberg

editorial mistake


ee4dd89bf6 Sven M. Hallberg

add controls for clock frequency and time scale


fdcac03ecc Sven M. Hallberg

factor cpu() out of main


8474506aed Sven M. Hallberg

suppress test script command


49d8299adf Sven M. Hallberg

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.


be6fc12c36 Sven M. Hallberg

add max.rom to roms list


35e5fed718 Sven M. Hallberg

add missing sint()


78e224d268 Sven M. Hallberg

add license note to add.hack, max.hack


2ffc18b08c Sven M. Hallberg

comments/style in .hack files


c13dce5609 Sven M. Hallberg

dummy code for tape punch control word


928df968ad Sven M. Hallberg

fix line count in the face of empty lines and comments


e7247ac567 Sven M. Hallberg

add missing empty instruction

Oops.


ddb7cf9c46 Sven M. Hallberg

add max.hack example