MARIE Assembler

Write MARIE assembly and see the two-pass assembly process: symbol table, machine code in hex & binary.

7Words
3Labels
0Errors
Source Code
Machine Code Output
AddrLabelOpcodeOperandHexBinary
000LOADX10040001000000000100
001ADDY30050011000000000101
002STOREZ20060010000000000110
003HALT70000111000000000000
004XDEC500050000000000000101
005YDEC300030000000000000011
006ZDEC000000000000000000000
Symbol Table
X004
Y005
Z006
Opcode Reference
JNS0x0
LOAD0x1
STORE0x2
ADD0x3
SUBT0x4
INPUT0x5
OUTPUT0x6
HALT0x7
SKIPCOND0x8
JUMP0x9
CLEAR0xA
ADDI0xB
JUMPI0xC
LOADI0xD
STOREI0xE
About the MARIE Assembler
This assembler uses a two-pass process. Pass 1 scans the source to build a symbol table, mapping each label to its memory address. Pass 2 generates the 16-bit machine code — the top 4 bits encode the opcode, and the lower 12 bits encode the operand (memory address). Data directives (DEC and HEX) store literal values. Try editing the source or loading a preset to see how changes affect the assembled output.