Javascript DCPU-16 Simulator:

How does it work?

  • Enter a program in the textbox (I used this assembler: http://alex.nisnevich.com/dcpu16-assembler/)
  • Click: "load program"
  • Click: "step" for a single step.
  • Notch's example Display test Keyboard and display test

    Code:


    Registers:

    A B C X Y Z I J
    0 0 0 0 0 0 0 0
    PC SP O
    0 0 0

    executing lines:

    Keyboard buffer

    Screen

    Intro

    This is a javascript simulator of the DCPU-16 CPU as released by Notch in early April 2012. The full spec can be found here.
    I tried to fully test the CPU. You can run the tests here
    The keyboard buffer spec is taken from this example code released by Notch.
    The screen spec is taken from this example released by Notch.
    Thanks to eveilpie which code from the javascript disassembler I use in some places.

    Known issues:

    Find this code on github here: https://github.com/wasigh/Javascript-DCPU-16-simulator