Intel 8088
16-bit breadboard computer
Series of tutorial-style videos where I build a 16-bit x86 Intel 8088 computer on breadboards explaining on the way the internals of this famous processor. You will see how to interface with the 8088 when I add the memory chips and other devices to the breadboards. All the signals of the CPU buses are explained when I step through the programme including all the details of the interrupt handling in this processor. Later in this series I explain how to programme the x86 using both the assembler and higher-level languages like C or C++ and how to mix them in one programme. The final goal is to write a simple video game for our computer.
Future plans
Currently we are well into the series. There is a few more videos planned in order to fulfil my promise to write and play a simple video game on my computer.
After I've achieved it, I hope to continue this series by adding some non-essential extensions or changing the existing hardware to show that this computer may be built in many different ways. I already have a few ideas to try - couple of them taken from my viewers' comments - thank you for all of them!
Resources
All the source code and schematics for this series can be found on GitHub:
Software used in this series:
GCC IA-16 toolchain or here you can also find the binaries for Windows
Make for Windows (if use Windows)
Visual Studio Code (optional IDE)
KiCad 7 (for schematics)
Part 1 - First Run
In this first video of the series I:
set my goals for the series and talk about what I am going to do
describe the 8088/8086 and show the differences between the two
put the 8088 on a breadboard and start connecting all relevant pins explaining all the input and output signals of the CPU
build a simple contraption to drive the CLOCK and RESET signals
talk about 8086 address space and how it addresses the memory
explain how the processor starts executing machine code after reset
connect LEDs to all data/address and control pins to visualise their states
start the CPU and analyse its behaviour step by step after reset
Part 2 - First Real Programme
In this video you can see how I:
add latches to store the address signals from the multiplexed data/address pins
connect resistors to drive the data bus and simulate the NOP (no-operation) machine code for the CPU to fetch and execute while clock signal step by step
add the proper flash memory and with a simple programme
talk about 8086 registers and how it divides the 1MB memory space into 64kB segments
explain in details the test programme in the flash memory
run the programme on our breadboard computer and visualise the CPUs address and data buses on the LEDs
allow the programme to show its calculations on the data bus LEDs
Part 3 - Memory map and interrupts
In this video I:
talk about the memory map of our computer
build an address decoder using logic gates, to activate two different memory chips depending on the address the CPU wishes to access
add a RAM memory chip and connect both memories to the address decoder
talk about interrupts in 8086 and explain the Interrupt Vector Table at the bottom of the RAM
introduce the Programmable Interrupt Controller (8259) and its role in interrupt handling
explain the concept of the processor's stack and its importance in the context of interrupt handling
go into details of the programme used to initialise the processor and the handler of the Non-Maskable Interrupt
raise the MNI interrupt (using a wire) and analyse the CPUs behaviour in details
Part 4 - More interrupts, clock generator and LCD
In this video you can join me to see how I:
add a new chip (74244) with 8 buffers to simulate the PIC's response to the interrupt request (without actually using the 8259)
write a new programme with a new interrupt handler for the INTR (maskable) requests
raise an interrupt using a wire on the INTR pin and, like previously, analyse the CPUs behaviour step by step
add an I/O address decoder using 74138 chip which allows us to connect 8 different I/O devices
add a Text LCD as our first device in the I/O address space, including logic required to access it from the CPU
programme a set of functions to talk to the LCD and test it by running the computer step by step
replace the manual clock with the proper crystal square wave generator using the Intel 8284 chip
test the whole computer and the LCD again - this time by using high frequency clock generator
Part 5 - Calling conventions and single-step execution
This video is exclusively devoted to programming our breadboard computer and the theory behind it. You can see how I:
tidy up the last programme for the Text LCD testing
explain calling conventions allowing to mix code from different languages
talk about differences between functions compiled in different languages
how to write functions in assembler, which can be called from C and which can call other C functions properly
write functions both in assembler and C to support the Text LCD
create a function to display values of all Intel 8086 registers on the LCD
explain the breakpoint interrupt (INT 3)
write the breakpoint handler to collect the full state of all CPU's registers and call the function to display them written in C
discuss in details the FLAGS register of the 8086
show how to switch the 8086 into the single-step mode
write the single-step interrupt handler (INT 1) and display the registers' states on the LCD
Part 6 - More I/O devices: Interrupt controller and timers
In this video I add more peripherals and programme them. Here is what happens step by step:
reactivate the 74244 octal buffers to act as a read-only register reflecting the states of the new push buttons
add functions to read the button states to allow single-step full functionality
add the PIC 8259 - Programmable Interrupt Controller
initialise the PIC and test by raising an interrupt manually while single-stepping
add the programmable timers - the 8254
set-up the timer to raise a regular system tick interrupt 100 times a second
test the whole thing
talk a little bit more about flags in the FLAGS register
Part 7 - CPU upgrade
In this video I build a new computer using 80188 processor. This is what you will see in this video:
80188 introduction. Differences between multiple versions
peripherals in the 80188
similarities and differences of the pins in both 8088 and 80188
changes required in software to handle the built-in peripherals
testing the new computer
both computers running the same programme side by side
Part 8 - Intel 80188 computer on a PCB
In this video I design a PCB for the 80188 computer from the last video and add programmable I/O ports - the 8255. This is what you will see:
the design of the PCB for my 80188 computer
discussion about using the timers in the 80188
testing new computer soldered on the PCB with the text LCD
introduction of the programmable I/O ports: the 8255
testing the 8255 using the LCD connected via its I/O pins