COREWAR

/
MUL - Multiply
🎯Press [STEP] 3 times to observe the value at 0002 being multiplied(0/3)
🟢 EDIT MODE (Click cells to modify)
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
+2
0000
+MUL
#
$
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 (5/19)

MUL - Multiply

MUL: Multiply

MUL calculates A * B and stores the result in B. While less common than ADD or SUB, it provides powerful arithmetic capabilities.

Syntax

MUL A, B   ; B = A * B

Use Cases

Fast Pointer Advancement

Multiply allows large jumps through memory:

MUL #3, ptr   ; Triple the pointer value
MOV bomb, @ptr

Hash-like Distribution

Create non-linear bombing patterns that are harder for opponents to predict:

loop: MUL #7, ptr
      MOV bomb, @ptr
      JMP loop
ptr:  DAT 0, 1
bomb: DAT 0, 0

Modifiers

  • .A — Multiply A-fields
  • .B — Multiply B-fields (default)
  • .F — Multiply both fields independently

Notes

Multiplication wraps around the core size. Results are always modulo the core size, so MUL can create interesting distribution patterns for bombing.

📚 REDCODE-94 INSTRUCTION REFERENCE (5/19)

MUL - Multiply

MUL: Multiply

MUL calculates A * B and stores the result in B. While less common than ADD or SUB, it provides powerful arithmetic capabilities.

Syntax

MUL A, B   ; B = A * B

Use Cases

Fast Pointer Advancement

Multiply allows large jumps through memory:

MUL #3, ptr   ; Triple the pointer value
MOV bomb, @ptr

Hash-like Distribution

Create non-linear bombing patterns that are harder for opponents to predict:

loop: MUL #7, ptr
      MOV bomb, @ptr
      JMP loop
ptr:  DAT 0, 1
bomb: DAT 0, 0

Modifiers

  • .A — Multiply A-fields
  • .B — Multiply B-fields (default)
  • .F — Multiply both fields independently

Notes

Multiplication wraps around the core size. Results are always modulo the core size, so MUL can create interesting distribution patterns for bombing.