Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type State ¶
func (*State) GetRegister ¶
GetRegister returns the value of the given register, a, b, c, or d.
func (*State) Reset ¶
func (s *State) Reset()
Reset the assembunny machine back to its starting state, but leaving the Ops alone (if `tgl` instructions have changed them, those changes with NOT be undone).
func (*State) SetRegister ¶
SetRegister sets the value of the given register, a, b, c, or d.
func (*State) Step ¶
Step the assembunny computer one instruction forward. Returns true when finished, whether successfully or due to an error.
func (*State) StepUntilOutput ¶
StepUntilOutput clears the Output, then steps until `Step()` returns `true`, or an output is emitted. If the boolean is true, the machine halted before outputting anything. Otherwise the integer holds the output.