.cr 8008 To load this cross overlay
The 8008, or 8 MOD 8 as it was called, was Intel's first 8 bit micro processor.
I must admit that I've never seen one myself.
In fact they were rare objects when Intel introduced the 8080 microprocessor a few years later.
So if you do own an 8008 it may be worth something today.
If you look at the 8008's programming model you may find some striking similarities with modern Pentium processors.
In fact the 8008 was designed for a company called Computer Terminal Corporation, who wanted to build a universal terminal around it.
Intel failed to meat the deadline so Computer Terminal Corporation canceled the order and built the Datapoint 2200 terminal using about 100 TTL ICs as CPU.
About 2 years later Intel finally finished the 8008 and put it to market. It came in an 18 pin package, because that was as big as they could make them.
I have found 2 different instruction sets for the 8008.
The first one came from an Intel document dating from November 1972, the second one came from an Intel data book from 1976.
Both instruction sets only differ in the syntax of the assembly instructions, the instructions themselves didn't change.
The 1972 instruction set was very easy because all register operands were embedded in the instruction mnemonic itself. There were only a few instructions that required an operand in this instruction set.
The 1976 instruction set required more typing because all registers were entered as operands to the mnemonics.
I've included both instruction sets in the cross overlay and both sets can be used interchangeably. Which one you prefer is up to you. I prefer the 1972 syntax because it requires less typing. The 8008.asm source in the opcode.tst directory shows both syntax options.
The 8008 can address up to 16k of memory and it runs at a dazzling speed of 500kHz. Most instructions are one byte long. Only those instructions that need an immediate value operand are 2 bytes long and all jump instructions that require a destination address are 3 bytes long.
The programming model in the picture below shows the most important registers of the 8008 processor. I only include a little summary about the features of the 8008's programming model here. It is not my intention to make the original documentation obsolete, so please refer to the original documentation for further details.
The Accumulator is the most important register for 8 bit arithmetic operations.
There is no real Program Status Word on an 8008. The 4 system flags (C, Z, S, P) can be tested by the different conditional jump, call and return instructions.
Apart from the Accumulator the 8008 is equipped with 6 additional general purpose 8-bit registers.
The HL pair is used as a data pointer to transfer data to and from memory.
This is the only time that two registers are concatenated to form one 16-bit register. The H and L register must be loaded with two 8-bit values separately to form the address of the required memory location.
The stack on an 8008 can not be manipulated manually.
An 8008 has 8 14-bit program counters, which are used as return stack.
A subroutine call or interrupt simply switches over to the next available program counter, effectively saving the previous one.
Return instructions switch back to the previous program counter, effectively restoring the previous program counter.
The stack will overflow, and wrap back, when subroutines are nested more than 7 levels deep.
The program counter PC is normally incremented after fetching each instruction or operand byte during program execution.
The only way you can change this behaviour is with the jump, call and return instructions.
Also interrupts can change the program counter's value.
The program counter on an 8008 is only 14-bits wide, enabling it to address up to 16k of memory.
SB-Assembler Version 3 can show you the cycle times of each instruction when the TON list flag is switched on. The numbers presented are the number of states each instruction takes. Conditional instructions have two possible timings, the first one for when the condition is false, the second one for when the condition is true.
Only the register names are reserved. These are the names you better avoid using as label names:
A, B, C, D, E, H, L, M.
Originally the 8 possible restart vectors are numbered from 0 to 7 in other 8008 assemblers.
This is very inconvenient, because you can't let the restart vector point to the appropriate vector address by using its label name.
Therefore I added another addressing format to the RST instructions. Not only can you use the original addressing format, using a number from 0 to 7, but you can also use the appropriate vector addresses as well. The list below shows the relation between the vector address and interrupt number.
|Vector Address||Interrupt Number|
Please note that the value of the operand after an RST instruction may not be any other value than 0 to 7, $08, $10, $18, $20, $28, $30 or $38. Any other value will result in a Out of range error to be reported.
As mentioned before I have included 2 instruction sets in this cross-overlay. Both instruction sets can be used interchangeably. You don't even have to tell the assembler which instruction set you'd like to use.
LAB 1972 syntax that loads A with B MOV A,B 1976 syntax doing the same
Both instructions can be used in the same source program.
This is very convenient, but causes a few tiny problems.
E.g. in 1972 the CPE instruction compared A with E, while in 1976 it was used to Jump if Parity was Even and now the instruction requires a destination operand.
I could show a few more examples causing similar problems. Instructions like this must have their operand following the instruction within 8 spaces (10 spaces for version 3). If not the SB-Assembler will assume no operand was following the instruction, effectively interpreting it as a 1972 instruction.
Two things are set while initializing the 8008 overlay every time it is loaded by the .CR directive.
There are some differences between the SB-Assembler and other assemblers for the 8008 processor, if there are any. These differences require you to adapt existing source files before they can be assembled by the SB-Assembler. This is not too difficult though, and is the (small) price you have to pay for having a very universal cross assembler.
My way of keeping this site alive.