All of these are features inherited from the 8080/8085/Z80.
Here are the corresponding opcode tables in octal:
https://dercuano.github.io/notes/8080-opcode-map.html
http://www.righto.com/2013/02/8085-instruction-set-octal-tab...
All of these are features inherited from the 8080/8085/Z80.
Here are the corresponding opcode tables in octal:
https://dercuano.github.io/notes/8080-opcode-map.html
http://www.righto.com/2013/02/8085-instruction-set-octal-tab...
Astonishing to think that we can see traces of the 8008 still today and that it wasn’t actually an Intel designed ISA (came from CTC / Datapoint).
The Datapoint 2200 documentation gave the opcodes in octal, so they were clearly thinking in octal. The 8008 documentation, however, didn't use octal or hexadecimal. The opcodes were given in binary, but grouped in 3 bits, octal style, e.g. 10 111 010. (They didn't specify opcodes in octal or hex!) I think the 8008 was right at the time where octal was on the way out and hexadecimal was taking over. (The 8008 assembler manual uses both octal and hexadecimal, but hexadecimal primarily.)
The Intel 8080 still specified the instruction set in binary, not octal or hexadecimal. The 8085 had opcodes in binary in a 1983 manual, but now split with a line into 4-bit chunks (i.e. hexadecimal-style). And then an appendix gave the opcodes in hexadecimal.
(Just some random history.)
Also, after using the Xerox Alto, which uses 16-bit words, I realized that octal is terrible. The problem is that if you're looking at two bytes in a word, the values make no sense in octal. For example, the characters "AB" form the hex word 0x4142, while "BA" forms 0x4241; the two letters are clear. But in octal, "AB" is 0o40502 and "BA" is 0o41101; the two letters turn into unrecognizable numbers.
The Intel 4004 used four bits to manipulate a single BCD digit. The 8086 had BCD instructions. There were many reasons for preferring BCD when designing computer architectures, though my favourite which was already becoming less relevant at 8086-time was that it meant a full column on a punchcard wouldn’t be “all holes” and reduced the likelihood of the cards tearing.
Extracting the alu function from bits 4-6 means that you can group together the implementation of add, or, adc, sbb, and, sub, xor, to and from memory, for bytes and words into one function.
The code's not as fast as the "one code block per instruction" approach of something like DosBOX but at least it doesn't cause me dread to look at.
[1] http://bitsavers.org/pdf/datapoint/2200/
[2] http://bitsavers.org/pdf/datapoint/2200/2200_Programmers_Man...
My notes on the 8080 are at https://dercuano.github.io/notes/8080-opcode-map.html.
Basic concepts like the 8 GPRs are rooted in it's octal decoding roots. MOD/RM is still octal decoded, SIB is still octal decoded, etc. These fields aren't just three bits long, but also aligned to a three bit boundary within the byte being decoded.
> and as importantly, a Datapoint 2200 is not an x86. The x86 is not an octal machine.
The x86 traces its lineage to that and the points still hit. For instance, even when they added more registers in x86_64, it's still a three bit bank with simply a new prefix to select whether it's referring to the top or bottom 8 register bank out of now 16 total registers. There's some awkward places where you can't address different 8 register banks in the way you'd want to from an encoding perspective because of these continued restrictions going back to the Datapoint 2200.
Having written the HDL for a simple x86_64 decoder, it is very much still an octal machine.
Once again, it's not just that they're just groups of three bits, but the fields are also three bit aligned.
> When 4 bits are used, nobody calls these 'hex machines'.
I mean, most systems aren't aligned nearly as well on clear repeated boundaries the same way. The only other one that I can think of (the SH series) I for one have absolutely called a hex machine because you can read most of the machine instructions directly from the 4-bit nybbles. A four bit opcode and three address RISC instructions out of 16 GPRs means you can read the hex just about as easily as ASM.
The fact that most other machines correctly take a more bit level almost huffman coding route doesn't make x86 any more less octal derived at it's base.
Datapoint did it consistently. And in a way that aligns with octal encoding. And then used octal in their documentation.
In turn, their instruction set basically became the 8008's, which influenced the 8080 and then 8086/8088. In turn, we still have this structure in x86 today: the instructions are prettily readable in octal.