0
How to understand script.cpp and its interpreter.I understand register and postfix operation. I want to understand how script is parsed into machine code.Can i write hello world such as only pushing value into the stack.
0
How to understand script.cpp and its interpreter.I understand register and postfix operation. I want to understand how script is parsed into machine code.Can i write hello world such as only pushing value into the stack.
1
I want to understand how script is parsed into machine code.
Unlike Ethereum, Script isn't compiled. It's interpreted, like Javascript. The opcodes are evaluated on-the-fly.
Can I write hello world such as only pushing value into the stack?
Maybe try entering
0x0c 0x48656c6c6f20776f726c6421
to https://matiu.github.io/opcodes-playground/? (0x0c is the length of the text, as a push operation)
You mean where in the source code in the original Bitcoin v0.1 source code was the script interpreter? It was in script.cpp: https://github.com/bitcoin/bitcoin/blob/v0.1.5/script.cpp#L44L806
– Pieter Wuille – 2019-02-03T19:48:29.210