language-mixal-0.1: Parser, pretty-printer, and AST types for the MIXAL assembly language

Safe HaskellSafe-Inferred

Language.MIXAL.OpCode

Synopsis

Documentation

opCode :: OpCode -> (Integer, Maybe Integer)Source

Return the numeric version of an opcode. If the opcode corresponds to a specific field value, return that too; otherwise Nothing. In the Nothing case, the F value should be supplied by the user and assembled into (or extracted from) the binary instruction. In the Just case a specific F-value is required to distinguish the opcode based on the instruction involved.