Hello World
Horray, you have installed Splice! Now its time to run your first line of code
Splice uses a VM (Virtual machine) System to run your code. It turns your code into Bytecode using
spbuild
Then it uses SPVM (Splice Virtual Machine) to run your code.
Let's get you started.
Go to the examples dir in the Splice Repo
Run
spbuild helloworld.sp helloworld.spbc
Now that the Hello World program has been successfully compiled, so run
splice helloworld.spbc
You should get
Hello world
What happened?
You just ran your first line of Splice, but how does it work?
When you compiled that Splice program inside that SPBC file, was
02 40 51 0B 48 65 6C 6C 6F 20 77 6F 72 6C 64 41 30
This is bytecode for
print("Hello world");
After that, when you ran the VM, it turned the bytecode back into standard code and ran it.
Last updated