Octo (CHIP-8 Language)

Created on 2023-07-16T03:24:19-05:00

Return to the Index

This card pertains to a resource available on the internet.

This card can also be read via Gemini.

A semi-high level language and assembler for the CHIP-8 language.

Includes emulators and various expanded versions of the toolkit with higher resolutions and support for fancier toys.

Has some interesting metaprogramming bits; mostly in assembler style macros.

You can ask for values to be computed at build time using the :calc metaprogramming tool. It explicitly computes expressions from constant values and writes them to a constant value you can use, which is in turn replaced with the appropriate value directly.

String macros

Basically you use a command like :stringmacro, give it a name, give it an "alphabet" of allowed symbols, and a handler function.

Multiple calls to :stringmacro register new behaviors for the same name but with different parts of the alphabet.

So calling it and supplying "\n" as the only letter will associate a behavior that applies whenever a newline character is encountered.

The symbol of the alphabet is given as a parameter, making it easy to use string macros for injecting actual strings in to memory someplace.