/*
....[@@@..[@@@..............[@.................. MUD++ is a written from
....[@..[@..[@..[@..[@..[@@@@@....[@......[@.... scratch multi-user swords and
....[@..[@..[@..[@..[@..[@..[@..[@@@@@..[@@@@@.. sorcery game written in C++.
....[@......[@..[@..[@..[@..[@....[@......[@.... This server is an ongoing
....[@......[@..[@@@@@..[@@@@@.................. development project. All
................................................ contributions are welcome.
....Copyright(C).1995.Melvin.Smith.............. Enjoy.
------------------------------------------------------------------------------
Melvin Smith (aka Fusion) msmith@hom.net
MUD++ development mailing list mudpp@van.ml.org
------------------------------------------------------------------------------
asmloader.h
*/
#ifndef _ASMLOADER_H
#define _ASMLOADER_H
#include "string.h"
#include "array.h"
#include "vmtypes.h"
#include "asmobjfile.h"
class VMachine;
typedef void (*vm_interface) ( VMachine * );
extern bool allow_redefinition_of_funs;
extern bool vmachine_enabled;
// to separate file
struct _vm_interface_table
{
char * name;
vm_interface fun;
};
typedef struct
{
String name;
memorycell * low_border;
memorycell * high_border;
String error;
} vmfun;
typedef struct
{
int low_offset;
int high_offset;
memorycell * fun_ptr;
} vmfunmap;
extern const struct _vm_interface_table vm_interface_table[];
extern Array<vmfun> vmfun_table;
extern Array<vmstack> vmconstant_table;
extern Array<vmstack> vmstatvar_table;
extern Array<String> vmstatvar_nametable;
bool link_vmachine();
bool add_asmobject( AsmObjFile & );
extern u16 lookup_interface_number ( const char * name );
int lookup_vmfun_number( const char * name );
#endif