qse/ase/stx/context.h

44 lines
852 B
C
Raw Normal View History

2005-05-15 18:37:00 +00:00
/*
2007-03-22 11:19:28 +00:00
* $Id: context.h,v 1.6 2007-03-22 11:19:28 bacon Exp $
2005-05-15 18:37:00 +00:00
*/
2007-03-22 11:19:28 +00:00
#ifndef _ASE_STX_CONTEXT_H_
#define _ASE_STX_CONTEXT_H_
2005-05-15 18:37:00 +00:00
2007-03-22 11:19:28 +00:00
#include <ase/stx/stx.h>
2005-05-15 18:37:00 +00:00
#define PUSH_OBJECT 0xA0
#define SEND_UNARY_MESSAGE 0xB0
#define HALT 0xFF
2007-03-22 11:19:28 +00:00
#define ASE_STX_CONTEXT_SIZE 4
#define ASE_STX_CONTEXT_IP 0
#define ASE_STX_CONTEXT_METHOD 1
#define ASE_STX_CONTEXT_ARGUMENTS 2
#define ASE_STX_CONTEXT_TEMPORARIES 3
2005-05-21 16:11:06 +00:00
2007-03-22 11:19:28 +00:00
struct ase_stx_context_t
2005-05-21 16:11:06 +00:00
{
2007-03-22 11:19:28 +00:00
ase_stx_objhdr_t header;
ase_word_t ip;
ase_word_t method;
ase_word_t arguments;
ase_word_t temporaries;
2005-05-21 16:11:06 +00:00
};
2007-03-22 11:19:28 +00:00
typedef struct ase_stx_context_t ase_stx_context_t;
2005-05-21 16:11:06 +00:00
2005-05-15 18:37:00 +00:00
#ifdef __cplusplus
extern "C" {
#endif
2007-03-22 11:19:28 +00:00
ase_word_t ase_stx_new_context (ase_stx_t* stx,
ase_word_t method, ase_word_t args, ase_word_t temp);
int ase_stx_run_context (ase_stx_t* stx, ase_word_t context);
2005-05-15 18:37:00 +00:00
#ifdef __cplusplus
}
#endif
#endif