Someone made a multiplication function for the STU-1, my 8bit computer that runs on bitvm (and thus on bitcoin)! It's true, you can write bitcoin smart contracts in Assembly now instead of learning boolean logic circuits. Try it yourself here: https://github.com/supertestnet/8bit-cpu-for-bitvm
pull down to refresh
Also, notice how the program counter counts to 10 and then jumps back to 2? That's called a "JMP" command or sometimes a Loop
"But I thought bitcoin doesn't have loops!"
Well, uh, you see life, uh...finds a way
https://static.wikia.nocookie.net/jurassicpark/images/c/c6/JP-IanMalcolm.jpg
It's the loops that make Turing-completeness.
Yes! But like all computers it's not formally turing complete because a turing machine is a theoretical computer whose definition requires it to have infinite memory -- and no real computer has that, certainly not the STU-1
Computer designers generally try to get "close enough" by giving their computers large enough memory that no one knows how to use it all... But somehow every few years devs find ways to use it all up and so designers need to make computers with even more memory
Btw the STU-1 doesn't even try on this front, having only 16 bytes of memory. Maybe the STU-2 will have more
I love assembler language. I've programmed assembler on the Z80 processor.
https://i.gifer.com/JEDm.gif
Whoa, cool! Now make pong for bitvm! I doubt you can fit it into 16 bytes of ram, but maybe give it a try? Or help us write a better cpu
What if we emulate the Z80 processor next? 👀
Then Satoshi Nakamoto will show up in your dream and want to shake your hand
And I will tell him:
Imagine the ensuing chaos
i think then you are going to know it's a dream and have a lucid dream haha
I haven't done this type of ASM, but 16B sounds just enough for pong. Like the gamestate can fit probably in 2B (player 4 bits, ball 4-8 bits).
Just to clarify, I didn't make the pong game. I haven't used assembler in years, since I started programming in C, which I use almost every day on Microchip PICs. I would like to help, but I don't have time to take on something so serious.
Not me rubbing my hands together at the idea of a ruby implementation written for bitvm
Impressive!
You are basically a genius. Great work
I didn't make the multiplication function! This guy did: https://x.com/CryptoPengFun
But thank you :) Making the CPU was a lot of fun, now I just have to make it easy to run it on bitcoin (I've done it once successfully!)
very cool
deleted by author