Core War/Redcode

Core War programs are written in a programming language known as Redcode. Redcode does not have access to direct input or output.

Opcodes
Each opcode in Corewar contains three components: The instruction, register A, and register B.  In the core, each memory section contains exactly one opcode, and provides no independent numbers.

The registers A and B are relative addresses, described in the Address modes below.

Address modes
Each opcode listed above contains two registers. These registers are composed of both a number and an address mode:

P-Space
P-Space is a private storage used by programs across multiple runs of a program, that cannot be directly accessed by the opponent. However, attacks by programs can trick other programs into corrupting the P-Space region

In the opcode listing above, there are two instructions that can read and write to P-Space: STP and LDP.