esolang

Morse Assembly Language

Assembly language, keyed in dots and dashes.

Camolover, 2025 · Turing complete: unknown · ●●○ moderate · esolangs.org

Tested with 2 known programs · Test method

Run it

Expected: Hello

The idea

Camolover made Morse Assembly Language, or MAL, in 2025 as a tribute to Morse code. Underneath it is a plain assembly language with four general registers, a stack, flags and labels. Every instruction, register and number is written in Morse code instead, with letters split by spaces, words by a slash and one instruction to a line. MOV AX, 72 becomes -- --- ...- / .- -..- --..-- / --... ..---.

The machine

InstructionDoes
MOV ADD SUBSet, add to, take from a register
AND OR XOR NOTBitwise logic on a register
INC DECAdd or take 1
MUL DIVMultiply or divide AX
PUSH POPThe stack
CMPCompare two values and set the flags
JMP JE JNE JG JLJump to a label, always or on the flags
OUT INPrint a value, a character if it is 0 to 127; read into a register
HLTHalt

The registers are AX, BX, CX and DX. The specification gives no way to write a memory address, so the 1024 cells of memory are left out, and so are SP and IP as operands. A label is a word ending in a colon, ---..., at the start of a line.

Example

The Hello World moves five character codes into AX and sends each out.

The Hello World moves five character codes into AX and sends each out.

A countdown. CX starts at 5, the line .-.. --- --- .--. ---... is the label LOOP:, and each pass prints CX plus 48, the code of its digit, until CMP CX, 0 and JG LOOP let it fall through.

Expected: 54321

Patterns it teaches

Further

Also in Camouflage

Write your own in Run Convert a program from Morse Assembly Language

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run morse-assembly-language -e '-- --- ...- / .- -..- / --..-- / --... ..---'
shib manual morse-assembly-language

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/morse-assembly-language.js

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

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