Commit Graph

88 Commits

Author SHA1 Message Date
Nemo aed6f0a372 [08] Finishes VM Implementation
Lots of different changes:

- modular code with lots of helper methods
- fixed the return jump address getting overridden bug
2020-06-08 23:56:54 +05:30
Nemo 979976cb93 [docs] Fix chapter numbers 2020-06-04 15:48:52 +05:30
Nemo 286df5b147 [08] Finishes call/init implementation
Found 2 bugs:

0. ic+=10 is incorrect jump for the boolean compare methods
1. Another bug was in the write() method, which was increasing the instruction
counter even for label commands, which aren't supposed to do that.

Another minor issue in my interpretation of the "call" to `Sys.init`
which I was so far just doing via a jump. Changed that to a proper call
2020-06-04 15:48:49 +05:30
Nemo 4fdc98bb72 [08] Implemented call, but it is breaking somewhere 2020-06-04 15:48:44 +05:30
Nemo 5160559eff [08] Optimized function starts a little 2020-06-04 15:48:41 +05:30
Nemo 6bdbec501a [08] Init Use LC=300, ARG=400 as standard values for now 2020-06-04 15:48:38 +05:30
Nemo 91b8ef006e [08] Fixes frame restoration, so return works properly now 2020-06-04 15:48:35 +05:30
Nemo b052ab617c [08] Implement Return/Function/Init
Return isn't functional (yet)
Init isn't called (yet)
2020-06-04 15:48:32 +05:30
Nemo 2fbdba0cf2 [08] Goto is functional.
Wasted 15 minutes stepping through the assembly, only to find out I was
missing a $ in $globalLabel
2020-06-04 15:48:27 +05:30
Nemo b61d4c4339 [08] Adds support for label and if-goto commands 2020-06-04 15:48:20 +05:30
Nemo 91dd0bb102 Fix command symbols 2020-06-03 17:49:21 +05:30
Nemo 4e49913808 [07/Static] Implements static push/pop memory segment 2020-06-02 17:28:20 +05:30
Nemo 67b4e2653e [07/Pointers] Implemented pointer segment push/pop 2020-06-02 17:04:51 +05:30
Nemo 16e830851e Remove unused tests 2020-06-02 04:16:57 +05:30
Nemo c46f739aed Was missing an indirect lookup on segment pushes 2020-06-02 04:16:13 +05:30
Nemo 32242242cb I think the bug is somewhere in segment based pushes 2020-06-02 04:00:35 +05:30
Nemo 777523c24f Write Limited tests for segment pops 2020-06-02 03:51:40 +05:30
Nemo 551546c953 Break into multiple files for easier navigation 2020-06-02 03:19:28 +05:30
Nemo 9782ba7e4d [07] Almost done with BasicTest implementation 2020-06-02 01:42:15 +05:30
Nemo 3fa5a5c07a [07] StackTest passes 2020-06-02 00:12:41 +05:30
Nemo be69ac321d Reduce stack manipulation (use M instead of A) 2020-06-01 23:05:42 +05:30
Nemo b186ee7df1 [07/SimpleAdd] Partial working implementation
Implemented right now:

- push constant
- add
2020-06-01 21:47:50 +05:30
Nemo e596fbe028 [07] Fix a bit of parsing 2020-06-01 19:56:37 +05:30
Nemo c1cac6ad6f [07] Initial work on VM Translator 2020-06-01 19:49:55 +05:30
Nemo 1966f8b673 Adds notes on Assembler 2020-06-01 18:14:46 +05:30
Nemo 09cd6d9eb0 [07] scaffold 2020-05-31 03:31:27 +05:30
Nemo 26f427a8ad Remove unused variables, style fixes 2020-05-30 04:08:30 +05:30
Nemo 09bf3f1e67 [06] Assembler done and tested
Also started a clone assembler in rust
2020-05-30 03:17:31 +05:30
Nemo abbb826dd0 Adds SymbolTable usage 2020-05-30 01:55:43 +05:30
Nemo 8985c2a65a Adds test script 2020-05-30 01:32:31 +05:30
Nemo f15f5e6906 Assemble all test programs 2020-05-30 01:22:22 +05:30
Nemo 0d78eaae73 Finishes assembler without symbols 2020-05-30 01:18:04 +05:30
Nemo 26018e28a1 Initial work on 06 2020-05-29 19:52:50 +05:30
Nemo a95ee0cfce Add link to fix in RAM16K 2020-05-29 02:42:17 +05:30
Nemo cd62be71a3 Better headings for notes 2020-05-29 02:41:25 +05:30
Nemo 651a00fc5c gitattributes 2020-05-29 02:38:11 +05:30
Nemo 42fadfa61d Adds NOTES link to README 2020-05-29 02:00:59 +05:30
Nemo 0a0616a3d5 Adds scaffold for [06] 2020-05-28 21:44:21 +05:30
Nemo fbad268db5 [05/Computer] My computer can run Hack instructions now 2020-05-28 21:28:20 +05:30
Nemo 79aaca88af [05] Ran the CPU-external tests as well 2020-05-28 21:18:36 +05:30
Nemo 317e89ee54 notes for CPU 2020-05-28 21:17:20 +05:30
Nemo 3dbb04035c [05/CPU] CPU is done.
I prefered using Nands here, wherever possible.
2020-05-28 21:13:25 +05:30
Nemo e7d72b1020 [05/CPU] Implements most of the CPU
This includes:

- Handling of data i/o (for A/D/M)
- Handling the ALU properly (all 28 computations)
- Basic incremental PC (i/o)
- PC reset
- read/write to M

What's missing:

- Handling jumps
2020-05-28 19:58:12 +05:30
Nemo 69a32190dc 05/Memory 2020-05-28 18:10:51 +05:30
Nemo 262e336fcd Add empty Project05, and notes on PC 2020-05-28 17:02:13 +05:30
Nemo ae35d75d17 My Keyboard based fill is just +2 of manualfill 2020-05-28 16:48:24 +05:30
Nemo e85ff27425 [04/fill] Done with Automated screen fill
Updated NOTES
2020-05-28 16:45:38 +05:30
Nemo 25e828ec9d Initial work on Fill.asm
Scrapped everything I did yesterday, basing it on scratch
from what I wrote in manual-fill.asm
2020-05-28 15:59:49 +05:30
Nemo 90526cc036 Fixes RAM16K. I was using too many registers and the addressing was
wrong
2020-05-28 15:04:07 +05:30
Nemo 37c0f41a4a [04/mult] Multiply is possible 2020-05-27 19:44:39 +05:30