COREWAR

/
DAT - Data
🎯Press [STEP] twice to observe data modification and process termination at DAT(1/1)
🟢 EDIT MODE (Click cells to modify)
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
+1
0000
+ADD
#
$
0001
■DAT
#
#
◎ B-TARGET
0002
■DAT
$0
$0
++ ADD ROW
0003
■DAT
$0
$0
0004
■DAT
$0
$0
0005
■DAT
$0
$0
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
TASKS: 0
CYC: 0
📖REDCODE-94 INSTRUCTION REFERENCE(Drag to move)
📚 REDCODE-94 INSTRUCTION REFERENCE (1/19)

DAT - Data

DAT: Data (Process Termination)

DAT is a non-executable data storage instruction in Redcode-94. When a warrior's execution pointer (Program Counter) attempts to execute a DAT instruction, that process is immediately terminated (killed) and removed from the warrior's process queue. If a warrior has no remaining processes in its queue, it loses the round.

Syntax

DAT.F  #A, #B   ; Store numerical data in A-field and B-field

Dual Role in Von Neumann Memory

In CoreWar's shared memory (the Core), instructions and data occupy the exact same cells:

  • As a Variable / Pointer: DAT cells safely store counters, bomb offsets, and indirect target pointers (@ / < / >) as long as the Program Counter jumps around them (JMP).
  • As a Lethal Bomb: Because executing DAT kills a process, warriors copy DAT instructions across the Core (MOV bomb, @ptr) to overwrite enemy code or place landmines in an opponent's execution path.
loop: ADD.AB #4, ptr     ; Advance target pointer stored in DAT
      MOV.I  ptr, @ptr   ; Copy the DAT cell itself as a bomb!
      JMP.A  loop
ptr:  DAT.F  #0, #0      ; Acts as both pointer variable and DAT bomb

Modifiers & Initialization

  • Default Modifier: .F (always defaults to .F regardless of addressing modes).
  • Core Initialization: Every empty cell in the 8,000-cell MARS Core is initialized to DAT.F $0, $0 before battle begins.
📚 REDCODE-94 INSTRUCTION REFERENCE (1/19)

DAT - Data

DAT: Data (Process Termination)

DAT is a non-executable data storage instruction in Redcode-94. When a warrior's execution pointer (Program Counter) attempts to execute a DAT instruction, that process is immediately terminated (killed) and removed from the warrior's process queue. If a warrior has no remaining processes in its queue, it loses the round.

Syntax

DAT.F  #A, #B   ; Store numerical data in A-field and B-field

Dual Role in Von Neumann Memory

In CoreWar's shared memory (the Core), instructions and data occupy the exact same cells:

  • As a Variable / Pointer: DAT cells safely store counters, bomb offsets, and indirect target pointers (@ / < / >) as long as the Program Counter jumps around them (JMP).
  • As a Lethal Bomb: Because executing DAT kills a process, warriors copy DAT instructions across the Core (MOV bomb, @ptr) to overwrite enemy code or place landmines in an opponent's execution path.
loop: ADD.AB #4, ptr     ; Advance target pointer stored in DAT
      MOV.I  ptr, @ptr   ; Copy the DAT cell itself as a bomb!
      JMP.A  loop
ptr:  DAT.F  #0, #0      ; Acts as both pointer variable and DAT bomb

Modifiers & Initialization

  • Default Modifier: .F (always defaults to .F regardless of addressing modes).
  • Core Initialization: Every empty cell in the 8,000-cell MARS Core is initialized to DAT.F $0, $0 before battle begins.