COREWAR

/
LDP - Load P-space
🎯Press [STEP] twice to observe LDP loading 77 from P-space into address 0003(0/2)
🟢 EDIT MODE (Click cells to modify)
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
0000
•STP
#
#
0001
•LDP
#
$
0002
↺JMP
$
0003
■DAT
#
#
0004
■DAT
$0
$0
++ ADD ROW
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 (18/19)

LDP - Load P-space

LDP: Load from P-space (Persistent Memory)

LDP reads a value from the warrior's private P-space (Persistent Space) slot indexed by operand A and writes that value into destination B in Core memory.

Syntax

LDP.AB #slot, dest   ; Load value from P-space[#slot] into dest.B
LDP.B  slotPtr, dest ; Load value from P-space[slotPtr.B] into dest.B

What is P-space?

Introduced in ICWS-94, P-space is a private, tamper-proof array of memory slots belonging exclusively to each warrior:

  • Tamper-Proof: Enemy warriors cannot read or overwrite your P-space.
  • Persistent Across Rounds: Values stored via STP survive even when Core memory is wiped between multi-round tournament battles.
  • Slot #0 (Round Outcome): Automatically updated by MARS before each round (0 = lost previous round, > 0 = won or tied).

Adaptive Strategy Switching ("P-Warriors")

      LDP.AB #0, lastResult ; Read outcome of previous round from Slot 0
      JMZ.B  switchStrat, lastResult ; If 0 (we lost!), switch strategy
      JMP.A  keepCurrent    ; Otherwise keep winning strategy
📚 REDCODE-94 INSTRUCTION REFERENCE (18/19)

LDP - Load P-space

LDP: Load from P-space (Persistent Memory)

LDP reads a value from the warrior's private P-space (Persistent Space) slot indexed by operand A and writes that value into destination B in Core memory.

Syntax

LDP.AB #slot, dest   ; Load value from P-space[#slot] into dest.B
LDP.B  slotPtr, dest ; Load value from P-space[slotPtr.B] into dest.B

What is P-space?

Introduced in ICWS-94, P-space is a private, tamper-proof array of memory slots belonging exclusively to each warrior:

  • Tamper-Proof: Enemy warriors cannot read or overwrite your P-space.
  • Persistent Across Rounds: Values stored via STP survive even when Core memory is wiped between multi-round tournament battles.
  • Slot #0 (Round Outcome): Automatically updated by MARS before each round (0 = lost previous round, > 0 = won or tied).

Adaptive Strategy Switching ("P-Warriors")

      LDP.AB #0, lastResult ; Read outcome of previous round from Slot 0
      JMZ.B  switchStrat, lastResult ; If 0 (we lost!), switch strategy
      JMP.A  keepCurrent    ; Otherwise keep winning strategy