-
Brief description of the Intel 8080
01/03/2024 at 11:14 • 0 commentsThe Intel 8080 was a revolutionary microprocessor. Released in 1974, it is the direct ancestor of the x86 family of processors found in modern computers, and vestiges of its architecture and instruction set can be seen in modern processors. The Z80 processor - a derivative of the 8080 that can run most 8080 code - is still manufactured today.
The design of the 8080 built upon the 8008 which was released a couple of years earlier. The 8008 architecture was based on the Datapoint 2200 - a very early personal computer which had a multi-chip CPU. The architecture of the 8080 was a significant improvement over the 8008, leading to faster performance and higher code density.
The 8080 has a simple design and it is easy to write an emulator for this processor. It has an accumulator A, and 6 other 8-bit registers (B,C,D,E,H,L) which can be used by themselves or in pairs (B and C, D and E, H and L) as pseudo-16-bit registers. In particular, the HL register pair can act like a 16 bit accumulator, and the other register pairs can be added to it. Another special feature of the HL pair is that the contents of the memory address that it points to can be accessed as though it were a register called M. M can be used like any of the 6 other 8-bit registers. There is a 16 bit stack pointer SP, so the stack can be located anywhere in the 64K address space. Registers are pushed to and popped from the stack in pairs. The contents of the DE and HL register pairs can be exchanged in a single instruction, and also the top of the stack can be exchanged with HL in a single instruction.
One idea behind the register architecture of the 8080 was the observation that in CPUs where any register could be used for any purpose, programmers tend to use the same register for the same purpose across different programs. So it’s not much of a loss if the processor architecture restricts some operations to designated registers. Often in 8080 programs HL and DE are used as pointers and BC is used as a counter.
All opcodes are single-byte, with some instructions taking one or two operands. Most of the 256 opcodes are used for something, and this helps give 8080 programs a high code density.
The 8080 was used in many computer systems in the late 1970s and the CP/M operating system was based around it. It was displaced by the Z80, released in 1976. But I don’t think that this should be seen as a failure of the 8080 - the Z80 was designed by the same person as the 8080 (Federico Faggin). It has essentially the same architecture, but makes some improvements that lead to shorter, faster programs. The Z80 is a better performing processor, but in my opinion it is less elegant than the 8080 because it has around twice the number of transistors and has a lot of two-byte opcodes.
The 8080 was used in the Space Invaders arcade game in 1978, and an 8085, a close relative of the 8080, was the brain of the Sojourner rover that explored Mars in 1997.
-
Brief history of Tiny BASIC
01/02/2024 at 10:59 • 0 commentsThe Tiny BASIC language specification was designed by Dennis Allison for the first microcomputer systems that emerged in the mid 1970s. It is one of the earliest examples of free, open source, collaborative software. It was developed in response to the expensive Altair BASIC sold by Microsoft. Compared to other microcomputer basics of the era, the Tiny BASIC specification had a limited set of features, omitting string handling and floating point numbers. Extensions to the Tiny BASIC language added extra features, including arrays, FOR loops and user defined functions.
Implementations of Tiny BASIC were published as source code and binary listings. Dr Dobbs journal began in order to publicise Tiny BASIC development.
One of the most popular implementations of Tiny BASIC was Palo Alto Tiny BASIC (PATB) by Li-Chen Wang. It supported loops with FOR/NEXT/STEP, it had a single array variable @, and it fit within 2K.
Over the next few years, when computer memory was expensive, derivatives of PATB could be found in some commercial computer systems including the TRS-80 and the Transam Triton.
A combination of factors made Tiny BASIC redundant: memory became cheaper, and new microcomputers had their own BASICs built in that could take advantage of the specifics of their hardware.