Stack:

DDS_STACK structures describe resizeable memory blocks. The byte "size" and "alignment" of pushed items may be specified. This allows any type to be pushed onto the stack and accessed.

The stack's base address may change when data is pushed onto it because the memory may be re-allocated and the buffer moved.

    
          ***************************************************          
          ***  WARNING    WARNING     WARNING    WARNING  ***          
          ***************************************************          
          ***  All pointers into the stack are invalid    ***          
          ***  after any data is pushed on the the stack. ***          
          ***  INVALID POINTER BUGS ARE DATA DEPENDENT.   ***          
          ***************************************************          
    

The DDS_IDX (char index) to existing items within the stack is always preserved, however the absolute address may change. Links between items should use a DDS_IDX index (char index).

The following masking macros are defined in dds_stack.h.
(NOTE: † Overloaded macros are provided for efficiency.)

Structures: defined in dds_stack.h
    DDS_STACK - Stack Descriptor (relocatable memory block)


Globals:
    DDS_STACK dds_dump_que  -  /* dump "diff", print preamble queue */
    DDS_STACK dds_prime_tag -  /* array of (DDS_SYM*) values. */
    DDS_STACK dds_tmp       -  /* stack for temporary data */


Files:
    stackinit.c     - Initialize stack descriptor
    stackpush.c     - Push "size" bytes ("align" offset) onto stack (return offset)
    stackpushchar.c - Push one character onto stack (return offset to char)
    stackpushptr.c  - Push one pointer onto stack
    stackstr.c      - Push "string" onto stack (return offset)
    stackchar.c     - Push "char array" onto stack (return offset)
    stackpop.c      - pop "size" bytes from top of stack
    stackset.c      - Set "index" as top of stack
    stackptr.c      - Return pointer to "index" offset in stack
    stackterm.c     - Terminate stack descriptor