OpenCores
URL https://opencores.org/ocsvn/tms1000/tms1000/trunk

Subversion Repositories tms1000

[/] [tms1000/] [trunk/] [assembler/] [casm.h] - Rev 2

Compare with Previous | Blame | View Log

/*
casm.h
 
CASM is an assembler for the tms1000 processor.
*/
 
extern int pass;
extern int lineno;
extern int errors;
 
extern int group;	/* current rom group */
extern int rom;		/* current rom */
extern int pc;		/* current pc */
 
extern int dsr;		/* delayed select rom */
extern int dsg;		/* delayed select group */
 
extern char flag_char;  /* used to mark jumps across rom banks */
 
extern int symtab_flag;
 
 
#define OTHER_INST 0
#define ARITH_INST 1
#define TEST_INST  2
 
extern int last_instruction_type;
 
 
#define MAX_LINE 256
extern char linebuf [MAX_LINE];
extern char *lineptr;
 
#define MAXGROUP 2
#define MAXROM 8
extern t_symtab symtab /*[MAXGROUP] [MAXROM]*/;  /* separate symbol tables for each ROM */
 
void do_label (char *s);
 
 
void emit       (int op);  /* use for instructions that never set carry */
void emit_arith (int op);  /* use for arithmetic instructions that may set carry */
void emit_test  (int op);  /* use for test instructions that
 
 
void etarget (int targrom, int targpc);  /* for branch target info */
 
/*
 * Check that val is in the range [min, max].  If so, return val.
 * If not, issue an error and return min.
 */
int range (int val, int min, int max);
 
char *newstr (char *orig);
void format_listing (void);
 
/*
 * print to both listing error buffer and standard error
 *
 * Use this for general messages.  Don't use this for warnings or errors
 * generated by a particular line of the source file.  Use error() or
 * warning() for that.
 */
int err_printf (char *format, ...);
 
/* generate error or warning messages and increment appropriate counter */
int error   (char *format, ...);
int warning (char *format, ...);
 
/* generate fatal error message to stderr, doesn't return */
void fatal  (char *format, ...);
 
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.