foxpy
e13412165c
Merge pull request 'Improve relative jumps' ( #9 ) from sane-jumps into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/9
2 years ago
Murad Karammaev
b8c1278615
add mistake report: just two registers
2 years ago
Murad Karammaev
8889bd84ac
add 'print_opcodes' binary
2 years ago
Murad Karammaev
dbcde1e0cc
relative jumps can now jump 16 insns in both directions
2 years ago
foxpy
a5ece13818
Merge pull request 'Replace inferior immediate memory offset load/store instructions with actual pointers' ( #8 ) from pointers into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/8
2 years ago
Murad Karammaev
d11531b9a2
implement pointers
also drop `MOV reg, mem` and `MOV mem, reg` instructions
2 years ago
Murad Karammaev
7a61df86b3
MISTAKES.md: fix English
2 years ago
foxpy
0408c6d52d
Merge pull request 'Add CLI tools' ( #7 ) from cli-tools into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/7
2 years ago
Murad Karammaev
4035bdb114
toyvm: print next instruction during execution
2 years ago
Murad Karammaev
28672216a1
halt in add_four_ints test
2 years ago
Murad Karammaev
c483020d14
add sketched acceptance tests framework
2 years ago
Murad Karammaev
4bf88cfa53
use cargo workspace
2 years ago
Murad Karammaev
c09cf227db
gitignore .vscode
2 years ago
Murad
c245507df9
more meaningful errors in assembler library code
2 years ago
Murad
d71151fd1d
add integration test
2 years ago
Murad
63f3faa61f
support comments in assembler
2 years ago
Murad
40438dc21c
add license and copyright to CLI tools source files
2 years ago
Murad
bf7e0a705b
rearrange uses
2 years ago
Murad
18751216d8
fix clippy warnings
2 years ago
Murad
340fdb5851
add CLI tools
2 years ago
foxpy
b1bff1b3bf
Merge pull request 'Add assembler library' ( #6 ) from standalone-assembler into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/6
2 years ago
Murad
c680151984
MISTAKES.md: oops: fix stupid typo
2 years ago
Murad
05609d7745
delete useless comment
2 years ago
Murad
e51151ad04
implement assembler library with tests
2 years ago
Murad
307953b8f5
gitignore .idea/
2 years ago
Murad
4a95f5c039
add mistake: missing `load/store [reg]` instructions
2 years ago
Murad
d15489934a
fix clippy warning
2 years ago
foxpy
825a08afc4
Merge pull request 'Add basic assembler design document' ( #5 ) from basic-assembler-design into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/5
2 years ago
Murad
57f1a047d2
fix impossible far jumps in assembler design
AJMP, AJE and AJNE cannot jump to immediate address,
they need to load address from R0 or R1.
2 years ago
Murad
a169a88727
add byte literals to asm syntax design document
2 years ago
Murad
b22b0cd4a2
slightly better port instruction names
2 years ago
Murad
405f185d4f
add basic assembler design document
2 years ago
foxpy
bd6241398f
Merge pull request 'Add basic CPU visualization function' ( #4 ) from basic-visualization into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/4
2 years ago
Murad
79b5aa3fde
add basic CPU visualization function
Also add a sample program which **screams**
for assembler and disassembler.
With no assembler one cannot write programs for this
CPU without pulling out their hear.
2 years ago
foxpy
f06b9f75c1
Merge pull request 'Implement all instructions with 100% test coverage' ( #3 ) from cpu-emulator into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/3
2 years ago
Murad
a81fc53454
fix all clippy warnings and run cargo fmt
2 years ago
Murad
0bdf20e5a7
implement all instructions with 100% test coverage
Also replace RESET with HALT.
2 years ago
foxpy
ef048c54ea
Merge pull request 'Implement instruction decoding' ( #2 ) from instruction-decoding into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/2
2 years ago
Murad
532c297e09
add little log with all the mistakes we made
2 years ago
Murad
a7cfd1f830
implement instruction decoding
Also I have realized there is actually **some** space for
near jump instructions, so I have filled this space out.
Now we can jump forward up to 8 instructions and backward
up to 4 instructions (does not sound very useful though).
2 years ago
foxpy
1ff6069eff
Merge pull request 'initial incomplete CPU design document' ( #1 ) from initial-cpu-design into master
Reviewed-on: https://git.rfnull.com/ToyPC/ToyCPU-4bit/pulls/1
2 years ago
Murad
454aa03826
oops: remove near jump
It was interfering with other instructions because it was
using the same instruction encoding.
I have fucked up.
2 years ago
Murad
43f774762d
finish designing ISA
It looks good for me!
2 years ago
Murad
b7c479dd8d
draft ISA design specification
I am pretty sure it misses a lot of stuff.
What it definitely misses:
- NOP instruction;
- HALT instructions;
- variable length bit shifts/rotations.
2 years ago
Murad
12e489cf19
initial incomplete CPU design document
I am 100% sure I am missing something important here.
Also of course there is no design for instruction encoding,
so there is a possibility this ISA will not fit into
8-bit instructions.
2 years ago
Murad
97920142e1
initial commit
- add README which includes the purpose of this project;
- include copyright notice and MIT license;
- add empty Cargo project.
2 years ago