COREWAR

/
JMP - Jump
🎯Press [STEP] 3 times to observe unconditional looping with JMP(0/3)
🟢 EDIT MODE (Click cells to modify)
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
+2
0000
+ADD
#
$
0001
↺JMP
$
0002
■DAT
#
#
◎ B-TARGET
0003
■DAT
$0
$0
++ ADD ROW
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 (8/19)

JMP - Jump

JMP: Jump (Unconditional)

JMP transfers execution to the specified address. It is the fundamental control flow instruction in Redcode.

Syntax

JMP target  ; Jump to target address

Common Patterns

Simple Loop

The most basic loop — jump back to the start:

start: ADD #4, ptr
       MOV bomb, @ptr
       JMP start       ; Loop forever

Self-Jump (Stall)

JMP 0 jumps to itself, creating an immortal but inactive process:

JMP 0   ; Do nothing forever

This is used in Imp Gates and as a defensive placeholder.

Computed Jump

Jump to a dynamically calculated address:

JMP @ptr  ; Jump to address stored in ptr

Strategic Notes

  • Every bomber needs JMP to loop its attack cycle
  • JMP 0 is the simplest way to keep a process alive
  • Combined with SPL, you can create complex multi-threaded control flows
  • The B-field of JMP is typically ignored but can store data
📚 REDCODE-94 INSTRUCTION REFERENCE (8/19)

JMP - Jump

JMP: Jump (Unconditional)

JMP transfers execution to the specified address. It is the fundamental control flow instruction in Redcode.

Syntax

JMP target  ; Jump to target address

Common Patterns

Simple Loop

The most basic loop — jump back to the start:

start: ADD #4, ptr
       MOV bomb, @ptr
       JMP start       ; Loop forever

Self-Jump (Stall)

JMP 0 jumps to itself, creating an immortal but inactive process:

JMP 0   ; Do nothing forever

This is used in Imp Gates and as a defensive placeholder.

Computed Jump

Jump to a dynamically calculated address:

JMP @ptr  ; Jump to address stored in ptr

Strategic Notes

  • Every bomber needs JMP to loop its attack cycle
  • JMP 0 is the simplest way to keep a process alive
  • Combined with SPL, you can create complex multi-threaded control flows
  • The B-field of JMP is typically ignored but can store data