helpa-0.4.5.3: HELPA - Heavenly Esoteric Little Portable Assembler to esoteric languages

Safe Haskell | None
Language | Haskell2010

HelVM.HelPA.Assemblers.Frontend.EIR.DSL

# Documentation

type Config = () #

type Environment = () #

type Result a = RWS Config (DList a) Environment () #

newtype Register #

Constructors

R Natural |

newtype Immediate #

Constructors

I Integer |

type ImmediateORRegister = Either Immediate Register #

mov :: DSL a => ImmediateORRegister -> Register -> Result a #

add :: DSL a => ImmediateORRegister -> Register -> Result a #

sub :: DSL a => ImmediateORRegister -> Register -> Result a #

load :: DSL a => ImmediateORRegister -> Register -> Result a #

store :: DSL a => Register -> ImmediateORRegister -> Result a #

putc :: DSL a => ImmediateORRegister -> Result a #

class DSL a where #

Methods

movi :: Immediate -> Register -> Result a #

movr :: Register -> Register -> Result a #

addi :: Immediate -> Register -> Result a #

addr :: Register -> Register -> Result a #

subi :: Immediate -> Register -> Result a #

subr :: Register -> Register -> Result a #

loadi :: Immediate -> Register -> Result a #

loadr :: Register -> Register -> Result a #

storei :: Register -> Immediate -> Result a #

storer :: Register -> Register -> Result a #

putci :: Immediate -> Result a #

putcr :: Register -> Result a #

getc :: Register -> Result a #

jeq :: ImmediateORRegister -> ImmediateORRegister -> Register -> Result a #

jne :: ImmediateORRegister -> ImmediateORRegister -> Register -> Result a #

jlt :: ImmediateORRegister -> ImmediateORRegister -> Register -> Result a #

jgt :: ImmediateORRegister -> ImmediateORRegister -> Register -> Result a #

jle :: ImmediateORRegister -> ImmediateORRegister -> Register -> Result a #

jge :: ImmediateORRegister -> ImmediateORRegister -> Register -> Result a #

jmp :: ImmediateORRegister -> Register -> Result a #

eq :: ImmediateORRegister -> Register -> Result a #

ne :: ImmediateORRegister -> Register -> Result a #

lt :: ImmediateORRegister -> Register -> Result a #

gt :: ImmediateORRegister -> Register -> Result a #

le :: ImmediateORRegister -> Register -> Result a #

ge :: ImmediateORRegister -> Register -> Result a #

dump :: Result a #