Skip to content

Latest commit

 

History

History
39 lines (27 loc) · 919 Bytes

README.md

File metadata and controls

39 lines (27 loc) · 919 Bytes

e1-268H

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

Status

  • Basic infrastructure of the emulator
  • Command line interface
  • Test suite
  • Assembler
  • Debugger interface (tui, breakpoints, inspect/change memory and registers, disassemble, etc)
  • Peripherals (video, keyboard, serial interface, etc)
  • Cycle accurate simulation?

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