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

Subversion Repositories tms1000

[/] [tms1000/] [trunk/] [assembler/] [casm.h] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 nand_gates
/*
2
casm.h
3
 
4
CASM is an assembler for the tms1000 processor.
5
*/
6
 
7
extern int pass;
8
extern int lineno;
9
extern int errors;
10
 
11
extern int group;       /* current rom group */
12
extern int rom;         /* current rom */
13
extern int pc;          /* current pc */
14
 
15
extern int dsr;         /* delayed select rom */
16
extern int dsg;         /* delayed select group */
17
 
18
extern char flag_char;  /* used to mark jumps across rom banks */
19
 
20
extern int symtab_flag;
21
 
22
 
23
#define OTHER_INST 0
24
#define ARITH_INST 1
25
#define TEST_INST  2
26
 
27
extern int last_instruction_type;
28
 
29
 
30
#define MAX_LINE 256
31
extern char linebuf [MAX_LINE];
32
extern char *lineptr;
33
 
34
#define MAXGROUP 2
35
#define MAXROM 8
36
extern t_symtab symtab /*[MAXGROUP] [MAXROM]*/;  /* separate symbol tables for each ROM */
37
 
38
void do_label (char *s);
39
 
40
 
41
void emit       (int op);  /* use for instructions that never set carry */
42
void emit_arith (int op);  /* use for arithmetic instructions that may set carry */
43
void emit_test  (int op);  /* use for test instructions that
44
 
45
 
46
void etarget (int targrom, int targpc);  /* for branch target info */
47
 
48
/*
49
 * Check that val is in the range [min, max].  If so, return val.
50
 * If not, issue an error and return min.
51
 */
52
int range (int val, int min, int max);
53
 
54
char *newstr (char *orig);
55
void format_listing (void);
56
 
57
/*
58
 * print to both listing error buffer and standard error
59
 *
60
 * Use this for general messages.  Don't use this for warnings or errors
61
 * generated by a particular line of the source file.  Use error() or
62
 * warning() for that.
63
 */
64
int err_printf (char *format, ...);
65
 
66
/* generate error or warning messages and increment appropriate counter */
67
int error   (char *format, ...);
68
int warning (char *format, ...);
69
 
70
/* generate fatal error message to stderr, doesn't return */
71
void fatal  (char *format, ...);
72
 

powered by: WebSVN 2.1.0

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