X86-assembly/Instructions/setz

From aldeid
Jump to navigation Jump to search
You are here:
setz

Description

  • The setz sets the byte in the destination operand to 1 if the Zero Flag (ZF) is set, otherwise sets the operand to 0.

Syntax

setz destination

Example

cmp     [ebp+VersionInformation.dwPlatformID], 2    ; if VersionInformation.dwPlatformID=2, ZF=1
setz    al                                          ; AL register will be set to 1 if VersionInformation.dwPlatformID=2 (VER_PLATFORM_WIN32_NT)
                                                    ; The operating system is Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003,
                                                    ; Windows XP, or Windows 2000.

Comments