#pragma pack(2)
struct func { unsigned short opcode; void (*addr)(); };
#pragma pack()

extern void unsupp(char *);

/* run.c */
extern void *Malloc(unsigned);
extern void *Calloc(unsigned, unsigned);
extern void *Realloc(void *, unsigned);
extern void panic(char *fmt, ...);
extern void errmsg(char *fmt, ...);
extern int verbosity;
#define verbose if(verbosity>1)errmsg
#define warning if(verbosity>0)errmsg

/* runseg.s */
extern int runseg(unsigned long *seg, unsigned char *cmdbuf, unsigned cmdlen);

/* loadseg.c */
extern unsigned long *LoadSeg(const unsigned char *path);
extern unsigned long *adosload(FILE *fp, const char *name, int verbosity);

/* amiga.c */
extern void amiga_init(void);

/* exec.c */
extern void *exec_init(void);
extern struct ExecBase *const ExecBase;

/* dos.c */
extern struct Process CurrentProcess;
extern void dos_init(void);
extern struct DosLibrary *const DOSBase;

#define CTOB(p)  ((ULONG)(p) >> 2)
#define BTOC(p)  (void *)((p) << 2)
