browser

Assembler

asm
calendarsave
The xyw executable provides an assembler able to assemble .xyw source files into .xim image files (see formats). .xim image bytecode can be executed via xyw vm, also provided in the same xyw executable. The syntax of the xyw assembly language is heavily inspired by Uxntal, in the sense that it is also a concatenative language operating only on 8bit and 16bit integers, but it differs when it comes to the instructions and modes supported. The core idea behind xyw assembly is that it should be simple to learn and reason about: it only supports integers of one or two bytes, and it provides only a handful of directives designed to make your life easier. When assembling, the assembler does a first pass leaving unresolved placeholders to addresses identified by labels and macros, and then does a second pass to patch those addresses. It will also detect incorrect modes specified for instructions and incorrect values for directives. Although xyw assembly may look similar to 6502 or Z80 assembly (some directive names have been reused), it is substantially simpler, but still very powerful.