3 ms·
I'm not sure if it's well-specified. What does this do? JSR POP Does the argument POP (or [SP++]) get evaluated before, or after, the "[--SP] <- PC" impli
by uvdiv 15y ago
I'm not sure if it's well-specified. What does this do?
JSR POP
Does the argument POP (or [SP++]) get evaluated before, or after, the "[--SP] <- PC" implicit in JSR?
- Anderkent 15y agoInteresting question. Spec says 'a is always handled by the processor before b, and is the lower six bits.' For Non-basic opcodes, 'a' is actually the opcode, and b is the argument. This would imply JSR is evaluated before POP. What we want JSR POP to mean, of course, is 'jump to the last item on the stack, then push PC+1 to stack'. So I would guess that's how it actually works, and the spec needs a revision.
- uvdiv 15y agoI think that line is specific to the basic instructions only (if it weren't, "...and is the lower six bits" would be false). "For Non-basic opcodes, 'a' is actually the opcode" Actually it's the single argument -- 'o' is the opcode.