View on GitHub

pxt-bytescript

the bytescript custom language engine , made in makecode arcade.

ByteScript

ByteScript is a compact, fantasy‑hardware–style language designed to run in two distinct modes:

  1. Source interpretation – Executes the original human‑readable source directly in the source interpreter (“half‑VM”), retaining variable names and labels for debugging and emulation.
  2. Bytecode execution – Compiles the same source into a compact, numeric‐only instruction stream for the compiled VM, which runs faster and uses less memory.

The compiled bytecode VM supports the PRINT instruction only when printing a numeric value — typically the value stored in a variable.
Printing arbitrary strings is not supported in bytecode mode, as this would require additional complexity such as:

These features are intentionally omitted to keep the bytecode VM minimal and efficient.

Variable Handling in Bytecode

In compiled form:

Note:

the Most Recent version sshow around 3.23x faster perfomance than the old speed before optimaztions of around 113.95ms which includes optmizing and running time.


Open this page at https://killercraft-thecoder.github.io/pxt-bytescript/

Use as Extension

This repository can be added as an extension in MakeCode.

Edit this project

To edit this repository in MakeCode.

Metadata (used for search, rendering)