dcpu16-0.1.0.2: DCPU-16 Emulator & Assembler

Safe HaskellNone
LanguageHaskell2010

Dcpu16.Cpu

Documentation

data Reg Source #

Constructors

RegA 
RegB 
RegC 
RegX 
RegY 
RegZ 
RegI 
RegJ 
RegPC 
RegSP 
RegEx 

Instances

Bounded Reg Source # 

Methods

minBound :: Reg #

maxBound :: Reg #

Enum Reg Source # 

Methods

succ :: Reg -> Reg #

pred :: Reg -> Reg #

toEnum :: Int -> Reg #

fromEnum :: Reg -> Int #

enumFrom :: Reg -> [Reg] #

enumFromThen :: Reg -> Reg -> [Reg] #

enumFromTo :: Reg -> Reg -> [Reg] #

enumFromThenTo :: Reg -> Reg -> Reg -> [Reg] #

Show Reg Source # 

Methods

showsPrec :: Int -> Reg -> ShowS #

show :: Reg -> String #

showList :: [Reg] -> ShowS #

data CpuState Source #

Constructors

CpuState 

data Instr Source #

Constructors

Set 
Add 
Sub 
Mul 
Div 
Mod 
Shl 
Shr 
And 
Bor 
Xor 
Ife 
Ifn 
Ifg 
Ifb 
Jsr 
Dat 

evalArithInstr :: CpuState -> Value -> Value -> (Int -> Int -> (Int, Int)) -> IO () Source #