COREWAR

/
Redcode-94 Rules
👁️ OBSERVATION MODE (Press [STEP])
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
0000
▼MOV
#
$
0001
▼MOV
<
<
0002
↺JMN
$
$
0003
❖SPL
@
#
0004
+ADD
#
$
0005
↺JMP
$
$
0006
■DAT
$0
$0
0007
■DAT
$0
$0
0008
■DAT
$0
$0
0009
■DAT
$0
$0
0010
■DAT
$0
$0
0011
■DAT
$0
$0
0012
■DAT
$0
$0
0013
■DAT
$0
$0
0014
■DAT
$0
$0
0015
■DAT
$0
$0
0016
■DAT
$0
$0
0017
■DAT
$0
$0
0018
■DAT
$0
$0
0019
■DAT
$0
$0
0020
■DAT
$0
$0
0021
■DAT
$0
$0
0022
■DAT
$0
$0
0023
■DAT
$0
$0
0024
■DAT
$0
$0
0025
■DAT
$0
$0
0026
■DAT
$0
$0
0027
■DAT
$0
$0
🏟️ARENA (20 ROWS)SCOPE: 0000 - 0019
[CORE MEMORY 800 CELLS (20 ROWS × 40 COLS)]1:1 Row Synced with Editor
P1: 0
P2: 0
CYC: 0
📖CoreWar Introduction Guide(Drag to move)
📖 CoreWar Introduction Guide

Redcode-94 Rules

Redcode-94 Specification

Redcode-94 is the standardized instruction set for CoreWar, established by the ICWS (International Core War Society).

Instruction Format

Every Redcode instruction has the form:

OPCODE.MODIFIER  A-MODE A-VALUE, B-MODE B-VALUE

Example: MOV.I $0, $1 — Copy the entire instruction at relative address 0 to relative address 1.

Addressing Modes

SymbolNameDescription
#ImmediateThe value itself (literal number)
$DirectRelative address (default if omitted)
@B-IndirectAddress stored in the B-field of the target
<B-Pre-decrementDecrement B-field of target, then use as indirect
>B-Post-incrementUse B-field as indirect, then increment it
*A-IndirectAddress stored in the A-field of the target
{A-Pre-decrementDecrement A-field of target, then use
}A-Post-incrementUse A-field as indirect, then increment

Modifiers

ModifierDescription
.AOperate on A-fields only
.BOperate on B-fields only
.ABSource A-field, destination B-field
.BASource B-field, destination A-field
.FBoth fields independently
.XCross-fields (A→B, B→A)
.IEntire instruction

Execution Model

  • Each warrior starts with one process
  • Processes execute in round-robin order
  • The MARS alternates between warriors
  • SPL creates new processes (added to end of queue)
  • DAT execution terminates a process
  • A warrior loses when its process queue is empty

Default Modifiers

When no modifier is specified, default modifiers are applied based on the opcode and addressing modes. For example:

  • MOV with immediate source → .AB
  • MOV with non-immediate → .I
  • ADD, SUB with immediate → .AB

Core Parameters

ParameterTypical Value
Core Size8000 cells
Max Cycles80,000
Max Processes8000 per warrior
Max Warrior Length100 instructions
Min Separation100 cells
📖 CoreWar Introduction Guide

Redcode-94 Rules

Redcode-94 Specification

Redcode-94 is the standardized instruction set for CoreWar, established by the ICWS (International Core War Society).

Instruction Format

Every Redcode instruction has the form:

OPCODE.MODIFIER  A-MODE A-VALUE, B-MODE B-VALUE

Example: MOV.I $0, $1 — Copy the entire instruction at relative address 0 to relative address 1.

Addressing Modes

SymbolNameDescription
#ImmediateThe value itself (literal number)
$DirectRelative address (default if omitted)
@B-IndirectAddress stored in the B-field of the target
<B-Pre-decrementDecrement B-field of target, then use as indirect
>B-Post-incrementUse B-field as indirect, then increment it
*A-IndirectAddress stored in the A-field of the target
{A-Pre-decrementDecrement A-field of target, then use
}A-Post-incrementUse A-field as indirect, then increment

Modifiers

ModifierDescription
.AOperate on A-fields only
.BOperate on B-fields only
.ABSource A-field, destination B-field
.BASource B-field, destination A-field
.FBoth fields independently
.XCross-fields (A→B, B→A)
.IEntire instruction

Execution Model

  • Each warrior starts with one process
  • Processes execute in round-robin order
  • The MARS alternates between warriors
  • SPL creates new processes (added to end of queue)
  • DAT execution terminates a process
  • A warrior loses when its process queue is empty

Default Modifiers

When no modifier is specified, default modifiers are applied based on the opcode and addressing modes. For example:

  • MOV with immediate source → .AB
  • MOV with non-immediate → .I
  • ADD, SUB with immediate → .AB

Core Parameters

ParameterTypical Value
Core Size8000 cells
Max Cycles80,000
Max Processes8000 per warrior
Max Warrior Length100 instructions
Min Separation100 cells