home *** CD-ROM | disk | FTP | other *** search
- #include <exec/types.h>
- #include <proto/exec.h>
- #include <stdio.h>
- #include "stack_pragmas.h"
-
- struct Library *StackBase;
-
- extern ULONG Push(ULONG);
- extern ULONG Pop(void);
-
- main(int argc,
- unsigned char *argv[]) {
- if(StackBase = OpenLibrary
- ("stack.library",0L)) {
- ULONG i;
- for(i = 0; i < 50; i++) {
- printf("Push=%ld\n",Push(i));
- }
-
- while((i = Pop()) != -1) {
- printf("Pop=%ld\n",i);
- }
- CloseLibrary(StackBase);
- }
-
- }
-