You are browsing as a guest. Sign up (or log in) to start making projects!

1h 48m 44s logged

I finished at least a basic version of the CPU.

It handles 17 different instructions.

I will admit I spent a good 80% of the time logged fixing this one bug where the Program Counter (PC) kept jumping to 24 even when it shouldn’t even be able to get under 1000. It turned out I needed to use “->” in my switch instead of “:”.

The CPU itself currently does not do much, it reads a bit, checks what opcode it is, calls the handler for it and passes the PC until the PC reaches another segment of memory. It should now be able to handle all instructions, I will test it some more and then start working on actually parsing instructions from a file so we can have file input instead of hardcoding programs.

0
1

Comments 0

No comments yet. Be the first!