

Two ideas for I/O in DCPU-16 - breckinloggins

There was a comment about possibly adding a fake "putchar" opcode until Notch adds I/O.  This is OK, but it instantly creates machine code incompatibility with the "real" machine and breaks the spec.  Here are two possible alternatives:<p>- Due to the programmability of the PC register, there are plenty of NOP instructions.  Have your VM treat one or two of these forms differently.  For example, you might have one that is interpreted as doing a putchar of the contents in register A.<p>- Reserve some bytes in memory and use memory-mapped I/O.<p>Sure, both of these would still have to be changed later, but they would both ensure that your code still RAN on the actual DCPU-16 code in the game.<p>Any other ideas?
======
clavalle
That's a good idea.

You should post it over at <http://www.reddit.com/r/dcpu16>

