all repos — xyw @ 65d50cdc2f915f892ca5f6823a0b501351db5e53

A minimal virtual machine and assembler for terminals.

Preparing release.
h3rald h3rald@h3rald.com
Mon, 27 Jul 2026 15:10:29 +0200
commit

65d50cdc2f915f892ca5f6823a0b501351db5e53

parent

c54e00b21018baefa7107d57ef6c34642eda51b3

A .conver/history.txt

@@ -0,0 +1,1 @@

+2026-07-27: +280D # Initial release.
A .conver/release.txt

@@ -0,0 +1,1 @@

+280D
A CHANGELOG.md

@@ -0,0 +1,9 @@

+## Changelog + +### v280-D — 2026-07-27 + +Initial release, featuring: + +- Integrated assembler for the xyw assembly language. +- Integrated virtual machine able to execute previously-assembled xim image files. +- Support for system, terminal, clock, file and beeper devices.
A VERSIONING.md

@@ -0,0 +1,7 @@

+This project uses the Convergent Versioning system. + +The version number is a 2-byte hexadecimal integer from 0x0000 to 0xFFFF, with the first three digitsindicating the project _dependability score_ and the last digit encoding the version impact, compatibility, and purpose. + +A version number compliant with Semantic Versioning can be derived from the project history, and will still be used if required by package managers or similar software. + +For more information, see the [Convergent Versioning specification](https://h3rald.com/conver).
M xyw.cxyw.c

@@ -29,6 +29,25 @@ return 1;

return 0; } +void print_help() { + unsigned int v[2]; + v[0] = (XYW_VERSION >> 4) & 0xFFF; + v[1] = XYW_VERSION & 0xF; + printf("xyw v%03X-%X - (c) 2026 Fabio Cevasco\n\n", v[0], v[1]); + printf("USAGE\n" + " xyw [options] <file>.[xyw|xim]\n" + "\n" + "ARGUMENTS\n" + " <file> The name of the file to process:\n" + " - a .xyw source file will be assembled into a .xim file.\n" + " - a .xim image file will be executed.\n" + "\n" + "OPTIONS\n" + " -d, --debug Enable debug mode.\n" + " -v, --version Display xyw version.\n" + " -h, --help Print this message.\n"); +} + int main(int argc, char *argv[]) { // First pass: detect flags

@@ -38,20 +57,38 @@ if (flag(argv[i], "debug"))

{ xyw_debug = 1; } + if (flag(argv[i], "version")) + { + printf("%04X\n", XYW_VERSION); + return 0; + } + if (flag(argv[i], "help")) + { + print_help(); + return 0; + } + } // Second pass: copy non-flag args into xyw_argv xyw_argc = 0; for (int i = 0; i < argc && xyw_argc < 32; i++) { - if (i > 0 && flag(argv[i], "debug")) + if (i > 0 && (flag(argv[i], "debug") || flag(argv[i], "version") || flag(argv[i], "help"))) + { continue; + } xyw_argv[xyw_argc++] = argv[i]; } + if (argc <= 1) { + print_help(); + return 0; + } + for (int i = 1; i < argc; i++) { - if (flag(argv[i], "debug")) + if (flag(argv[i], "debug") || flag(argv[i], "version") || flag(argv[i], "help")) { continue; // already handled }
M xyw.hxyw.h

@@ -1,6 +1,8 @@

#ifndef XYW_H #define XYW_H +#define XYW_VERSION 0x280D + // Registers and memory #define XYW_MODE_X 0x80 #define XYW_MODE_Y 0x40