Use index and memory pointers for stack/base pointers and implement enter/leave routines