Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

stack.h

Go to the documentation of this file.
00001 /* ndk - [ stack.h ]
00002  *
00003  * Expand up, or down, stack class
00004  *
00005  * (c)2004 dcipher / neuraldk
00006  *           www.neuraldk.org
00007  */
00008 
00017 #ifndef __ndk_stack_h__
00018 #define __ndk_stack_h__
00019 
00020 #include "console.h"
00021 
00022 /* Because I've maintained Intel's definitions for expand up
00023  * and expand down for the _real_ stack (ie, ss:esp), I've
00024  * continued to use them here.  Unfortunately, that means the
00025  * definitions are counter-intuitive... however, they
00026  * are consistent with the architecture...
00027  */
00028 #define STACK_EXPAND_UP   (1)
00029 #define STACK_EXPAND_DOWN (0)
00030 
00031 typedef struct
00032 {
00033    long flags;
00034    //long  total;
00035    long pointer;
00036    long base;
00037 } Stack;
00038 
00039 void stackPush(Stack *stack, long data);
00040 long stackPop(Stack *stack);
00041 long stackPeek(Stack *stack, long offset);
00042 void stackPoke(Stack *stack, long offset, long data);
00043 void stackRemove(Stack *stack, long offset, long count);
00044 void stackInsert(Stack *stack, long offset, long *data, long count);
00045 void stackDisplay(Stack *stack);
00046 
00047 #endif
00048 

Generated on Wed Mar 22 20:36:33 2006 for ndk by  doxygen 1.4.4