externs.h 3.18 KB
#ifndef	EXTERNS_H
#define	EXTERNS_H
#ifdef __cplusplus
extern "C" {
#endif 

#include "types.h"

extern void error(char *string);
extern void yyerror(char *s);
extern Symbol *AddName(char *id, int value, int lineNo, unsigned int ref);
extern Symbol *LookUpName(char *id);
extern Symbol *RemoveName(char *id);
extern char *DisassembleViceCode(char *buffer, unsigned int instruction, Symbol *symPtr);
extern void BuildOpcodeTable();
/*
 * this should use varargs, but varargs is not portable and I can't find the man page
 */
extern unsigned int BuildOpcode2(
    unsigned int	width0, unsigned int	field0, 
    unsigned int	width1, unsigned int	field1); 
extern unsigned int BuildOpcode4(
    unsigned int	width0, unsigned int	field0, 
    unsigned int	width1, unsigned int	field1, 
    unsigned int	width2, unsigned int	field2, 
    unsigned int	width3, unsigned int	field3); 
extern unsigned int BuildOpcode5(
    unsigned int	width0, unsigned int	field0, 
    unsigned int	width1, unsigned int	field1, 
    unsigned int	width2, unsigned int	field2, 
    unsigned int	width3, unsigned int	field3, 
    unsigned int	width4, unsigned int	field4); 
extern unsigned int BuildOpcode6(
    unsigned int	width0, unsigned int	field0, 
    unsigned int	width1, unsigned int	field1, 
    unsigned int	width2, unsigned int	field2, 
    unsigned int	width3, unsigned int	field3, 
    unsigned int	width4, unsigned int	field4, 
    unsigned int	width5, unsigned int	field5); 
extern unsigned int BuildOpcode7(
    unsigned int	width0, unsigned int	field0, 
    unsigned int	width1, unsigned int	field1, 
    unsigned int	width2, unsigned int	field2, 
    unsigned int	width3, unsigned int	field3, 
    unsigned int	width4, unsigned int	field4, 
    unsigned int	width5, unsigned int	field5, 
    unsigned int	width6, unsigned int	field6); 
extern unsigned int BuildOpcode8(
    unsigned int	width0, unsigned int	field0, 
    unsigned int	width1, unsigned int	field1, 
    unsigned int	width2, unsigned int	field2, 
    unsigned int	width3, unsigned int	field3, 
    unsigned int	width4, unsigned int	field4, 
    unsigned int	width5, unsigned int	field5, 
    unsigned int	width6, unsigned int	field6, 
    unsigned int	width7, unsigned int	field7);
extern unsigned int BuildOpcode9(
    unsigned int	width0, unsigned int	field0, 
    unsigned int	width1, unsigned int	field1, 
    unsigned int	width2, unsigned int	field2, 
    unsigned int	width3, unsigned int	field3, 
    unsigned int	width4, unsigned int	field4, 
    unsigned int	width5, unsigned int	field5, 
    unsigned int	width6, unsigned int	field6, 
    unsigned int	width7, unsigned int	field7, 
    unsigned int	width8, unsigned int	field8); 
extern unsigned int BuildOpcode10(
    unsigned int	width0, unsigned int	field0, 
    unsigned int	width1, unsigned int	field1, 
    unsigned int	width2, unsigned int	field2, 
    unsigned int	width3, unsigned int	field3, 
    unsigned int	width4, unsigned int	field4, 
    unsigned int	width5, unsigned int	field5, 
    unsigned int	width6, unsigned int	field6, 
    unsigned int	width7, unsigned int	field7, 
    unsigned int	width8, unsigned int	field8, 
    unsigned int	width9, unsigned int	field9); 
#ifdef __cplusplus
}
#endif 
#endif /* EXTERNS_H */