COREWAR

/
JMZ - Jump if Zero
🎯Press [STEP] twice to observe JMZ jumping over DAT when B-value is 0(0/2)
🟢 EDIT MODE (Click cells to modify)
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
+2+3
0000
↺JMZ
$
$
0001
■DAT
#
#
0002
↺JMP
$
◎ JUMP(A)
0003
■DAT
#
#
◎ B-TARGET
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 (9/19)

JMZ - Jump if Zero

JMZ: Jump if Zero

JMZ jumps to address A if the value tested at address B is zero. This is the primary conditional instruction for scanning.

Syntax

JMZ target, test  ; Jump to target if test's B-field is 0

Scanner Pattern

The classic scanning loop uses JMZ to skip empty cells:

scan: ADD #10, ptr   ; Move scan pointer forward
      JMZ scan, @ptr ; If cell is empty (0), keep scanning
      MOV bomb, @ptr ; Found non-zero! Attack!
      JMP scan
ptr:  DAT 0, 0
bomb: DAT 0, 0

How It Works

  • Test the B-field of the instruction at address B
  • If the value is zero, jump to address A
  • If non-zero, continue to the next instruction

Modifiers

  • .B — Test B-field (default)
  • .A — Test A-field
  • .F — Jump if both fields are zero

Strategic Notes

JMZ is essential for scanners that detect the presence of enemy code. Empty core cells are initialized to DAT 0, 0, so any non-zero value indicates an opponent.

📚 REDCODE-94 INSTRUCTION REFERENCE (9/19)

JMZ - Jump if Zero

JMZ: Jump if Zero

JMZ jumps to address A if the value tested at address B is zero. This is the primary conditional instruction for scanning.

Syntax

JMZ target, test  ; Jump to target if test's B-field is 0

Scanner Pattern

The classic scanning loop uses JMZ to skip empty cells:

scan: ADD #10, ptr   ; Move scan pointer forward
      JMZ scan, @ptr ; If cell is empty (0), keep scanning
      MOV bomb, @ptr ; Found non-zero! Attack!
      JMP scan
ptr:  DAT 0, 0
bomb: DAT 0, 0

How It Works

  • Test the B-field of the instruction at address B
  • If the value is zero, jump to address A
  • If non-zero, continue to the next instruction

Modifiers

  • .B — Test B-field (default)
  • .A — Test A-field
  • .F — Jump if both fields are zero

Strategic Notes

JMZ is essential for scanners that detect the presence of enemy code. Empty core cells are initialized to DAT 0, 0, so any non-zero value indicates an opponent.