[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Format of data at start of STACKS code segment (if present):
Offset  Size    Description
 00h    WORD    ???
 02h    WORD    number of stacks (the x in STACKS=x,y)
 04h    WORD    size of stack control block array (should be 8*x)
 06h    WORD    size of each stack (the y in STACKS=x,y)
 08h    DWORD   pointer to STACKS data segment
 0Ch    WORD    offset in STACKS data segment of stack control block array
 0Eh    WORD    offset in STACKS data segment of last element of that array
 10h    WORD    offset in STACKS data segment of the entry in that array for
                the next stack to be allocated (initially same as value in 0Eh
                and works its way down in steps of 8 to the value in 0Ch as
                hardware interrupts pre-empt each other)
Note:   the STACKS code segment data may, if present, be located as follows:
    DOS 3.2:    The code segment data is at a paragraph boundary fairly early
                in the IBMBIO segment (seen at 0070:0190h)
    DOS 3.3:    The code segment is at a paragraph boundary in the DOS data
                segment, which may be determined by inspecting the segment
                pointers of the vectors for those of interrupts 02h, 08h-0Eh,
                70h, 72-77h which have not been redirected by device drivers or
                TSRs.
    DOS 4.x:    Identified by sub-segment control block type "S" within the DOS
                data segment.

Format of array elements in STACKS data segment:
Offset  Size    Description
 00h    BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
                higher stack.
 01h    BYTE    not used
 02h    WORD    previous SP
 04h    WORD    previous SS
 06h    WORD    ptr to word at top of stack (new value for SP). The word at the
                top of the stack is preset to point back to this control block.

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson