#include "common"

struct symbol *x(t, v, n)
	int t, v;
	char *n;
	{return (add(n, DEFF, t, v, 2));
	}

init()	{
	x(OP, RTS, "rts");
	x(OP, JSR, "jsr");
	x(OP, SYS, "sys");
	x(OP, SIZE, "sizeof")->flags =| CRSF;
	x(OP, CAT, "^^^")->flags =| CRSF;
	x(OP, REGOP, "reg");
	x(OP, MEMOP, "mem");
	x(OP, BYTE, "byte");
	x(OP, WORD, "word");
	x(DECL, GLOBAL, "extern");
	x(DECL, LOCAL, "local");
	x(KOND, FALSE, "false");
	x(KOND, TRUE, "true");
	x(KOND, N, "minus");
	x(KOND, Z, "zero");
	x(KOND, V, "oflow");
	x(KOND, C, "carry");
	x(OP, DIVIDE, "/");
	x(OP, TIMES, "*");
	x(OP, TESTAND, "?&");
	x(OP, TEST, "?");
	x(OP, GETSMI, "=-");
	x(OP, GETSNOT, "=!");
	x(OP, DSHIFT, "***");
	x(OP, SROTATE, "<*>");
	x(OP, SHIFT, "**");
	x(OP, ROTATE, "<>");
	x(OP, XOR, "!!");
	x(OP, ANDNOT, "&!");
	x(ROP, LOS, "<<=");
	x(ROP, LO, "<<");
	x(ROP, HIS, ">>=");
	x(ROP, HI, ">>");
	x(ROP, LE, "<=");
	x(ROP, LT, "<");
	x(ROP, EQ, "==");
	x(ROP, NE, "!=");
	x(ROP, GT, ">");
	x(ROP, GE, ">=");
	x(OP, AND, "&");
	x(OP, OR, "^");
	x(ANDOP, AND, "&&");
	x(OROP, OR, "^^");
	x(CON, FALSE, ".temp");
	x(GOTO, TRUE, "goto");
	x(IF, 0, "if");
	x(ELSE, 0, "else");
	x(WHILE, 0, "while");
	x(DO, 0, "do");
	x(BREAK, TRUE, "break");
	x(BREAK, TRUE, "continue")->flags =| BYTF;	/* sigh */
	x(POP, 0, "++");
	x(OP, PUSH, "--");
	x(OP, NOT, "!");
	x(OP, MINUS, "-");
	x(OP, PLUS, "+");
	x(OP, GOESTO, "->");
	x(OP, GETS, "=");
	x(REG, 7, "pc");
	x(REG, 6, "sp");
	x(REG, 5, "r5");
	x(REG, 4, "r4");
	x(REG, 3, "r3");
	x(REG, 2, "r2");
	x(REG, 1, "r1");
	x(REG, 0, "r0");
	sptop = dot = x(MEM, 0, ".");
	symtab = sptop + 1;
	spused = 0;
	}
