Meet the Altair · A teaching terminal

Typing to
the computer.

A character can travel as a byte. Send one to the 8080, let the program receive it, then watch it come back as text. The program is the same one that echoed bytes to the lamps.

Begin here: A is prepared below. Press Send character, then step five instructions. The text display stays empty until the fifth instruction, OUT. One more step returns to the readiness check.

Loaded polling program · reference card All addresses and bytes here are hexadecimal
These fourteen bytes are already loaded at 0100. RAM shows what is stored now.
AddressReferenceRAMCheck

0100–0101: DB 00 reads readiness into A.
0102–0103: FE 00 compares A with zero.
0104–0106: CA 00 01 jumps to 0100 if Z = 1.
0107–0108: DB 01 receives the waiting byte into A.
0109–010A: D3 01 sends A to the text display.
010B–010D: C3 00 01 jumps to 0100.

Checking readiness leaves pending input alone. This lesson checks all fourteen program bytes before executing. RAM is zero outside the program.

Operate the memory panel

The 8080 behind the panel

A decimal
0
PC hex
0100
RAM[1] decimal
0

Character input Port 0: readiness · Port 1: data

Prepared: A. Enable JavaScript to see its byte value and send it.

Typing prepares a character. Send or Enter offers it to the device. Line feed sends byte 10 separately.

Device empty. No byte waiting.

Ready now: 0 · empty

One byte can wait. When full, prepare another character here; it stays unsent until you send it after the CPU receives the first.

Received text Output port 1


    Waiting for output
  

No byte sent yet.

0 writes received.

Only OUT adds text. LF starts a new line; other non-printing bytes appear as labels in angle brackets.

Zero flag Z: 0 · the most recent comparison’s answer

The program is loaded. Enable JavaScript to run or step it.

Last CPU instruction

No instruction has run.

Look inside the last instruction
Step an instruction to see its fetched bytes, memory accesses, and any port transfers.
Recent instructions

0 instructions executed.

    RUN and STOP are teaching controls at instruction boundaries. Pace is for reading, not a simulation of the Altair’s clock. This page stops running when hidden. Looking at these readouts changes no state; EXAMINE changes PC.

    EXAMINE changes PC without running a program instruction. Stepping advances PC, and the panel lights follow it. This added control executes a whole instruction; the original SINGLE STEP switch advanced one machine cycle.

    ALTAIR 8800

    Memory controls · learning view

    Address lights The selected location

    0 decimal · 0000 hex

    Data lights The byte at that location

    0 decimal · 00 hex

    A lit lamp is 1; a dark lamp is 0. The digits help you read the lights.

    Data / address switches Up = 1 · Down = 0

    15–8 · Address only

    7–0 · Address or data

    All switches as an address
    0 decimal · 0000 hex
    Lower eight as a byte
    0 decimal · 00 hex

    Setting the switches prepares a number. It does not read or write memory.

    Raise only switch 8 and press EXAMINE to select 0100.

    Select the address in the switches and read its byte.

    Move to the next address and read its byte.

    Write the lower eight switches to the selected address.

    Move to the next address, then write the lower eight switches.

    EXAMINE would select address 0. DEPOSIT would write 0 to the selected address, 0.

    Last memory operation

    Enable JavaScript to operate the panel.

    This teaching terminal uses the same polling program, input latch, and output port as the lamp lesson. Start again restores the program, empties both devices and the text display, clears counts and history, prepares A, and stops at PC 0100. It is not the hardware RESET switch or a model of a particular historical terminal.

    Typing prepares. Sending offers.

    The input field holds a character you are preparing. Replace A with another ASCII letter, a digit, punctuation, or a single space. Its byte value appears below the field.

    Send character, or Enter while editing the field, copies that byte to the input device. It waits there for the CPU. Typing alone does not send it, and sending does not start execution.

    The device can hold one waiting byte. While it is full, you can prepare a different character in the field, but cannot replace the pending byte. When the CPU receives the first byte, send the next one explicitly. There is no hidden input queue.

    The field accepts exactly one printable ASCII character, including space. Empty input, multiple characters, and characters outside ASCII are explained without sending or silently shortening them. Send line feed is a separate action, sending byte 10.

    A letter appears when the program sends it.

    The familiar program checks readiness with IN 00H, compares the answer with zero, and decides whether to repeat. Once a byte is ready, IN 01H receives it into A.

    That is still only input. The text display remains unchanged until OUT 01H sends A to output port 1. The display interprets the received byte using ASCII and adds its character after the earlier output.

    You can read the pending byte, A, and the last output independently. After the echo, the next readiness check can replace A with 0 or 1; it does not erase the text.

    Open Look inside the last instruction after OUT. Its captured output transfer is the reason a character appeared. Editing the input field or reading a display produces no such transfer.

    Several bytes make a line of text.

    Choose RUN to keep polling. At a slow teaching pace you can see each transfer happen. A faster pace makes a short conversation easier; send each new character when the device has room.

    Try sending H, i, a space, and A. Then send A again. The display should read “Hi AA”. Two equal output bytes make two letters, even though the output device’s last-byte value stays the same.

    When the device is empty, Send line feed offers byte 10. After the program echoes it, this display starts a new line. Line feed does not immediately move the output position when you click the button.

    Space and line feed both count as output bytes. A space leaves a gap; line feed moves the thin output marker to the start of the next line. The marker shows where the next character will appear and is not a received character.

    STOP preserves pending input, A, and the text. Start this lesson again empties them and prepares A. The display retains only the latest 256 output bytes, while the write count continues to show the total received.

    A terminal joins input and output.

    The keyboard side supplies bytes, and the display side presents bytes received back. Our small echo program connects the two directions. That makes the difference between a key being prepared and the computer responding visible.

    This is a teaching terminal, not a model of a particular historical keyboard, display, or serial board. It reuses the same one-byte input device, output device, port connections, and fourteen-byte polling program as Waiting for a byte.

    How this display treats other bytes

    This display draws printable ASCII and spaces, and treats LF as a new line. Other non-printing codes appear as labels such as ⟨NUL⟩ or ⟨CR⟩; bytes outside ASCII use hexadecimal labels such as ⟨FF hex⟩. These labels make the received bytes inspectable rather than performing cursor movement, deletion, or other terminal operations. The character field cannot send these codes, but a program can output them. For example, EXAMINE 0107 with an empty device bypasses readiness: IN returns zero, then OUT displays ⟨NUL⟩.

    The CPU does not need a new instruction to make letters appear. It still transfers bytes. We changed how the host prepares and presents those bytes. In the next lesson, we change the program so it can choose a different reply.