sets

Set byte if sign (SF == 1)

Stores 1 in the destination byte when the sign flag is set (SF is 1), otherwise 0.

386 and later

Intel's reference: SETcc

CFPFAFZFSFDFOF –––––––
  • Changes no flag
  • Reads SF

Forms

  • sets

Operands

r/m8
An 8-bit general-purpose register or byte in memory, for example al or byte [rsi]. The high-byte registers ah, bh, ch and dh cannot be used with a REX prefix, including when the memory address uses an extended register such as r8.
global _start

section .text
_start:
        mov rax, 12
        cmp rax, 12
        sets bl             ; bl becomes 1 when the condition holds, 0 when it does not

        mov rax, 60         ; syscall 60: exit
        xor rdi, rdi
        syscall