“The tendency of advanced programmers to try to add complicated instructions to the REDCODE instruction set must be thwarted.”

- The Core Wars Standard (21 May 1986)

Since A. K. Dewdney first introduced Corewar in 1984, a number of additional instructions have been suggested. Collected here are 140 of these ideas. The current Corewar standard (CWS'94) defines 18 instructions. Imagine playing Corewar if all of the below had been implemented!

InstructionDescription
ACTactivate sleeping processes (works with SLP)
BLKsleep the executing process until p-space location A is non-zero
BNCnegate increment added to instruction pointer (same as FLP and INV)
BRKbreak-point opcode (not a pseudo-opcode!)
CCOcopy opcode and addressing modes (same as MOP and OVL)
CLKcloak instruction A. appears as DAT 0,0 until after it is next executed
CLPreset all p-space locations to 0
CLTskip if A < B (same as SLT)
CMNskip if A <> B (same as CNE, JNE, SKN and SNE)
CNEskip if A <> B (same as CMN, JNE, SKN and SNE)
CONDAT equivalent which MOV can't replace, instead use OVL or ZER
CPBskip if b-field of A = b-field of B (same as SKE)
CPWskip if A = B (same as CMP, JEQ, SEQ)
DJZdecrements B. jump to A if B = 0
DMPcopy a-field and b-field of A to a-field and b-field of B
DRNdecrements B. if B <> 0 jump to A, reversing flow of execution
EATsubvert process executing at B
EGOremove next A processes from process queue
ENSsubvert process executing ENS
ERRwhen the process executing ERR next executes a DAT, jump to location A
EXCexchange the contents of A and B (same as SWP and XCH)
EXCexecute instruction at B, update B, transfer control to A if no error
FLPjump to A if a randomly generated number is below B
FLPnegate increment added to instruction pointer (same as BNC and INV)
FRKsplit to A, creating a process which shares parent's time slice
FRZsuspend execution of executing program's other processes (same as SSP)
GETmove location A in other core to B
GSBpush currently executing address onto stack then jump to A (JSR)
HLFset A to A/2
HLTterminate executing process (equivalent to DAT)
IJNincrements B. jump to A if B <> 0
IJZincrements B. jump to A if B = 0
INTprocess executing INT jumps to A when p-space loc B becomes non-zero
INVnegate increment added to instruction pointer (same as BNC and FLP)
JEQskip if A = B (same as CMP, CPW, SEQ)
JLCjump to A if less than B cycles until a tie is declared
JLCjump to A if opponent has less than B processes
JMCjump to A if process count > B
JMGjump to A if B > 0 (equivalent to JMN?)
JMTprocess executing JMT jumps to A after executing for another B cycles
JMXjump to A if location B has been executed
JNEskip if A <> B (same as CMN, CNE, SKN and SNE)
JNLjump to A if location B is not in a process queue
JNPjump to A if no process is scheduled to execute at B
JNZjump to A if B <> 0 (same as JMN)
JOBwarrior must execute JOB instruction at least every N cycles
JOIthe current process is suspended until a child process terminates
JOTjump to location A in other core
JSIjump to A and set instruction pointer increment to B
JSRpush currently executing address onto stack then jump to A (GSB)
JSTjump to A and set the a-field of B to point to the location after JST
JWNjump to A if B was last modified by program executing JWN
LDSinput A from stream
LRRstore the result from the last round in A, 0 = loss, 1 = tie, 2 = win
LSTexchange opcodes A and B on the internal opcode list
MAXif A > B then copy A to B
MINset A to CORESIZE-A (same as NEG)
MINif A < B then copy A to B
MONmove A to location B if location B contains non-zero A & B fields
MOPcopy opcode and addressing modes (same as CCO and OVL)
MOTmove A to location B in other core (same as PUT)
MOZmove A to location B if location B contains zero A & B fields
MSRsets location B to the process count of program A
MSSMars system call (similar to SYS)
MTDreplace opcodes at A and B with opcode below on internal opcode list
MTSreplace opcode at A with opcode B places down internal opcode list
MVBmove b-field of A to b-field of B
MVEmove A to B and overwrite the MVE instruction with DAT 0,0
MVNmove A to B if B <> 0
MVWmove A to B (same as MOV)
MVZmove A to B if B = 0
NEGset A to CORESIZE-A (same as MIN)
OEQskip if opcodes A and B equal (same as OMP)
OMPskip if opcodes A and B equal (same as OEQ)
ONEskip if opcodes A and B unequal
OVLcopy opcode and addressing modes (same as CCO and MOP)
PCIset increment added to instruction pointer to A (same as SES and SPI)
PCTprotect location A, preventing the next attempt to modify it
PCTprotect location A from modification until after it is next executed
PIRgenerate an interrupt to A when opponent in range
POPpop A from stack
PRCskip if an active process exists between A and B
PRIset priority of process executing PRI to A
PSHpush A onto stack
PUTmove A to location B in other core (same as MOT)
PWDchange password to A if current password is B (used with modified SPL)
QCNperform quantum control-not on source A and target B
QONperform quantum operation A on qubit B
RENif B <> 0 jump to A, reversing flow of execution for this process
REQjump to the previous instruction if A = B
RETpop location from stack, and jump to location + A
REVjump to A, reversing flow of execution for this process
REZif B = 0 jump to A, reversing flow of execution for this process
RLSrelease suspended processes
RNDstore a random number between 0 and A-1 to B
RPTif B <> 0, return to this instruction after executing next instruction
RSTreset the internal opcode list
RTIreturn from interrupt
SCRscramble opcode, a-field and b-field of location A, as defined by B
SCCskip and clear qubit A if qubit A is clear
SCSskip and set qubit A if qubit A is clear
SESset increment added to instruction pointer to A (same as PCI and SPI)
SGEskip if A >= B
SGTskip if A > B
SKBmarker for SKP
SKEskip if b-field of A = b-field of B (same as CPB)
SKNskip if A <> B (same as CMN, CNE, JNE and SNE)
SKPif A = B move instruction pointer to next SKB in core
SKRskip if location A has been executed within the last B cycles
SLCskip if opponent has less than A processes
SLEskip if A <= B
SLPsleep the executing process for A cycles
SLPsleep the executing process until ACT is executed at location A
SLT(modified) skip if less than A cycles until a tie is declared
SPCsplit to A, creating a process with maximum descendant count of B
SPDsplit to A, new process begins execution after a delay of B cycles
SPIset increment added to instruction pointer to A (same as PCI and SES)
SPIsplit to A, new process placed before the current process in queue
SPL(modified) split to A if B is equal the the current password
SPMsplit A processes to location B
SPNsplit to A if B <> 0
SPRsplit to A, spawned process has opposite flow of execution to parent
SPTsplit to A, thread created is unable to create further processes (THD)
SPWjump to A, when process terminates, resume execution after SPW
SPZsplit to A if B = 0
SRGstore relative address A as an absolute address in register B
SSPsuspend execution of executing program's other processes (same as FRZ)
SSZset A to size of stack
STRstore A to register B
STSoutput A to stream
SWPexchange the contents of A and B (same as EXC and XCH)
SYSsystem call (similar to MSS)
THDsplit to A, thread created is unable to create further processes (SPT)
TIMprocess executing TIM terminates after executing for another B cycles
TRMterminate executing process and re-allocate it's CPU-slice
WCHwatch location B and generate an interrupt to A when modified
WOPcopy value from b-field of A to opcode field of B
WRPsplit to A, new process begins execution B cycles ago
XCHexchange the contents of A and B (same as EXC and SWP)
ZERplace a DAT A at location B