Skip to content

An implementation of Notch's dcpu-16 CPU written in Haskell.

License

Notifications You must be signed in to change notification settings

Dr-Nekoma/e1-268H

Repository files navigation

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

About

An implementation of Notch's dcpu-16 CPU written in Haskell.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published