Re:DCPU-16 implementation in f#
by dkersten on Friday April 06, 2012 @04:04PM
(#3808667)
Yes, I think so because branches skip full instructions and instructions may be between 1 and 3 bytes but exactly how many is unknown until the skipped instruction is decoded.
[ Parent
| on HN ]
The PC needs to be incremented past the "next words". But it seems odd that a un-executed push instruction would still modify SP.
This is true - I actually miss-read your comment and thought you said instruction pointer instead of stack pointer... It seems to be a bug in the implementation (from my reading of the spec, this should not happen).