(* ------------------------------------------------------ *)
(*                      STACK.DEF                         *)
(*              Verwaltung von Stacks (LIFO)              *)
(*          (c) 1991 Dieter Kreimann & TOOLBOX            *)
(* ------------------------------------------------------ *)
DEFINITION MODULE Stack;

FROM SYSTEM IMPORT ADDRESS;

TYPE
  tStack;

PROCEDURE Create(VAR stack : tStack);

PROCEDURE Delete(VAR stack : tStack);

PROCEDURE Push(stack : tStack;
               size : CARDINAL; addr : ADDRESS);

PROCEDURE Pop(    stack : tStack;
              VAR size : CARDINAL; addr : ADDRESS);

PROCEDURE Peep(    stack : tStack;
               VAR size : CARDINAL; addr : ADDRESS);

PROCEDURE IsEmpty(stack : tStack) : BOOLEAN;

PROCEDURE NumEntries(stack : tStack) : CARDINAL;

PROCEDURE Reset(stack : tStack);

PROCEDURE Drop(stack : tStack; num : CARDINAL);

PROCEDURE Join(stackTop, stackBot : tStack);

END Stack.
(* ------------------------------------------------------ *)
(*                 Ende von STACK.DEF                     *)
