<blockquote>
  <p>I want to understand how script is parsed into machine code.</p>
</blockquote>

<p>Unlike Ethereum, Script isn't compiled. It's interpreted, like Javascript. The opcodes are evaluated on-the-fly.</p>

<blockquote>
  <p>Can I write hello world such as only pushing value into the stack?</p>
</blockquote>

<p>Maybe try entering</p>

<pre><code>0x0c 0x48656c6c6f20776f726c6421
</code></pre>

<p>to <a href="https://matiu.github.io/opcodes-playground/" rel="nofollow noreferrer">https://matiu.github.io/opcodes-playground/</a>? (<code>0x0c</code> is the length of the text, as a push operation)</p>

CC BY-SA 4.0
2019-02-03T14:14:35.303Z
2019-02-03T14:14:35.303Z
MCCCS
<p>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.</p>

CC BY-SA 4.0
2019-02-03T19:48:29.210Z
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
<script>
Original bitcoin core has one script.cpp.where is interepreter for it?I want to write hello world compiler to understand this.?
Nishant Singh
# Original bitcoin core has one script.cpp.where is interepreter for it?I want to write hello world compiler to understand this.?

(Asked by: username_0 on 2019-02-01)

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.

**Tags:** script

> **Comments:**
> **username_1**: 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  

---

## 1 answers

### Answer by username_2 on 2019-02-03. Score: 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)


---

