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
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
| Instruction | Does |
|---|---|
MOV ADD SUB | Set, add to, take from a register |
AND OR XOR NOT | Bitwise logic on a register |
INC DEC | Add or take 1 |
MUL DIV | Multiply or divide AX |
PUSH POP | The stack |
CMP | Compare two values and set the flags |
JMP JE JNE JG JL | Jump to a label, always or on the flags |
OUT IN | Print a value, a character if it is 0 to 127; read into a register |
HLT | Halt |
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.
Patterns it teaches
- Camouflage: an ordinary machine dressed as a telegram.
- Encoding tricks: one character at a time, in an older code.
See also
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-languageSource
- 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