COREWAR

/
Step 14: Why Does "DAT" Become a Bomb?
🎯Remove JMP to step into DAT and observe the process crash(1/1)

MISSIONS (30 STEPS)

CH.1: UI & MEMORY BASICS (1-6)
BASIC★☆☆
Step 1: The "STEP" Button That Advances Time
🔒
BASIC★☆☆
Step 2: Process Termination and Restoring with "RESET"
🔒
BASIC★☆☆
Step 3: "Edit Mode" vs. "Running Mode"EDIT
🔒
BASIC★☆☆
Step 4: The Three Rooms of a Memory Box (Changing B)EDIT
🔒
BASIC★☆☆
Step 5: Modifying Both the Left Room (A) and Right Room (B)EDIT
🔒
BASIC★☆☆
Step 6: Literal Numbers (#) vs. Relative Addresses ($)EDIT
CH.2: CORE INSTRUCTIONS (7-13)
🔒
ARITHMETIC★☆☆
Step 7: Observing the "ADD" Instruction
🔒
ARITHMETIC★☆☆
Step 8: Changing the Number to Add (A-Field)EDIT
🔒
ARITHMETIC★☆☆
Step 9: Changing the Target Address (B-Field)EDIT
🔒
ARITHMETIC★☆☆
Step 10: Using the Subtraction Instruction "SUB"EDIT
🔒
BASIC★☆☆
Step 11: Copying an Entire Box with "MOV"EDIT
🔒
CONTROL★☆☆
Step 12: Looping Back in Time with "JMP"EDIT
🔒
CONTROL★☆☆
Step 13: Build Your First Program (Automatic Counter)EDIT
CH.3: VON NEUMANN & DIGITAL LIFE (14-18)
🔒
BASIC★☆☆
Step 14: Why Does "DAT" Become a Bomb?EDIT
🔒
BASIC★☆☆
Step 15: Copying Your Own Instruction (Code = Data)EDIT
🔒
BASIC★☆☆
Step 16: Observation: Stepping Through "Imp", the Oldest Digital Organism
🔒
BASIC★☆☆
Step 17: Modifying the Imp (Copy Destination Experiment)EDIT
🔒
ARITHMETIC★★☆
Step 18: Understanding Indirect Addressing (@ Pointers)EDIT
CH.4: CLASSIC ARCHETYPES (19-24)
🔒
STRATEGY★★☆
Step 19: Observation: Dissecting the "Dwarf" Bomber Step-by-Step
🔒
STRATEGY★★☆
Step 20: Modifying Dwarf (Changing the Bombing Interval)EDIT
🔒
STRATEGY★★☆
Step 21: First Combat: Tune Your Bomb Interval to Destroy the TargetEDIT
🔒
CONTROL★★☆
Step 22: Observation: The "SPL" Split Instruction and Mitosis
🔒
CONTROL★★☆
Step 23: Finding Enemies with Conditional Skip "SEQ / CMP"EDIT
🔒
STRATEGY★★☆
Step 24: Stopping an Imp with a Pre-Decrement "Imp-Gate"EDIT
CH.5: BATTLE EVOLUTION (25-30)
🔒
STRATEGY★★☆
Step 25: [Stone] High-Speed Bomber and Step Size TuningEDIT
🔒
STRATEGY★★☆
Step 26: [Paper] Observing the Self-Replicating Swarm "Mice"
🔒
STRATEGY★★★
Step 27: [Modifying Paper] Tune Clone Dispersal Distance to Overwhelm StoneEDIT
🔒
STRATEGY★★☆
Step 28: [Scissors] Tuning Scanner Stride to Shred PaperEDIT
🔒
STRATEGY★★★
Step 29: [Trap] Abducting Enemy Processes with "Vampire"EDIT
🔒
STRATEGY★★★
Step 30: Graduation Exam: Tune Your Warrior and Win the Final BattleEDIT
🟢 EDIT MODE (Click cells to modify)
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
0000
▼MOV
#
$
0001
▼MOV
<
<
👈 EDIT
0002
↺JMN
$
$
0003
❖SPL
@
#
0004
+ADD
#
$
0005
↺JMP
$
$
0006
■DAT
$0
$0
++ ADD ROW
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
TASKS: 0
CYC: 0
📖 LECTURE NOTE // STEP 14 OF 30Chapter 3: Von Neumann Awakening & Digital Life⏱ 6 min read
📖 Lecture Note: Computer Science & Artificial Life Principles Behind This Experiment

The Fate of Von Neumann Machines and "DAT Bombs": Why Modern CPUs Need Data Execution Prevention (DEP / NX)

How storing code and data in the same memory space gives rise to both CoreWar DAT bombs and real-world buffer overflow exploits

#Von Neumann Architecture#Stored-Program Concept#DAT Bomb#Buffer Overflow#DEP / NX Bit
🔬Step 14: Why Does "DAT" Become a Bomb?

In Chapter 3, we uncover the secret of Von Neumann Architecture—the foundation of all modern computers. In a Von Neumann machine, instructions and data (DAT) live together in the exact same memory space.

What happens if the JMP instruction on line 2 is overwritten or removed? The execution pointer falls straight into the DAT box on line 3 and dies! In CoreWar, dropping a DAT cell onto an enemy's code turns data into a lethal "Data Bomb" that kills any process that steps on it!

🎯 Your Task Change the Opcode on row 0001 from JMP to ADD to remove the loop, then press [STEP] 3 times to crash the pointer into DAT at 0002!

1. Von Neumann's Revolution: The Light and Shadow of Stored-Program Computers

Opening Chapter 3, Step 14 asked you to conduct a controlled crash experiment: by replacing the "JMP" instruction on row 0001 with "ADD", you removed the protective loop and watched the Program Counter plunge straight into the "DAT" cell at Address 0002, terminating the process.

In 1945, mathematician John von Neumann and his colleagues drafted the landmark "First Draft of a Report on the EDVAC", establishing the architectural blueprint for virtually every modern computer: the Stored-Program Concept (Von Neumann Architecture). Its defining principle is radical simplicity: executable instructions (Code) and passive numerical values (Data) are stored together, indistinguishable from one another, inside the exact same memory array.

Before Von Neumann, reprogramming a machine like ENIAC required technicians to physically unplug and rewire hundreds of patch cables. Storing programs inside memory alongside data made computers infinitely flexible. Yet that same unification introduced an inescapable vulnerability: what happens if the Program Counter loses its way and attempts to execute a memory address that contains raw data instead of valid code?

Von Neumann Unified Memory Space:
  [0000] ADD.AB #1, $2   (Code)  ──► Executed by CPU
  [0001] ADD.AB $-1, #0  (Code)  ──► Loop broken! PC falls through...
  [0002] DAT.F  #0, #0   (Data)  ◄── 💥 CPU tries to execute Data ➔ CRASH!

2. Why Passive Data ("DAT") Becomes a Lethal Weapon

Notice that the Redcode instruction set contains no "FIRE_MISSILE" or "ATTACK" instruction. Every instruction—MOV, ADD, SUB, JMP—is just a standard tool for moving data and doing math. How, then, do programs fight to the death in CoreWar?

They weaponize the Von Neumann architecture itself. As your experiment just demonstrated, if a process's control flow is disrupted or if a "DAT" cell is placed directly in the path of its Program Counter, the process crashes the instant it steps onto that data cell.

Now imagine using the "MOV" instruction to hurl a copy of a harmless "DAT #0, #0" box across the Arena so that it lands directly on top of an enemy warrior's code. The destructive write erases the enemy's instruction and replaces it with "DAT". When the enemy's execution pointer arrives at that line on its next cycle, it attempts to execute the DAT cell and self-destructs! In a Von Neumann universe, passive data dropped onto active code becomes a lethal landmine—a "DAT Bomb".

3. Real-World Buffer Overflows and Modern Hardware Defenses (DEP / NX Bit)

This exact mechanism—overwriting memory adjacent to or inside an execution path with raw data—is not just a game mechanic. It is the exact foundation of the most famous vulnerability class in real-world cybersecurity: the Buffer Overflow Attack.

In languages like C and C++, if a program receives input data (such as a network packet or text string) without strictly checking its length, the excess data spills over the boundaries of its designated data buffer and overwrites neighboring control data (such as the function return address on the stack). When the CPU tries to jump back from the function, its Program Counter is redirected straight into the overwritten data—either crashing the software (a Denial-of-Service attack, just like a CoreWar DAT bomb!) or tricked into executing malicious machine instructions hidden inside the input data (Remote Code Execution, pioneered by the infamous 1988 Morris Worm).

To defend against this fundamental quirk of Von Neumann architecture, modern processors (Intel, AMD, ARM) and operating systems implement a hardware security feature known as DEP (Data Execution Prevention) or the NX Bit (No-eXecute bit, also called W^X: "Write XOR Execute"). Hardware page tables mark memory regions as either writable data OR executable code, never both at once. In the wild, lawless Von Neumann universe of CoreWar, however, there is no NX bit—every cell is both writable and executable, turning data into bombs and code into living clay.

🔒

🔒 MISSION CLEAR Unlocks the Full Lecture Note

Complete the experiment in the simulator above to automatically unlock the full deep-dive article—or click below to read the full text immediately.