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
| Address | Reference | RAM | Check |
|---|
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.
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.