# `ibts`

[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/ibts

**Insert bit string** · Undocumented

Category: Logic

Inserts a bit string from the source operand into the destination.

Early 386 processors only · Not available in 64-bit mode

## Forms

- `ibts r/m, reg` (16, 32)
  - `ibts r/m16, reg16`
  - `ibts r/m32, reg32`

## Operands

- `r/m`: A general-purpose register or memory location matching the operation’s size, for example `rax` or `qword [rbp-8]`.
- `reg`: A general-purpose register matching the operation’s size, for example `al`, `ax`, `eax` or `rax`.

## Description

`CL` indicates the number of bits to be copied, from the low bits
of the source. `(E)AX` indicates the low order bit offset in the
destination that is written to. For example, if `CL` is set to 4
and `AX` (for 16-bit code) is set to 5, bits 0-3 of `src` will
be copied to bits 5-8 of `dst`. Intel’s current manual does not describe this instruction.

`IBTS` is supported only on the early Intel 386s, and conflicts
with the opcodes for `CMPXCHG486` (on early Intel 486s). NASM
supports it only for completeness. Its counterpart is [`XBTS`](https://asm-editor.specy.app/documentation/x86/instruction/xbts.md).
