Often implemented as an ADT
#define STACKMAX 32
static int opstack[STACKMAX];
static int opsp;
PushOp(op)
int op;
{
if (opsp==STACKMAX) {strcpy(dispstr,"stack error"); entered=3;}
else opstack[opsp++]=op;
}
int PopOp()
{
if (opsp==0) {
strcpy(dispstr,"stack error");
entered=3;
return(kNOP);
} else
return(opstack[--opsp]);
}
int isopempty()
{
return( opsp ? 0 : 1 );
}