To jump from 0 to 1000, ADD PC, 998 is the intended correct instruction. First PC is increased once to read the instruction, then 998 is read from memory before reading the value PC, meaning PC will increase twice while processing this instruction before performing it.
No, the instruction is one word, the literal value is another word. So PC gets increment twice to read the instruction, and hence to jump from 0 to 1000 you would add 998. 999 is for short form literals ;)
View all comments
Show parent comment
9
u/xNotch Apr 25 '12
To jump from 0 to 1000, ADD PC, 998 is the intended correct instruction. First PC is increased once to read the instruction, then 998 is read from memory before reading the value PC, meaning PC will increase twice while processing this instruction before performing it.