<<< Flat Model | Index | The .DATA and .CONST Directives >>> |
The stack is the section of memory used for pushing or popping registers and storing the return address when a subroutine is called.
The stack often holds temporary and local variables.
If your main module is written in a high-level language, that language handles the details of creating a stack.
Use the .STACK directive only when writing a main module in assembly language.
The .STACK directive creates a stack segment.
By default, the assembler allocates 1K of memory for the stack. This size is sufficient for most small programs.
To create a stack of a size other than the default size, give .STACK a single numeric argument indicating stack size in bytes:
.STACK 2048 ; Use 2K stack
<<< Flat Model | Index | The .DATA and .CONST Directives >>> |