Alan M. Evans wrote:
On Fri, 2007-09-21 at 13:37 -0500, Mike McCarty wrote:
Usually[*], the NOP is the smallest instruction, so it may be used
to nullify other instructions, all of which are made to be multiples
of the size of a NOP. A jump type instruction needs at least
an opcode and an address (even if only relative), so is usually
larger than a NOP. On some machines, some short form of jump
may be just one machine word (a couple of architectures come
to mind, like the Z8000 for instance).
[*] I can't think of a counter example, and it wouldn't make sense
for it to be otherwise.
The counter-example is a processor I used some time ago that included a
short jump instruction that was one word in length. That is, the JMP
instruction included the jump distance. I don't know if recent x86 has
such a thing.
That is not a counter example. A counter example would be a
machine on which the NOP[*] is larger than another instruction.
That wouldn't make sense. I pointed out that I know of two
architectures offhand which have a one-word-long short
relative jump, and even mentioned the Z8000 as an example.
[*] I'm not referring to "effective NOP" like
jump-using-largest-possible-address-mode-to address-of-next-instruction
Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!