esolang

Calligulan Assembly

An assembly language written entirely in Roman numerals, one to a line.

ArthroStar11, 2021 · Turing complete: unknown · ●●○ moderate · esolangs.org

Tested with 3 known programs · Test method

Run it

Expected: HI

The idea

ArthroStar11 made Calligulan Assembly in 2021. Every line of a program is a Roman numeral. A command is a numeral, and the numerals on the lines after it are its arguments. Capitals are the usual numerals, and a small letter is worth 1000 times its capital, so m is a million.

Read the story

The machine has a hold cell, a boolean and 30,000 variables of 32 bits. All work goes through the hold cell, and only the boolean can steer a jump.

The machine

CommandArgumentsDoes
InLabel n
IInJump to label n if the boolean is true
IIIa bBoolean is variable a < variable b
IVa bBoolean is variable a = variable b
VInvert the boolean
VII or IIRead a character or a number into the hold cell
VIII or IIPrint the hold cell as a character or a number
VIIInStore the hold cell in variable n
IXnLoad variable n into the hold cell
Xa bHold cell is variable a + variable b
XIa bHold cell is variable a - variable b
XIInHold cell is n

There is no numeral for 0, so a program that needs 0 takes it from a variable it never stored.

Example

72 is an H and 73 is an I.

72 is an H and 73 is an I. The truth machine reads a number into variable 1 and puts 1 in variable 2. It prints variable 1 and jumps back for as long as variable 1 is not below 1.

Expected: 0

The specification also counts down from 99 to 0 with XI. The specification does not say what goes between printed numbers, so this implementation prints nothing between them.

Patterns it teaches

Further

Also in Camouflage

Write your own in Run Convert a program from Calligulan Assembly

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: calligulan-assembly.

Command line

shib run calligulan-assembly -e 'XII
LXXII
VII
I
XII
LXXIII
VII
I'
shib manual calligulan-assembly

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/calligulan-assembly.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language

Source esolangs.org (CC0) · Edit on esolangs.org