Meet the Altair · A byte arrives

Receiving
a byte.

The computer can send a byte out. Now give it a byte to receive. Follow the value from your switches, through an input device, into A, and finally to the lamps.

Begin here: 42 is prepared on the input switches. Press Send byte to device, then Step one instruction twice. Watch where the byte is waiting after each action.

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

0100–0101: DB 01 receives the waiting byte from input port 1 into A.
0102–0103: D3 01 sends A to output port 1.

The two directions connect to separate devices. RAM starts at zero outside these four program bytes. This lesson checks all four bytes before executing.

Operate the memory panel

The 8080 behind the panel

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

An input device Input port 1

Prepare a byte

Enable JavaScript to prepare a byte.

Device empty. No byte waiting.

Switches prepare a byte. Send stores it; IN 01H reads it. The device holds one byte at a time.

A separate lamp device Output port 1

No byte sent yet. 0 writes received.

Each OUT sends A here. The device keeps that byte until another arrives. Lit = 1; dark = 0 after a byte has arrived.

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 lesson connects an 8080, 65,536 bytes of RAM, and separate teaching devices at input and output port 1. Start again restores the loaded program, empties both devices, clears the counts and history, prepares 42 on the input switches, and stops at PC 0100. It is not the hardware RESET switch.

    Preparing is not sending.

    These eight input switches belong to our new teaching device. They are separate from the Altair memory panel below. Moving them prepares a number; it does not change RAM, A, or either device’s stored byte.

    Press Send byte to device. Now the device holds the byte, waiting for the processor to read it. A still holds zero, and the output lamps have received nothing.

    Receive it. Then echo it.

    The first instruction is IN 01H: receive a byte from input port 1 into A. This device hands over its waiting byte and becomes empty. The input switches keep their positions.

    The second instruction is the familiar OUT 01H: send A to the lamp device. It now displays the byte you supplied. Sending received data back out is called echoing.

    Both instructions use port number 1, but their directions choose different connections: IN reads the input device, and OUT writes the output device. Neither accesses RAM address 1; its readout stays zero.

    Open Look inside the last instruction after each step. The trace shows the instruction bytes fetched from RAM, followed by an input or output transfer. The values there are hexadecimal: 42 decimal is 2A.

    Another byte can wait its turn.

    As soon as IN empties the input device, Send becomes available again. You can send your next prepared byte before OUT runs. That new byte waits in the device; it does not replace the first one already in A.

    Try receiving 42, then sending 99 to the input device before the echo. Prepare 99 by raising only input switches 6, 5, 1, and 0: 01100011. OUT still sends 42. The input device keeps 99 for later.

    The two-instruction program ends at 0104. To receive the next waiting byte, raise only switch 8 on the Altair memory panel and EXAMINE 0100. Then step or RUN again. EXAMINE changes PC but leaves both devices alone.

    STOP also preserves the waiting input, A, and the output lamps. Sending input never starts execution automatically. You choose when to step or RUN.

    Zero is a byte too.

    Lower all eight input switches and send zero when the device has room. It now says “Waiting: 0,” which is different from “Device empty.” IN receives that zero into A; OUT sends it to the lamps. All eight lamps go dark, and the write count increases.

    For this first lesson, the controls pause before IN if no byte is waiting. The message asks you to send one, then step or RUN. This pause is a teaching aid: it is not an instruction, and it does not change the CPU’s state.

    The underlying input device would return zero if read while empty. A real program using this device must check whether a byte is ready to distinguish an empty read from a received zero. The next lesson makes that check part of the program.

    What this view models

    The input device stores one waiting byte; it has no queue. These input switches and the separate lamp device are teaching illustrations, not particular historical Altair peripherals. Both devices are connected through the machine’s ports. RUN, STOP, and stepping work at whole-instruction boundaries; physical timing and bus signals remain outside this view. Stopping at 0104 is a lesson boundary, not a halt instruction. Start this lesson again restores the program, empties both devices, clears the counts and history, and prepares 42 on the input switches.