Dr-Nekoma / e1-268H

An implementation of Notch's dcpu-16 CPU written in Haskell.
MIT License
1 stars 0 forks source link

e1-268H

Implementation of Notch's dcpu-16 CPU in Haskell.

Status

Building

stack build

Running

There's no user interface yet, so fire up GHCi...

stack repl

...and load the example:

ghci> import qualified Data.ByteString as B
ghci> import Control.Monad.Trans
ghci> import Control.Monad

ghci> readProgram = lift . B.readFile $ "examples/32-bit-add.hex"

ghci> runIOComputer (readProgram >>= loadProgram >> replicateM_ 5 execInstruction >> dumpMachine >>= lift . putStr) newIOComputer