Safe Haskell | None |
---|
- data Addr
- data Instruction
- type Program = [Instruction]
- readInstruction :: String -> Either ParseError Instruction
- readProgram :: String -> Either ParseError Program
- toNative :: Program -> NativeProgram
- boundary :: Instruction -> Bool
- labels :: F18Word -> Program -> Program
- fixSlot3 :: Program -> Program
- fromNative :: NativeProgram -> Program
- runProgram :: State -> Program -> State
- load :: Program -> State -> State
Documentation
data Instruction Source
Represents a single instruction as viewed by the synthesizer. This can be an opcode, a numeric literal or a token representing an unused slot.
type Program = [Instruction]Source
A program to be manipulated by the MCMC synthesizer
readInstruction :: String -> Either ParseError InstructionSource
Tries to parse the given string as an instruction, which can either be a number, an opcode or _ representing Unused.
readProgram :: String -> Either ParseError ProgramSource
Reads a program in the synthesizer's format.
boundary :: Instruction -> BoolSource
Does this instruction force a word boundary?
labels :: F18Word -> Program -> ProgramSource
Resolves labels into addresses, assuming the program starts at the given memory location.
fixSlot3 :: Program -> ProgramSource
Insert extra nops to account for instructions that cannot go into the last slot.
fromNative :: NativeProgram -> ProgramSource
Gets a synthesizer program from a native program. Currently does not support jumps.
runProgram :: State -> Program -> StateSource
Runs a given program from the default starting state.