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
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
c46f739aed
Was missing an indirect lookup on segment pushes
2020-06-02 04:16:13 +05:30
Nemo
551546c953
Break into multiple files for easier navigation
2020-06-02 03:19:28 +05:30