/* @(#)stack.h 1.2 5/14/92 1 */ /* This file provides macros for stack save and restore in assembly language */ #ifndef __STACK_DEFINED #define __STACK_DEFINED #ifdef __DMSTACK__ /*Set by C Compiler*/ #define frame_ptr I6 #define stack_ptr I7 /* These routines push/pop values to/from the stack*/ #define get(a,b) a=DM(b,I7) #define put(a) DM(I7,-1)=a #define alter(a) MODIFY(I7,a) /* This routine reads a value from the stack (relative to the frame)*/ #define reads(a,b) a=DM(b,I6) #endif #ifdef __PMSTACK__ /*Set by C Compiler*/ #define frame_ptr I14 #define stack_ptr I15 /*These routines push/pop values to/from the stack*/ #define get(a,b) a=PM(b,I15) #define put(a) PM(I15,-1)=a #define alter(a) MODIFY(I15,a) /*This routine reads a value from the stack (relative to the frame)*/ #define reads(a,b) a=PM(b,I14) #endif #endif