LIVE EDIT ENVIRONMENT FOR MOJANG'S DCPU-16 MACHINE
Code by @Donzanoid, github repository here. Click for HELP...
LIVE EDIT ENVIRONMENT FOR MOJANG'S DCPU-16 MACHINE
Code by @Donzanoid, github repository here. Click for HELP...


FEATURES:

  • Assembler runs each time you type, compiling to DCPU-16 bytecode.
  • Code is syntax-highlighted and errors display in-line as you type.
  • Machine is emulated and re-runs code changes on each successful compile.
  • Generate links to your code by clicking "Code Permalink" button.
  • Step debugger with programmatic or editor-toggled breakpoints.

  • PROGRAMMING DETAILS:

  • Simulated 62.5kHz machine with each instruction taking 1 cycle (not per spec, yet).
  • Video memory located at 0x8000 with 32x12 characters, each character 8x4 in size.
  • Character set located at 0x9000: 2 words per character, each column taking 8-bits.


  • USING THE DEBUGGER:

    While in the edit window, you can add a single "BRK" instruction anywhere in code to get the debugger to stop at that point. Press F10 to step into the next instruction and press F5 to continue execution. Alternatively, you can press F9 to toggle breakpoints on the line you're currently editing.
    Register View
    A
    B
    C
    X
    Y
    Z
    I
    J
    PC
    SP
    O