MARIE Presets

A curated collection of example programs covering arithmetic, loops, I/O, and advanced techniques.

Programs15
Showing15
Categories4
#01Add Two Numbersbasic
The simplest MARIE program — loads two values from memory, adds them, and stores the result. Demonstrates the fundamental LOAD / ADD / STORE pattern.
LOAD X
ADD Y
STORE Z
HALT
X, DEC 5
Y, DEC 3
Z, DEC 0
Expected Behavior
Z = 8 (5 + 3)
Simulation
4 steps · 0 outputs · Halted
Concepts Used
LOADADDSTOREHALTDEC directive
#02Double a Valuebasic
#03Clear Accumulatorbasic
#04Subtract Two Numbersbasic
#05Count Down Looploops
#06Count Up & Outputloops
#07Multiply (Repeated Addition)loops
#08Sum an Arrayloops
#09Input → Double → Outputio
#10Echo Inputio
#11Triple Outputio
#12Indirect Addressingadvanced
#13Subroutine Call (JNS)advanced
#14Absolute Valueadvanced
#15Maximum of Two Valuesadvanced
About These Presets
Each program is a self‑contained MARIE assembly listing you can copy, modify, and run. Click any card to see the source code, a description of the algorithm, and the expected output (verified by running the simulator). Use the Open in buttons to jump directly to the assembler, simulator, or visualizer with the program pre‑loaded.