> For the complete documentation index, see [llms.txt](https://mentebinaria.gitbook.io/assembly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mentebinaria.gitbook.io/assembly/apendices/codigo-de-maquina/immediate.md).

# Immediate

O campo *immediate* (valor "imediato") pode ter 1, 2, ou 4 bytes de tamanho. Ele é o operando numérico presente em algumas instruções. Exemplo:

```nasm
mov eax, 0x11223344
```

Essa instrução em código de máquina fica: `B8 44 33 22 11`

Onde `B8` é o *opcode* da instrução e `44 33 22 11` o valor imediato (`0x11223344`). Lembrando que a arquitetura x86 é *little-endian*, portanto o valor imediato fica em *little-endian* na instrução.

O tamanho desse campo é definido pelo atributo **operand-size**, portanto ao usar o prefixo `66` o seu tamanho pode alternar na instrução entre 16-bit e 32-bit. Sobre instruções com operandos de 8-bit, como `mov al, 123`, existem *opcodes* específicos para operandos nesse tamanho portanto o prefixo não é usado nessas instruções. E obrigatoriamente o *immediate* terá 8-bit de tamanho.

Outros dois exemplos seriam `mov ax, 0x1122` e `mov al, 0x11`. Onde o primeiro tem o código de máquina `66 B8 22 11` em modo de 32-bit, e em modo de 16-bit fica igual só que sem o prefixo `66`.

Já a segunda instrução terá o código de máquina `B0 11` em qualquer modo de operação, já que ela independe do **operand-size**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mentebinaria.gitbook.io/assembly/apendices/codigo-de-maquina/immediate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
