- word :: Instrs -> State -> State
- step :: State -> State
- traceProgram :: State -> [State]
- stepProgram :: State -> [State]
- eval :: State -> State
- runNativeProgram :: State -> NativeProgram -> State
- countTime :: [State] -> Double
- throttle :: Int -> [State] -> Either [State] [State]
- endWord :: Opcode -> Bool
- execute :: Opcode -> State -> State
- jump :: Opcode -> F18Word -> State -> State
Runs a single word's worth of instructions starting from the given state.
Executes a single instruction in the given state, incrementing the program counter.
Returns a trace of the program's execution. The trace is a list of the state of the chip after each step.
Runs the program unil it hits a terminal state, returning only the resulting state.
Executes the specified program on the given state until it hits a terminal word--a word made up of four nops or all 0s.
Checks that the program trace terminated in at most n steps, returning Nothing otherwise.