wm: 5551

ref: 67f1be8c8bf3f883569a4a39fd3f15c5b543414d
dir: /5551.h/

View raw version
#define MMAX ( 1 << 8 )

/* ops */
enum
{
	/* machine related */
	DIE, /* drop dead */
	OUT,

	/* logical */
	NOT,
	AND,
	NOR,
	XOR,

	/* arithmatic */
	SUB,
	ADD
	INC,
	DEC,

	/* shift */
	SHR,
	SHL,

	/* memory */
	PUT, /* stores something in reg */
	MOV, /* copy stuff from a reg to memory */
	LDM, /* load from memory into register */
	NTH, /* returns the Nth bit */
};

/* registers */
enum
{
	NUL,
	CARRY,
	OVERFLOW,
	NSIGN, /* not used, yet. */
	PARITY,
	MODE, /* int or bool */
	ON, /* false in case of fatal errors, can be used as a source of 1s */
};