[translation notes, may be illogical because these are personal notes, not meant to present perfectly valid data. Keymaker, 2026] an instruction may not directly return to itself; as the internal code is created, if MM instruction refers to itself, it will go to temporary 'move' instruction that simply transfers the control back to the instruction afterwards. the reason this is needed is related to the finite amount of data available per cycle. 1 inc A 1 -> 1 inc A 1+ 1+ move 1 1 dec A 1 2 -> 1 dec A 1+ 2 1+ move 1 1 dec A 2 1 -> 1 dec A 2 1+ 1+ move 1 1 dec A 1 1 -> 1 dec A 1+ 1+ 1+ move 1 multiplying constant: regA regB regC n1 n2 n3 n4 i1 i2 i3 i4 init+n1+i2+i3 ;; init (2) is removed. it sets up the program so that it bypasses the section below where two next tokens are required for the instruction ;; to be selected. there are no two instances yet as the multiplication has happened only once. n1 is removed and all other nx tokens are left, ;; and all ix tokens except the i1 type are removed. this simulates the situation where the lines below have chosen what is to be executed. ;; this divide only happens once per execution, when init (2) still exists. n1+n1+i2+i3 ;; remove next token for instruction 1, also remove the tokens for other instructions, leave only tokens for i1. ;; n1 needs to exist twice here, as it does if the next instruction to execute is 1. n2+n2+i1+i3 ;; remove token for next inst 2, also remove the instruction tokens except for i2. ; 1 inc A 2 [i1]+[r_B]+[r_C]+[n3]+[n4] ; registers all but current one (A) are kept intact by removing one instance from them (added by multiplication). ; leave only n2 to signify next instruction is 2. notice n1 has already been removed before. ; 2 dec B 3 4 [i2]+[r_A]+[r_C]+[r_B]+[r_B]+[n1]+[n4] ; if register is non-zero, remove one instance and also the latest addition by multiplication. ; also remove one instance of all other registers, since they are kept intact (remove the effect of multiplication). ; as this is suc case, remove other nx to leave only n3. notice that n2 has already been removed when selecting this instruction. [i2]+[r_A]+[r_C]+[r_B]+[n1]+[n3] ; if register is zero (thus having just the latest multiplication's effect), in which case the above did not happen, then here remove ; the instance of r_B the multiplication added. also remove one instance of all other registers, to keep them intact (to negate the ; multiplication). then, as this is fai case, remove all nx to leave n4. n2 was removed when the instruction was selected. ; 3 move 4 [i3]+[r_A]+[r_B]+[r_C]+[n1]+[n2] ; all registers are kept intact, so each has the instance added by multiplication removed here. ; n3 is already removed before to select this instruction, n4 is left unremoved to set move next there. ; at this point there should be one instance of 'nx' to determine which instruction will be executed next. ; at the beginning of new cycle multiplication will add one instance of every possible nx, and the next instruction will be determined by the sole case ; where there are two next tokens of the same type, such as n4 and n4.