# `scc`

[M68K Documentation](https://asm-editor.specy.app/documentation/m68k.md) › [Instructions](https://asm-editor.specy.app/documentation/m68k/instruction.md)

Web page: https://asm-editor.specy.app/documentation/m68k/instruction/scc

**Set according to condition**

Category: Comparison

Sets the destination byte to $FF (-1) if the condition named by the suffix holds, otherwise to 0.

Size .b

## Flags

| Flag | Effect |
| --- | --- |
| X | not changed |
| N | not changed |
| Z | not changed |
| V | not changed |
| C | not changed |

## Forms

- `scc <ea>`
  - Operand: Dn, (An), (An)+, -(An), d(An), d(An,Xn), abs (data alterable)

## Operands

- [`<ea>`](https://asm-editor.specy.app/documentation/m68k/addressing-mode.md): An operand using one of the addressing modes listed for this form. The list determines whether it can be a register, memory or an immediate value. With `opt p=68020`, an allowed `d(An,Xn)` or `d(PC,Xn)` mode also permits the corresponding 68020 indexed and memory indirect forms. See [68020 addressing](https://asm-editor.specy.app/documentation/m68k/addressing-mode/68020.md).

## Description

The suffix selects the condition. See [condition codes](https://asm-editor.specy.app/documentation/m68k/condition-codes.md).

## Example

```m68k
move.l #5, d0
tst d0
spl d1 ; d1 = $FF (positive)
seq d2 ; d2 = $00 (not zero)

move.l #0, d3
tst d3
seq d4 ; d4 = $FF (zero)
sne d5 ; d5 = $00 (is zero)

move.l #-1, d6
tst d6
smi d7 ; d7 = $FF (negative)
```
