<!-- THIS PART OF THIS FILE IS AUTOGENERATED. DO NOT MODIFY IT. See scripts/generate-docs.sh -->
# setflag

```text
usage: setflag [-h] flag value

```

Modify the flags register.

**Alias:** flag
### Positional arguments

|Positional Argument|Help|
| :--- | :--- |
|flag|Flag for which you want to change the value|
|value|Value to which you want to set the flag - only valid options are 0 and 1|

### Optional arguments

|Short|Long|Help|
| :--- | :--- | :--- |
|-h|--help|show this help message and exit|

### Examples
```text
On X86/X64:
    setflag ZF 1        -- set zero flag
    setflag CF 0        -- unset carry flag

On ARM:
    setflag Z 0         -- unset the Z cpsr/xpsr flag

To see flags registers:
    info reg eflags     -- on x86/x64
    info reg cpsr/xpsr  -- on ARM (specific register may vary)
```
### Notes
This command supports flags registers that are defined for architectures in the pwndbg/regs.py file.

<!-- END OF AUTOGENERATED PART. Do not modify this line or the line below, they mark the end of the auto-generated part of the file. If you want to extend the documentation in a way which cannot easily be done by adding to the command help description, write below the following line. -->
<!-- ------------\>8---- ----\>8---- ----\>8------------ -->
