On 2021-07-01 01:49, Jon Brase wrote:
> What I'm really trying to do is get a feel for the relative sizes and such of various parts of the opcode space, which is difficult to with a listing that devotes the same amount of space (one line each) to e.g, ADD and MUL.
Well, first of all, the opcode space is pretty full on the PDP-11. The
basic instruction set still had a fair amount of space left, but then
came additions like EIS, FPP and CIS.
I would say the PDP-11 programming reference card is still the best
place to find the information, although it does not include CIS.
You have the numerical opcode list on the second page of the card, which
covers the full range. However, it will not give you a good visual feel
of the space left, as it isn't trying to do any kind of proportional
view of it all.
But you don't really want a 256x256 table, since it would be huge, and
not very interesting on a PDP-11. Since so much of the space is used up
by all the different variants of addressing for sources and
destinations, it would become very boring. Also, since the opcodes makes
very little sense to split along the two bytes, such a table would be
more confusing than the opcodes themselves.
Take MOV(B) for example.
There are actually 8192 different variants of it. So that one alone
takes up 1/8 of the whole opcode space. There are in fact 6 instructions
that take two arguments, and all in all, that covers 6/8ths of the
opcode space (MOV, CMP, BIT, BIS, BIC, ADD/SUB).
Basically, the opcodes on the PDP-11 were designed with more of a system
to it than on the x86, and therefore it makes less sense to just make a
matrix with all possible opcodes.
The VAX extended on that idea even further, where the opcodes and
arguments were fully split apart. So there is only one MOVL instruction
on the VAX, and it has only one opcode, and every instruction (almost)
takes just one byte. But then you have a variable number of bytes
following which builds the arguments. And of course, there is also a
MOVW and MOVB (and also MOVQ, can't remember if there is also a MOVO).