mappum / DCPU-16

:floppy_disk: A javascript emulator for DCPU-16 (the computer system in Mojang's new game, 0x10c). Works in browsers and Node.
http://mappum.github.com/DCPU-16/
94 stars 18 forks source link

Wrap pc around from 0xFFFF to 0x0000 on step and other pc++ operations #38

Closed andrewsg closed 12 years ago

andrewsg commented 12 years ago

This will make the following instructions result in an infinite loop incrementing register A:

ADD A, 1 SET PC, 0xFFFF

Currently PC appears to wrap around after 0xFFFF, but actually increments beyond memory range and executes no operations.

There's also a commit to convert the remaining tab characters to spaces.

andrewsg commented 12 years ago

Withdrawing pull request because recent commits cannot be merged with the whitespace fix; the whitespace fix and any other issues will have to be addressed separately.