esolang

Assembly But Worse

An assembly language with calls, a stack and 3,000 bytes of memory, and no conditional jump.

WoodyFan3412, 2026 · Turing complete: no · ●○○ easy · esolangs.org

Tested with 4 known programs · Test method

Run it

Expected: Beyond The Horizon

The idea

WoodyFan3412 made Assembly But Worse in 2026 and implemented it in TurboWarp. It reads like a small assembly language. There are registers, memory, a stack, subroutines and a C style #define. The flag Z even says when the accumulator is 0. But no instruction jumps on Z, and there is no conditional jump. The one way for a value to steer the run is to push a register and ret to the line number it holds. There is no input, so a program does the same thing every time it runs. esolangs.org files it as a finite state automaton.

The machine

InstructionDoes
goto main goto "1"Jump to a label or a line number
call n1 ret returnCall a subroutine and come back
quitStop; running past the last line stops too
echo textPrint the text, or the value of a register it names, on its own line
push a pop xMove a register to or from the stack
read 1,a write 1,aLoad a register from memory or store it there
move a 15 move 15 10 move a xSet A to 15, set memory 15 to 10, copy A into X
inc a dec aAdd or take 1, wrapping in 0 to 255

The registers are X, Y and A. PC is the line number and Z is 1 when A is 0. Memory has 3,000 cells, all 0 at the start. A ; starts a comment and name: marks a label.

Example

Each call pushes the line after it, so the three returns unwind in order and the quit on line 2 ends the run.

Each call pushes the line after it, so the three returns unwind in order and the quit on line 2 ends the run. echo prints a register when its text names one, quotes or not.

Expected: 15 30 45
Expected: Hello, World!

The specification writes the output of each example on one line. Every echo ends its own line, as in a console. The specification's two loops print Boom! and 0101 until the step limit runs out.

Further

Also in Jokes

Write your own in Run Convert a program from Assembly But Worse

Implementation

JavaScript interpreter, source and command line

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

Command line

shib run assembly-but-worse -e '#define HELLO "Hello, World!"
goto main

main:
  echo HELLO
  quit

; Output: "Hello, World!"'
shib manual assembly-but-worse

Source

Module
langs/wiki/ports.js
Interpreter
langs/wiki/assembly-but-worse.js

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

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