# MIPS Directives

[MIPS Documentation](https://asm-editor.specy.app/documentation/mips.md)

Web page: https://asm-editor.specy.app/documentation/mips/directive

What the assembler does with the lines that start with a dot.

40 entries, each with its own page of markdown:

- [What directives are](https://asm-editor.specy.app/documentation/mips/directive/what-directives-are.md): MIPS directives are used to define the structure of the program.
- [`.data`](https://asm-editor.specy.app/documentation/mips/directive/data.md): Declares a section for storing initialized data, such as variables.
- [`.text`](https://asm-editor.specy.app/documentation/mips/directive/text.md): Declares a section for storing executable instructions.
- [`.kdata`](https://asm-editor.specy.app/documentation/mips/directive/kdata.md): Declares a section for storing kernel-mode initialized data.
- [`.ktext`](https://asm-editor.specy.app/documentation/mips/directive/ktext.md): Declares a section for storing kernel-mode executable instructions.
- [`.word`](https://asm-editor.specy.app/documentation/mips/directive/word.md): Allocates one or more 32-bit (4-byte) words in memory.
- [`.half`](https://asm-editor.specy.app/documentation/mips/directive/half.md): Allocates one or more 16-bit (2-byte) halfwords in memory.
- [`.byte`](https://asm-editor.specy.app/documentation/mips/directive/byte.md): Allocates one or more 8-bit (1-byte) values in memory.
- [`.float`](https://asm-editor.specy.app/documentation/mips/directive/float.md): Allocates a single-precision floating-point (32-bit) number in memory.
- [`.double`](https://asm-editor.specy.app/documentation/mips/directive/double.md): Allocates a double-precision floating-point (64-bit) number in memory.
- [`.asciiz`](https://asm-editor.specy.app/documentation/mips/directive/asciiz.md): Stores a null-terminated string (C-style string).
- [`.ascii`](https://asm-editor.specy.app/documentation/mips/directive/ascii.md): Stores a string without a null terminator.
- [`.space`](https://asm-editor.specy.app/documentation/mips/directive/space.md): Reserves a specified number of bytes in memory without initializing them.
- [`.align`](https://asm-editor.specy.app/documentation/mips/directive/align.md): Aligns the next data address to a boundary of 2^n bytes: .align 2 moves it to a 4-byte boundary, and .align 3 to an 8-byte boundary.
- [`.globl`](https://asm-editor.specy.app/documentation/mips/directive/globl.md): Marks a symbol as global so other source files or a linker can refer to it.
- [`.extern`](https://asm-editor.specy.app/documentation/mips/directive/extern.md): Declares an external data symbol and its size in bytes, so the assembler can reserve its address for references to that symbol.
- [`.macro`](https://asm-editor.specy.app/documentation/mips/directive/macro.md): Defines a macro, which allows writing reusable code blocks.
- [`.end_macro`](https://asm-editor.specy.app/documentation/mips/directive/end_macro.md): Ends a macro definition.
- [`.include`](https://asm-editor.specy.app/documentation/mips/directive/include.md): Includes an external assembly file.
- [`.eqv`](https://asm-editor.specy.app/documentation/mips/directive/eqv.md): Defines a symbolic constant, similar to #define in C.
- [`.set`](https://asm-editor.specy.app/documentation/mips/directive/set.md): Configures assembler settings, such as allowing modifications to the $at register.
- [`.bss`](https://asm-editor.specy.app/documentation/mips/directive/bss.md): Declares an uninitialized data section, typically used for reserving large blocks of memory.
- [`.frame`](https://asm-editor.specy.app/documentation/mips/directive/frame.md): Describes a function's stack frame for debugging tools: base register, stack size and return register.
- [`.ent`](https://asm-editor.specy.app/documentation/mips/directive/ent.md): Marks the start of a function for debugging tools.
- [`.end`](https://asm-editor.specy.app/documentation/mips/directive/end.md): Marks the end of a function for debugging tools.
- [`.local`](https://asm-editor.specy.app/documentation/mips/directive/local.md): Marks a symbol as local to this file for the linker.
- [`.section`](https://asm-editor.specy.app/documentation/mips/directive/section.md): Switches to the named section.
- [`.rdata`](https://asm-editor.specy.app/documentation/mips/directive/rdata.md): Declares a section for read-only initialized data, such as string literals.
- [`.sdata`](https://asm-editor.specy.app/documentation/mips/directive/sdata.md): Alias for .rdata.
- [`.sbss`](https://asm-editor.specy.app/documentation/mips/directive/sbss.md): Alias for .bss.
- [`.comm`](https://asm-editor.specy.app/documentation/mips/directive/comm.md): Reserves bytes for an uninitialized global variable, the way a C compiler declares one.
- [`.lcomm`](https://asm-editor.specy.app/documentation/mips/directive/lcomm.md): Like .comm, but for a symbol local to this file, as a C compiler declares an uninitialized static variable.
- [`.zero`](https://asm-editor.specy.app/documentation/mips/directive/zero.md): Reserves the given number of bytes, which read as zero.
- [`.p2align`](https://asm-editor.specy.app/documentation/mips/directive/p2align.md): Alias for .align: aligns the next item on a 2^n byte boundary.
- [`.balign`](https://asm-editor.specy.app/documentation/mips/directive/balign.md): Aligns the next item on the given byte boundary, written directly rather than as a power of two.
- [`.2byte`](https://asm-editor.specy.app/documentation/mips/directive/2byte.md): Alias for .half.
- [`.4byte`](https://asm-editor.specy.app/documentation/mips/directive/4byte.md): Alias for .word.
- [`.asciz`](https://asm-editor.specy.app/documentation/mips/directive/asciz.md): Alias for .asciiz: stores a null-terminated string.
- [`.string`](https://asm-editor.specy.app/documentation/mips/directive/string.md): Alias for .asciiz: stores a null-terminated string.
- [`.global`](https://asm-editor.specy.app/documentation/mips/directive/global.md): Alias for .globl.
