Commit Graph

8 Commits

Author SHA1 Message Date
Collin J. Doering 6a4f9ef5b4 Restructured cabalized project
Moved hack assembly parser into its own library, as this is a more
modular setup and opens the possibility of adding additional front
ends (Eg. a web front end).

Currently there is one executable 'Asmblr' which is the command line
front end. See README.md for more details of its operation.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-06-17 17:53:37 -04:00
Collin J. Doering a3f12e21d1 Cabalized and modularized project
Additionally, added scaffolding for the future implementation of a test
suite, as well as TODO markers for documentation.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-06-16 18:33:26 -04:00
Collin J. Doering 28b19bdcc2 Code cleanup
Added type signatures to all top-level bindings and made minor
modifications to remove ghc warnings generated by -Wall, excluding the
unused-do-bind warning.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-06-15 22:37:33 -04:00
Collin J. Doering 2ea33e3749 Added cli argument parsing
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-06-15 21:03:40 -04:00
Collin J. Doering eb6ffeddc1 Optimized parsing by removing try's
Removed unneeded try's and cleaned up/organized code

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-06-15 16:33:29 -04:00
Collin J. Doering f3f37c3abd Code cleanup
Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-06-15 04:13:10 -04:00
Collin J. Doering 7eba112bf0 Working basic assembler
Need to implement a fancier main function that accepts a few other
arguments and can take input from stdin and output to stdout instead of
a file.

asmblr [-o[--output=] out] file

Where:
 - out is the name of the file to write to, or '-' for stdout
 - file is the name of the input hack asm file or '-' for stdin

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-06-15 03:57:37 -04:00
Collin J. Doering fa44a2a482 Symbol-less hack assembler implementation
Asmblr.hs can assemble symbol-less hack programs, but currently doesn't
work for hack programs containing symbols.

Signed-off-by: Collin J. Doering <collin.doering@rekahsoft.ca>
2015-06-14 23:56:31 -04:00