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 #valWhy 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