
Naviagtion
Home
|
8008 Cross Overlay Overview
Introduction
The 8008, or 8 MOD 8 as it was called, was Intel's first 8 bit microprocessor.
I must admit that I've never seen one myself.
In fact they were even 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.
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 cancelled the order and built the Datapoint 2200 terminal using about 100 TTL ICs as CPU.
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.
I've included both instruction sets in the new 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. Programming ModelThe 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 The Accumulator is the most important register for 8 bit arithmetic operations. The Program Status Word 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. General Purpose Registers
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.
The Stack
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 Program Counter
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.
TimingSB-Assmebler 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. Reserved WordsOnly the register names are reserved. These are the names you better avoid using as label names: A, B, C, D, E, H, L, M. Special FeaturesRestart Vectors
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.
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 "Range error" to be reported. Instruction sets 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. Example:
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.
Overlay InitializationTwo things are set while initializing the 8008 overlay every time it is loaded by the .CR directive.
Differences With Other AssemblersThere are some differences between the SB-Assembler and other assemblers for the 8008 processor. 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.
|
|||||||||||||||||||||||||||||||||||||||||||