SNE - Skip if Not Equal
SNE: Skip if Not Equal
SNE skips the next instruction if operands A and B are not equal. It is the logical opposite of SEQ/CMP.
Syntax
SNE A, B ; Skip next if A != BAlternative Scanning
While CMP/SEQ skips when cells are empty, SNE skips when they're non-empty:
scan: ADD #8, ptr
SNE @ptr, #0 ; Skip if cell is non-empty
JMP scan ; Cell is empty, keep scanning
MOV bomb, @ptr ; Cell is non-empty, bomb it!
JMP scanThis inverts the scan logic, which can sometimes produce more compact code.
Modifiers
.I— Compare entire instructions.A— Compare A-fields.B— Compare B-fields (default)
Strategic Notes
SNE is preferred by some competitive players for its slightly different scanning logic flow. Choose between CMP/SEQ and SNE based on which produces fewer instructions for your scanning pattern.