Commit Graph

80 Commits

Author SHA1 Message Date
n loewen afecab8ce3 Allow for blank lines and comment-only lines in assembly code 2023-07-31 15:21:01 +01:00
n loewen b90300a257 Add assemble-and-run script 2023-07-31 14:46:25 +01:00
n loewen 3dc521714f Update file names 2023-07-31 14:41:23 +01:00
n loewen 7bb802b18c Update todo list 2023-07-26 15:06:59 +01:00
n loewen c7cfd13931 Update todo list 2023-07-26 15:06:49 +01:00
n loewen 5717b93eda Create entry point for assembling and then running assembly code from a text file 2023-07-26 15:06:11 +01:00
n loewen d52ea2e467 Rename 2023-07-26 15:04:19 +01:00
n loewen 75b6916666 Create a version of the CPU as a JS module -- otherwise the same as the previous version 2023-07-26 15:03:23 +01:00
n loewen ba35470c3c Make assembler a javascript module, remove code for working over stdio 2023-07-26 15:02:21 +01:00
n loewen 9797b2e25f Rename menonic-to-machine-operation lookup table 2023-07-26 14:39:35 +01:00
n loewen 959697cd70 Tidy up whitespace 2023-07-26 14:38:29 +01:00
n loewen 74c7f3a657 Create a simple assembler 2023-07-26 14:38:02 +01:00
n loewen 62fd07fcaa Fix bug where hex2num and num2hex don't actually return anything 2023-07-26 13:52:46 +01:00
n loewen 10ada984e6 Implement and test remaining instructions 2023-07-26 12:09:11 +01:00
n loewen a17b7f4ba9 Start a new simulator sketch with a better architecture + using a Uint8Array for memory 2023-07-26 11:41:11 +01:00
n loewen 3eaced0e5d Move to "sketches" directory 2023-07-26 09:46:03 +01:00
n loewen 70c00b4869 Remove "implement CCF and CHP" todo-item 2023-07-25 19:06:20 +01:00
n loewen d33bc66d18 Remove an instruction that was struck-out, because strikethrough doesn't work in the indented code block 2023-07-25 19:04:29 +01:00
n loewen a2b4d6e4ad After running, print a snapshot of memory as it was before running, as well as a snapshot of the final memory state. Also: refactor `log_memory()` into a more generic `log_table_with_title()` 2023-07-25 19:03:47 +01:00
n loewen ae7be9e357 Print header with timestamp when running 2023-07-25 19:01:27 +01:00
n loewen d1a84748fc Implement CCF (Clear Carry Flag) and CHP (Carry Hop) 2023-07-25 19:00:34 +01:00
n loewen 890bb16145 Fix bug in addition 2023-07-25 18:57:35 +01:00
n loewen 27a192bcdf Tidy up formatting 2023-07-25 17:41:26 +01:00
n loewen 9fe17b801f Add TODOs 2023-07-25 15:59:57 +01:00
n loewen 63637dac2f Implement HOP and JMP 2023-07-25 15:57:24 +01:00
n loewen 39b7e9e2ac Add intro message/warning 2023-07-25 15:33:24 +01:00
n loewen 9aed9e5e8b Tidy up formatting + re-order code for clarity 2023-07-25 15:29:36 +01:00
n loewen d674394afb Replace 'Carry Toggle' instruction with 'Clear Carry Flag' 2023-07-25 15:26:58 +01:00
n loewen dfd9edf879 Partial implementation of ADD and SUB (SUB is missing carry flag handling 2023-07-25 15:26:32 +01:00
n loewen 51581e6879 Initial proof-of-concept -- a working but incomplete simulator 2023-07-25 15:05:11 +01:00