From: Rutger van Bergen Date: Wed, 12 Jan 2022 15:33:52 +0000 (+0100) Subject: Update INSTRUCTIONS on addressing extensions X-Git-Tag: v1.1~7 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=1384e6ebaebab25193bbd2a93ba02bb3ddc3c498;p=minsk.git Update INSTRUCTIONS on addressing extensions --- diff --git a/INSTRUCTIONS b/INSTRUCTIONS index e1a6c54..b1a4e86 100644 --- a/INSTRUCTIONS +++ b/INSTRUCTIONS @@ -1,11 +1,13 @@ -MINSK-2 INSTRUCTION SET -~~~~~~~~~~~~~~~~~~~~~~~ +MINSK-2/MINSK-22 INSTRUCTION SET +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Data format: - The memory of the machine consists of 4096 37-bit words (the topmost bit + The memory of the Minsk-2 machine consists of 4096 37-bit words (the topmost bit is always used as a sign). The 0th memory cell is hard-wired to 0, writes have no effect. + The Minsk-22 machine has 2 banks of 4096 37-bit words each. + Fixed-point numbers: sign and 36 significant bits Binary floating-point numbers (from top to bottom bit): @@ -28,7 +30,7 @@ Data format: Registers: -Minsk-2 has 3 registers: +Minsk-2/Minsk-22 has 3 registers: accumulator usually keeps the result of the previous arithmetic operation R1 usually copies one of the operand of the instruction @@ -53,7 +55,26 @@ Indexing mode bits: | | | +---- index register: when non-zero, lower 12 bits of the memory | cell #iiii are added to yyyy, next 12 bits are added to xxxx - +----- address extension (supported only on Minsk-22, not in our Minsk-2) + +----- address extension (supported only on Minsk-22) + + +Address extension: + + In Minsk-22 mode, the address extension bits can be used to access the second + bank of memory in the machine. Each of the bits selects the memory bank + (either 0 or 1) that one of the operands operate on: + + The first (high) bit selects the memory bank for operand1 (x) + The second (low) bit selects the memory bank for operand2 (y) + + The instruction pointer always operates on bank 0. This extends to situations + where a (jump) instruction sets the instruction pointer to either x or y; the + address extension bits are effectively ignored in those cases. + + Similarly, the indexing word is always read from bank 0. + + In Minsk-2 mode, setting the address extension bits to anything but 0 is an + error in all cases. For arithmetic instructions, the lower 2 bits of encode addressing mode: