COREWAR

/
SEQ - Skip if Equal
🎯Press [STEP] twice to observe SEQ skipping the next line when equal(0/2)
🟢 EDIT MODE (Click cells to modify)
[Addr][Opcode][A (Left)][B (Right)]
📦 DATA / BOMB (DAT)
+3
0000
◉SEQ
#
$
0001
■DAT
#
#
0002
↺JMP
$
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 (14/19)

SEQ - Skip if Equal

SEQ: Skip if Equal

SEQ is the official ICWS-94 name for the compare-and-skip instruction (CMP is its historical alias). It compares operand A and operand B, and if they are equal, the Program Counter advances by 2 instead of 1—skipping the next instruction.

Syntax

SEQ.I  A, B    ; Skip next instruction if cell A and cell B are identical
SEQ.AB #val, B ; Skip next instruction if B's B-field equals #val

Why Both SEQ and CMP Exist

Historically, CMP was used in ICWS-88. When the ICWS-94 standard introduced SNE (Skip if Not Equal), SEQ (Skip if Equal) was added as a symmetric, self-explanatory mnemonic. Both assemble to the exact same operation.

Scanner Example

scan: ADD.AB #8, ptr     ; Advance scan pointer
      SEQ.I  @ptr, empty ; Is the target cell equal to an empty DAT 0, 0?
      MOV.I  bomb, @ptr  ; Skipped when empty; executed only when enemy found!
      JMP.A  scan        ; Keep scanning
empty: DAT.F #0, #0
📚 REDCODE-94 INSTRUCTION REFERENCE (14/19)

SEQ - Skip if Equal

SEQ: Skip if Equal

SEQ is the official ICWS-94 name for the compare-and-skip instruction (CMP is its historical alias). It compares operand A and operand B, and if they are equal, the Program Counter advances by 2 instead of 1—skipping the next instruction.

Syntax

SEQ.I  A, B    ; Skip next instruction if cell A and cell B are identical
SEQ.AB #val, B ; Skip next instruction if B's B-field equals #val

Why Both SEQ and CMP Exist

Historically, CMP was used in ICWS-88. When the ICWS-94 standard introduced SNE (Skip if Not Equal), SEQ (Skip if Equal) was added as a symmetric, self-explanatory mnemonic. Both assemble to the exact same operation.

Scanner Example

scan: ADD.AB #8, ptr     ; Advance scan pointer
      SEQ.I  @ptr, empty ; Is the target cell equal to an empty DAT 0, 0?
      MOV.I  bomb, @ptr  ; Skipped when empty; executed only when enemy found!
      JMP.A  scan        ; Keep scanning
empty: DAT.F #0, #0