Search › A-Z › D › Datapoint 2200
Datapoint 2200
A from-scratch Datapoint 2200 authored for emulators.org and running in the browser. The Datapoint 2200 (Computer Terminal Corporation, 1970) was a programmable terminal; CTC contracted its serial CPU to Intel, who built it as the 8008 — the first microprocessor and the direct ancestor of the x86 line — so this IS effectively the 8008 instruction set. This build models the seven registers A-L, the H:L memory pointer, the Carry/Zero/Sign/Parity flags and the 8-level call stack, driving the built-in 12x80 CRT text display and keyboard, and boots an authored program that prints to the screen and echoes what you type. It plugs into the shared debugger, where you can single-step the CPU, watch the registers, flags and stack change, set breakpoints on the program counter, write watchpoints on RAM, and read memory as 8008 disassembly.
Runs on: Web browser
Datapoint 2200 Online Emulator
Play Datapoint 2200 using JavaScript directly in your browser.
Controls
Configurations
| Configuration | Emulator | Machine | OS | Legal | |
|---|---|---|---|---|---|
| Terminal text + keyboard-echo demo | Datapoint 2200 | Datapoint 2200 | open | Open ⛶ | |
| Fibonacci arithmetic demo | Datapoint 2200 | Datapoint 2200 | open | Open ⛶ |
Notes
Embedding
The emulator is two small, self-contained pieces: a pure Datapoint 2200 processor (datapoint-2200.js) and a CRT text-display canvas (datapoint-2200-screen.js). Vendor both and drive the machine from your own loop. The core never touches the DOM, so the debugger can pause, step and breakpoint it:
var cpu = new Datapoint2200({ onOutput: function (ch) { screen.putChar(ch); } });
cpu.load(bytes, 0); // bytes = program image, start PC = 0
while (!cpu.halted) cpu.step(); // step() = one instruction
The machine is plain objects. Everything the debugger needs is a live field or method on the core: cpu.step() (execute one instruction), cpu.reg and cpu.pc (the seven 8-bit registers and the 14-bit program counter), cpu.fC / fZ / fS / fP (the Carry, Zero, Sign and Parity flags), cpu.rd(a) / cpu.wr(a,v) (side-effect-free RAM access), cpu.stack / cpu.sp (the 8-level call stack), and cpu.keyFlag / cpu.keyBuf (the keyboard buffer the host fills). Because everything is ordinary JavaScript, breakpoints and watchpoints are host-side checks around step() and wr(), with no changes to the core.
Debugger integration
The boot shim publishes window.EMU_BOOT with a full transport: pause / resume / isPaused, stepInsn(n) (one instruction) and step(n) (a burst), reset, plus breakpoints (program-counter values the loop checks before each step) and watchpoints (RAM addresses, checked inside the write path). A dedicated CPU decoder, /debugger/src/cpus/datapoint2200.js, disassembles each instruction into 8008 mnemonics: the register moves (LAB LHM LMA …), the ALU family both register and immediate (ADC SUB NDA XRB CPI ADI …), INr/DCr, the rotates (RLC RRC RAL RAR), the jumps and calls with their four conditions (JMP CAL JTZ JFC CTS RFP …), RET, RST, and INP/OUT.
The register window shows A B C D E H L (8-bit, editable), the combined H:L pointer and the byte it points at, the Carry / Zero / Sign / Parity flags, the run state, and the depth and contents of the 8-level address stack. The RAM is a plain 16 KB byte chip, so the disassembly gutter, the program-counter highlight, breakpoints and write-watchpoints all line up directly on byte addresses.
Architecture
The Datapoint 2200 (Computer Terminal Corporation, 1970) is one of the most consequential machines in computing history. CTC needed a small serial processor for their programmable terminal and contracted the design to Intel, who implemented it as a single chip — the Intel 8008, the first 8-bit microprocessor. Its instruction set and register model became the 8080, then the 8086, and so the whole x86 line descends directly from this terminal's CPU. CTC also approached Texas Instruments, whose version became the TMX 1795. This build models the CTC / 8008 instruction set from scratch.
- Seven registers, one accumulator. A B C D E H L are 8-bit; A is the accumulator all arithmetic and logic pass through. The pair H:L forms a 14-bit pointer, so the memory operand M is simply
RAM[H:L]— the same register-plus-memory idea you still see in x86 addressing. - Four condition flags. Carry, Zero, Sign and Parity, set by the ALU and tested by the conditional jumps, calls and returns (true / false against each flag).
- An 8-level call stack. Return addresses live in a small on-chip push-down stack (one level holds the running PC), so subroutines nest seven deep — a hardware stack, not a memory stack pointer.
- A programmable terminal. The machine's own peripherals are a 12-row by 80-column CRT text display and a keyboard, reached by
OUTandIN; cassette tape drives (stubbed here) provided storage.
Two authored programs ship with this build, both hand-assembled in genuine machine code by a tiny inline 8008 assembler. The text demo prints a banner to the CRT with an LAM / OUT 8 print loop, then polls the keyboard (INP 0 status, INP 1 data) and echoes each key. The arithmetic demo builds the Fibonacci sequence in registers with ADC (add register) and prints each byte as two hexadecimal digits through a small CALL-based hex-print subroutine — exercising the ALU, the flags and the call stack.