Intel 8088 CPU DEMO

The Heart of the IBM Personal Computer

Phone: 555-8088

Introduction

Welcome to the SLP-8088 emulator, a faithful implementation of the Intel 8088 microprocessor for the Emulator.ca modem network. The 8088 is the processor that IBM chose for its Personal Computer in 1981---a decision that would shape the computing landscape for decades to come.

The 8088 Legacy

The Intel 8088, released in June 1979, was a cost-reduced variant of the 16-bit 8086. Internally it was a full 16-bit processor with 16-bit registers and a 20-bit address bus capable of addressing one megabyte of memory. Externally, however, it used an 8-bit data bus---a compromise that allowed IBM to build its PC using cheaper 8-bit peripheral chips and memory, keeping the machine affordable.

This seemingly modest engineering decision changed the world:

The 8088 bridged two eras. It was software-compatible with the 8086's 16-bit instruction set---far more powerful than the 8-bit 8080---while remaining affordable enough for mass production. This balance between capability and cost is what made the IBM PC possible, and with it, the modern PC industry.

This is the 8088 CPU test backend, which runs a Fibonacci sequence demonstration and BIOS test programme. For the full DOS experience with a command-line interpreter, see the DOS backend at 555-8188.

Quick Start

Dial 555-8088 to see the Intel 8088 in action. The system initialises the BIOS, then runs a Fibonacci sequence programme that demonstrates the 8088's 16-bit arithmetic capabilities. No interaction is required---simply connect and watch.

Getting Connected

To access the SLP-8088 system, configure your modem and dial:

ATDT555-8088

Upon successful connection, you will see the system banner followed by programme output:

CODE_FENCE_0

The demonstration first loads and runs the BIOS from segment F000, which initialises the interrupt vector table and system services. It then sets CS:IP to 0000:0100 and executes the Fibonacci test programme, which computes and displays the sequence using the 8088's 16-bit registers.

Terminal Settings

Configure your terminal software as follows:

This service runs a pre-compiled Fibonacci test to demonstrate 8088 emulation. The programme executes automatically upon connection. For interactive DOS computing with a command interpreter, file system, and application loading, dial 555-8188 instead.

Architecture Overview

The Intel 8088 is internally a 16-bit microprocessor with a 20-bit address bus, providing access to one megabyte of memory. It introduced the segmented memory model that would define the x86 architecture for the next two decades.

Registers

The 8088 provides eight 16-bit general-purpose registers, four segment registers, and special-purpose registers:

    16-bit      8-bit halves
    +-----+     +----+----+
    | AX  |     | AH | AL |   Accumulator
    +-----+     +----+----+
    | BX  |     | BH | BL |   Base
    +-----+     +----+----+
    | CX  |     | CH | CL |   Count
    +-----+     +----+----+
    | DX  |     | DH | DL |   Data
    +-----+     +----+----+

    +-----+
    | SP  |   Stack Pointer
    +-----+
    | BP  |   Base Pointer
    +-----+
    | SI  |   Source Index
    +-----+
    | DI  |   Destination Index
    +-----+

    +-----+
    | CS  |   Code Segment
    +-----+
    | DS  |   Data Segment
    +-----+
    | SS  |   Stack Segment
    +-----+
    | ES  |   Extra Segment
    +-----+

    +-----+
    | IP  |   Instruction Pointer
    +-----+
    | FLAGS|  Status and Control Flags
    +-----+

AX (Accumulator): Primary register for arithmetic. Can be accessed as two 8-bit halves (AH, AL), providing backward compatibility with 8-bit code.

BX (Base): General purpose, also used for base addressing modes.

CX (Count): Used as a counter by loop and string instructions (LOOP, REP).

DX (Data): Used for I/O port addressing and as the high word in 32-bit multiply/divide.

Segment Registers: CS, DS, SS, and ES define the active memory segments. Physical addresses are computed as (segment * 16) + offset, yielding the 20-bit address space.

Flags

    Bit: 15 14 13 12 11 10  9  8  7  6  5  4  3  2  1  0
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
        |  |  |  |  |OF|DF|IF|TF|SF|ZF|  |AF|  |PF|  |CF|
        +--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
Flag Bit Description
CF 0 Carry Flag
PF 2 Parity Flag
AF 4 Auxiliary Carry Flag (BCD)
ZF 6 Zero Flag
SF 7 Sign Flag
TF 8 Trap Flag (single-step debugging)
IF 9 Interrupt Enable Flag
DF 10 Direction Flag (string operations)
OF 11 Overflow Flag

Memory Map

    +------------------+ 0xFFFFF (1,048,575)
    |    BIOS ROM      |
    |  F000:0000       |
    +------------------+ 0xF0000
    |                  |
    |  (Reserved)      |
    |                  |
    +------------------+ 0xA0000
    |                  |
    |  Conventional    |
    |  Memory          |
    |  (640 KB)        |
    |                  |
    +------------------+ 0x00500
    |  BIOS Data Area  |
    +------------------+ 0x00400
    |  Interrupt Vector |
    |  Table (IVT)     |
    +------------------+ 0x00000

The 8088 addresses one megabyte using a segmented model. The BIOS resides at the top of the address space (segment F000). The interrupt vector table occupies the first 1024 bytes. User programmes load in conventional memory, typically at 0000:0100 (the same convention as CP/M and later DOS).

Segmented Addressing

Physical addresses are computed by shifting the segment register left by 4 bits and adding the offset:

    Physical Address = (Segment * 16) + Offset

    Example: CS=F000, IP=0100
    Physical = F000 * 16 + 0100 = F0000 + 0100 = F0100

This segmented model allows the 8088 to address 1MB of memory using 16-bit registers---an elegant solution to the "640K ought to be enough" problem, though it would become a source of frustration for programmers as memory demands grew.

Interrupts

The 8088 supports both hardware and software interrupts through the Interrupt Vector Table (IVT) at address 0000:0000. Each of the 256 possible interrupts has a 4-byte entry (segment:offset) pointing to its handler:

Interrupt Function
INT 08h Timer (IRQ0)
INT 09h Keyboard (IRQ1)
INT 0Ch Serial COM1 (IRQ4)
INT 10h BIOS Video Services
INT 14h BIOS Serial Port Services
INT 21h DOS Function Calls

What the Demo Does

The Fibonacci test programme demonstrates several key aspects of the 8088 emulator:

  1. BIOS Initialisation - The BIOS loads at segment F000 and performs system setup, including initialising the interrupt vector table. The BIOS runs to completion (HLT), then the emulator transfers control to the test programme.

  2. Segmented Addressing - The programme loads at 0000:0100, demonstrating the 8088's segment:offset addressing model.

  3. 16-bit Arithmetic - The Fibonacci sequence exercises the 8088's 16-bit ADD and MOV instructions, computing each number as the sum of the two preceding values.

  4. UART Output - Results are displayed through the BIOS serial services, sending formatted numbers through the UART to your terminal.

  5. HLT Termination - The programme halts when complete, and the emulator displays a clean termination message.

The Fibonacci sequence is a fitting demonstration for the 8088: each number builds upon the work of its predecessors, just as the 8088 itself was built upon the foundations of the 8080, which was built upon the 8008. Computing history, like the Fibonacci sequence, is a story of accumulation.

See Also