💾 Archived View for uscoffings.net › retro-computing › systems › TI994a › assemblers › tiasm › src ›… captured on 2022-06-04 at 01:14:00.

View Raw

More Information

-=-=-=-=-=-=-

#include "TIasm.h"
#include "opcodes.h"
#include "y.tab.h"
#include <stdio.h>

/* Actual opcodes for the machine */

struct ops Optab[] = {
	"LI",	LI,	8,
	"AI",	AI,	8,
	"ANDI",	ANDI,	8,
	"ORI",	ORI,	8,
	"CI",	CI,	8,
	"STWP",	STWP,	11,
	"STST",	STST,	11,
	"LWPI",	LWPI,	10,
	"LIMI",	LIMI,	10,
	"IDLE",	IDLE,	7,
	"RSET",	RSET,	7,
	"RTWP",	RTWP,	7,
	"CKON",	CKON,	7,
	"CKOF",	CKOF,	7,
	"LREX",	LREX,	7,
	"BLWP",	BLWP,	6,
	"B",	B,	6,
	"X",	X,	6,
	"CLR",	CLR,	6,
	"NEG",	NEG,	6,
	"INV",	INV,	6,
	"INC",	INC,	6,
	"INCT",	INCT,	6,
	"DEC",	DEC,	6,
	"DECT",	DECT,	6,
	"BL",	BL,	6,
	"SWPB",	SWPB,	6,
	"SETO",	SETO,	6,
	"ABS",	ABS,	6,
	"SRA",	SRA,	5,
	"SRL",	SRL,	5,
	"SLA",	SLA,	5,
	"SRC",	SRC,	5,
	"JMP",	JMP,	2,
	"JLT",	JLT,	2,
	"JLE",	JLE,	2,
	"JEQ",	JEQ,	2,
	"JHE",	JHE,	2,
	"JGT",	JGT,	2,
	"JNE",	JNE,	2,
	"JNC",	JNC,	2,
	"JOC",	JOC,	2,
	"JNO",	JNO,	2,
	"JL",	JL,	2,
	"JH",	JH,	2,
	"JOP",	JOP,	2,
	"SBO",	SBO,	2,
	"SBZ",	SBZ,	2,
	"TB",	TB,	2,
	"COC",	COC,	3,
	"CZC",	CZC,	3,
	"XOR",	XOR,	3,
	"LDCR",	LDCR,	4,
	"STCR",	STCR,	4,
	"MPY",	MPY,	3,
	"DIV",	DIV,	3,
	"SZC",	SZC,	1,
	"SZCB",	SZCB,	1,
	"S",	S,	1,
	"SB",	SB,	1,
	"C",	C,	1,
	"CB",	CB,	1,
	"A",	A,	1,
	"AB",	AB,	1,
	"MOV",	MOV,	1,
	"MOVB",	MOVB,	1,
	"SOC",	SOC,	1,
	"SOCB",	SOCB,	1,
	"XOP",	XOP,	9,
	NULL,	0,	0,
};

/* Directives */
struct ops Dirtab[] = {
	".str",		STRINGDIR,	STRINGDIR,
	".extern",	EXTNLDIR,	EXTNLDIR,
	".word",	WORDDIR,	WORDDIR,
	".data",	DATADIR,	DATADIR,
	NULL,		0,		0,
};