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

35m 9s logged

I started working on the “CPU” to parse the opcodes, I made most of the initial instruction set but then noticed a lot of mistakes.

Firstly, there were no pointers at all, so you couldn’t actually access memory and registers. I added some new instructions for that but realized once again things need changing.

The registers need to become 32-bit so I can use them to store pointers (since that is pretty much their primary use). I’m going to change the load_reg instruction to fetch the next four bytes instead of just one.

I need to make a lot of other things 32-bit as well to match the address space. I did so for the load_mem instruction, but for example all of the jump instructions still need changing. I might write a helper function for big-endian (both ways).

The most significant change today was the changed instruction set and the addition of the parser within the CPU. Of that there is a screenshot below.

0
1

Comments 0

No comments yet. Be the first!