Hello WorldΒΆ

The complete program β€” three lines:

stl.startup
stl.output "Hello, World!\n(:"
stl.loop

View on GitHub. (The literal smiley (: at the end matches the upstream example β€” feel free to drop it for your own version.)

For a line-by-line walk-through see the Getting Started tutorial.

Variant: using a pre-built string variableΒΆ

The upstream hello_world_with_str.fj example builds the string in a separate data label, then prints it via bit.print_str:

    stl.startup

    bit.print_str 20, str
    stl.loop

  str:
    bit.str "Hello, World!\n(:"

View on GitHub.

This pattern (string as data label, length passed at the call site) is the same one you use for any fixed-length-buffer output. The 20 is the maximum bytes to scan β€” bit.print_str stops at the first null byte.