processor-creative-kit-0.1.0.1: a creation kit for instruction sets and cpu simulators and development tools

Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.Pck.Cpu.Register

Contents

Synopsis

Note

This is an implementation dependent module. It's better to use functions in Language.Pck.Cpu.State.

Basic types

data Flag Source

Constructors

FLZ

zero flag

FLC

carry flag

access to general purpose registers

initGReg :: GRegArray Source

initialize the general purpose registers array

getGReg :: GRegArray -> GReg -> Int Source

get a value of the general purpose register

getGReg2 :: GRegArray -> GReg -> GReg -> (Int, Int) Source

get values of the general purpose register pair

getGRegs :: GRegArray -> [Int] Source

get all values of the general purpose registers

modifyGReg :: GRegArray -> GReg -> Int -> GRegArray Source

modify general purpose registers

access to flag registers

initFlag :: FlagArray Source

initialize the flag registers array

getFlag :: FlagArray -> Flag -> Bool Source

get a value of the flag register value

getFlags :: FlagArray -> [Bool] Source

get all values of the flag registers

modifyFlag :: FlagArray -> Flag -> Bool -> FlagArray Source

modify flag registers

judgeFCond :: FlagArray -> FCond -> Bool Source

judge a flag condition