# `pushfw`

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

Web page: https://asm-editor.specy.app/documentation/x86/instruction/pushfw

**Push flags, 16-bit**

Category: Stack

Pushes the low 16 bits of rflags onto the stack as a word and decrements rsp by 2.

8086 and later

[Intel's reference: PUSHF/PUSHFD/PUSHFQ](https://intel.github.io/SDM/instruction/PUSHF-PUSHFD-PUSHFQ.html)

## Flags

| Flag | Effect |
| --- | --- |
| CF | not changed |
| PF | not changed |
| AF | not changed |
| ZF | not changed |
| SF | not changed |
| DF | not changed |
| OF | not changed |

Reads: CF, PF, AF, ZF, SF, TF, IF, DF, OF

## Forms

- `pushfw`

## Description

In 64-bit mode, `pushf` / `pushfq` subtract 8 from `rsp` and store a 64-bit image; `pushfw` subtracts 2 and stores the low 16 bits. `pushfd` is unavailable in this mode. The pushed 64-bit image has RF and VM cleared; it is not an exact copy of every bit of `rflags`.

## Example

```x86
global _start

section .text
_start:
        mov rax, 12
        mov rbx, 5
        mov rcx, 3
        mov rsi, 9

        pushfw

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