ref: 0872214890c6e7ca117c2393b62931812824338f
parent: a7be9c155a2bd5fae1b795c69695e3448d1778e9
author: mkf <mkf@d510>
date: Fri May 5 13:52:22 EDT 2023
add 5551.h
--- /dev/null
+++ b/5551.h
@@ -1,0 +1,41 @@
+#define MMAX ( 1 << 8 )
+
+/* ops */
+enum
+{
+ /* machine related */
+ DIE, /* drop dead */
+ OUT,
+
+ /* logical */
+ NOT,
+ AND,
+ NOR,
+ XOR,
+
+ /* arithmatic */
+ SUB,
+ ADD,
+
+ /* 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 */
+};