structure
MindFormal.A595Paper.InstructionFields
(data : ℤ → Atom)
(pos : ℕ → ℤ)
(R L : ℕ)
(fieldPos : Fin 3 → ℤ)
(address : Fin 3 → ℕ)
:
Three unary fields in one instruction record, in operand/operand/ destination order. All hypotheses describe the literal paper encoding.
- field (j : Fin 3) : UnaryField data (fieldPos j) (address j)
Instances For
theorem
MindFormal.A595Paper.execute_instruction
{data : ℤ → Atom}
{pos : ℕ → ℤ}
{R L : ℕ}
{fieldPos : Fin 3 → ℤ}
{address : Fin 3 → ℕ}
(bank : RegisterChain data pos R)
(fields : InstructionFields data pos R L fieldPos address)
(current : Option ℤ)
(hR : R ≤ L)
(hpos : pos 0 = 4)
(hbank : ∀ (z : ℤ), data z = Atom.bank ↔ z = 3)
(left right : Bool)
(hleft : data (pos (address 0) + ↑(address 0) + 1) = Atom.bit left)
(hright : data (pos (address 1) + ↑(address 1) + 1) = Atom.bit right)
:
∃ n ≤ 60 * (L + 1) ^ 3,
MachineRun norTable (norConfig data current none none (fieldPos 0) NorState.activateFirst) n
(norConfig (Function.update data (pos (address 2) + ↑(address 2) + 1) (Atom.bit !(left || right))) current none none
(fieldPos 2 - 1) NorState.clearInstruction)
A complete NOR instruction performs its two actual unary searches, retains the operand bits in finite control, performs the destination search and literal write, and returns to instruction-marker maintenance.