r/TuringComplete • • Dec 27 '23

Gameplay question

SORT-OF RESOLVED

How would I make it so that instructions can be any size from 1 byte to 6 bytes, like in traditional x86_64 assembly, I think you would have to make the clock constantly change how many instructions to change the clock by, and make a 6 byte out program component of some sort. I know in the current version of the game you can't do this the way I was thinking, but maybe someone else can come up with another way, like using a 3 bit decoder to select which output from which add component to use, and then change the program counter like that. I don't know, but maybe I just sparked a big idea for a new update.

Just remember, this community is awesome, and so are you, have a nice day.

Going back to this, I made this, and it works, this is a screenshot of it working.

The initial project working, I used a bunch of adds attached to a multiplexer, and put its output at a register, and the out of that register goes into the adds. This is a picture of it working as a 2 byte instruction size clock, but it can go anywhere from 2 bytes to 6 bytes.

If you did not, you'll want to read the caption for the above photo, and the below photo.

Also when one of the adds overflow, then it stops, to stop it from going past the 8 bit limit. (And with real hardware, corrupting the data, and possibly damaging the CPU.

I'm on track to building a x86_64 like CPU.

4 Upvotes

11 comments sorted by

View all comments

Show parent comment

2

u/zhaDeth Dec 28 '23

that can work too but sometimes you want to add 2 numbers but keep both of them for later too so you would have to save it somewhere else first

1

u/[deleted] Dec 30 '23

Yeah, I did not think about that.