]> mj.ucw.cz Git - minsk.git/blobdiff - INSTRUCTIONS
Minsk: Implemented proper option parsing; daemon mode is optional
[minsk.git] / INSTRUCTIONS
index 62c8d95eb615b6f4fac76e41feecdb0556982491..e1a6c54277c17226a787bdd9b738569960f4cb9e 100644 (file)
@@ -26,6 +26,17 @@ Data format:
                5 bits of exponent (2 decimal digits in BCD, the former one truncated to 1 bit)
 
 
+Registers:
+
+Minsk-2 has 3 registers:
+
+       accumulator     usually keeps the result of the previous arithmetic operation
+       R1              usually copies one of the operand of the instruction
+       R2              contains the value of acc
+
+(most programs use only the accumulator)
+
+
 Generic instruction format:  (by octal digits; some instructions deviate)
 
 sop mm xxxx yyyy
@@ -47,8 +58,8 @@ Indexing mode bits:
 
 For arithmetic instructions, the lower 2 bits of <sop> encode addressing mode:
 
-       0?: arg_a = previous value of accumulator, arg_b = mem[x]
-       1?: arg_a = mem[y], arg_b = mem[x]
+       0?: arg_a = mem[y], arg_b = mem[x]
+       1?: arg_a = previous value of accumulator, arg_b = mem[x]
        ?0: store result to accumulator
        ?1: store result to both accumulator and mem[y]