Welcome to Yotta! Yotta is a minimalistic forth-like language. Its most distinctive feature is that it comes with very few primitives:
$XXemits the machine codeXXgiven in hexadecimal.^XXemits machine code that emits machine codeXX.: Adefines a new wordA
The rest is built-up from there. Yotta is split into several parts, in the src directory:
src/0-preamble.fsis the zeroth chapter. It defines some bare necessities, like;and comments.src/1-assembler.fsdefines an x86-64 assembler inside of yotta.src/2-forth.fsdefines a set of forth-like words, built on top of the assembler.src/3-main.fsis the program.src/yotta.scontains the engine, written in NASM x86-64 assembly.
If this piques your interest, I recommend reading the preamble and the forth chapter, and the rest as interests you.
This code supports x86-64 linux and macos:
- To build and run on linux, use
make run-linux. - To build and run on intel macs, use
make run-macos.