Vocademy

Part 10: Video

Before video

In the mid-1960s, a few desktop programmable calculators hit the market. They were oriented to numerical operations, so such things as manipulating text would have required some serious hacking. Therefore, they were not truly general-purpose computers. However, they had all the elements of the modern computer as described above. One of the earliest, the Programma 101, was produced by Olivetti, a company known for typewriters at the time.

An Olivetti Programma 101 (c. 1965).

The Olivetti Programma 101 produced output on printed paper tape like that used by printing calculators. It had no graphics capability, but it could produce crude graphs by strategic placement of printed characters.

The earliest ancestors of modern personal computers had no keyboard or video monitor. Data was input by flipping toggle or rocker switches, and data output consisted of illuminated or unilluminated LEDs on the switch panel.

A Micral N personal computer. This predecessor to the Altair 8800 did not have the impact on the industry that the Altair did.

An Altair 8800. This was not the first personal computer, but it significantly impacted the computer industry.


An IMSAI 8080, a popular competitor to the Altair 8800[1].

The early personal computers above (the Miral N, the Altair 8800, and the IMSAI 8080) lacked input and output capabilities other than switches for input and LEDs for output. A switch in the upward position represented a logical one, and in the downward position, a logical zero. An illuminated LED represented a logical one, and an unilluminated LED represented a logical zero.

A typical programming session consisted of first writing the program in assembly code on paper.[2] The result was a series of lines with instructions and data. Next, the programmer looked up the numerical operation codes (opcodes) in the processor's manual and then converted the program to lines of opcodes and data, usually written in hexadecimal or octal notation.[3] Next, the programmer would translate the lines of opcodes and data to binary (in his or her head) and transfer that by hand to the proper switches on the front panel. After each line of opcode or data was set in the switches, pushing a button or pressing a momentary switch would transfer the switch states to memory and step to the next memory location, ready for the next line of code.[4]

It wasn't long before hobbyists obtained surplus teleprinters and wired them into their computers. Before serial ports became available, hobbyists would "toggle in" programs that emulated serial ports. Teleprinters were attached at some electrical point the computer could use as a one-bit-at-a-time input or output. Once the serial port emulator was running, along with programming to move data to and from the port and memory, data could be sent to the computer from the teleprinter keyboard or punched paper tape. The computer could send data to the teleprinter to be printed on paper or punched paper tape.

An Altair 8800 with an attached Model 33 ASR Teletype.  

Teleprinters

A teleprinter works by receiving and sending letters of the alphabet using RS232 signaling and Baudot or ASCII code (see serial ports for more information). Noting the plus and minus 12 volts of RS232 signaling as zero and one, respectively, when the computer sent 01000001 to the teleprinter, the teleprinter would print the capital letter A. Sending 01000010 would print the capital letter B, etc.[5] The teleprinter would use the same method to send letters to the computer. Therefore, pressing the A key would send 01000001, etc.

The teleprinter is the origin of the Ctrl and Esc keys on modern computer keyboards. Pressing the Esc key sent 00011011 to the receiving teleprinter or computer. This told the receiving teleprinter that the next two characters (16 bits) were meant to perform a special function. Computers have interpreted the Esc key in different ways over time. Holding the Ctrl key and pressing another key would send a different series of ones and zeros than pressing the letter key alone. For example, holding the Ctrl key and pressing the G key would send 00000111 (decimal 7). This told the receiving teleprinter to ring the bell. As of Windows 11, sending 00000111 to the terminal emulator will cause the computer to make a short beep or initiate the Windows default beep.

Demonstration:

Open a command interpreter by typing "cmd" into the Windows search box and pressing Enter. Next, type "copy notepad.exe con" at the command prompt and press Enter.[6] This will send the Notepad program to the terminal emulator (console) byte-by-byte. The computer will act as a video terminal, interpret the data as text, and print it to the screen as if printing text on a teleprinter. Most bytes in the notepad.exe file are not codes the terminal will interpret as letters of the alphabet.[7] Therefore, the result of this demonstration will be mostly gibberish, except for the embedded text, "This program cannot be run in DOS mode." However, the notepad.exe file contains several bytes that consist of the binary number 00000111. Each time one of those bytes is sent to the console, the computer will beep.  

Video terminals

Once teleprinters were established as a standard input and output device, the next step was to replace them with video terminals. Video terminals worked like teleprinters, except the output was shown on a video screen instead of a paper roll. The computer could not tell whether a teleprinter or a video terminal was attached.

Instead of typing characters on paper, a video terminal puts the ASCII codes for the characters in RAM.[8] As the electron beam scans the screen, the hardware looks in the RAM to see what character to display on a particular part of the screen. The beam turns on and off to draw bright spots in a grid to create the character. The terminal has ROM, where patterns of ones and zeros tell the beam when to turn on and off. When the beam is at a particular spot on the screen, the hardware checks a particular bit in the ROM to see if the beam should be on or off at that point.

The following is an excerpt from the Atari System Reference Manual. It shows how a character is represented by ones and zeros in memory. The asterisks to the right of the memory map are identical to the pattern of ones in the map. This is to help you see that the pattern of ones looks like the letter A. Immediately below this, starting at address $E210,[9] is a map for the letter B.

When the electron beam of the CRT is scanning a place where the frame buffer says there should be part of the letter A, the hardware scans the memory map between $E208 and $E20F to see when to make the beam bright or dark to draw the letter.

$E208 00000000
00011000 **
00111100 ****
01100110 ** **
01100110 ** **
01111110 ****** 01100110 ** **
$E20F 00000000

Memory map of the letter A in the Atari 8-bit computer

The Atari 8-bit computer used an 8 x 8 matrix for on-screen characters, but a video terminal often used a matrix with different dimensions (see IBM video displays below). However, the principle is the same.

Think of it like this: you control the electron beam in a video terminal. The electron beam is now at the upper left corner of a block where a character will be drawn. First, you look in the RAM text buffer to see what character to draw next and find the binary number 01000001. This tells you the next letter to be displayed is the capital letter A.[10] Now, you look in the particular place in ROM where the bitmap for the capital letter A is stored to see how to draw it. As the beam passes across the screen, you look at the individual bits in the corresponding bitmap to see when to turn the beam on and off.

An ADM-3A video terminal, basically a video teleprinter.

With the video terminal as the standard input and output device, computers began to be manufactured with video terminals built in. Such computers often looked identical to a video terminal, so it was important to know whether a particular piece of hardware was a full computer or a "dumb terminal." The presence of floppy disk drives often indicated that you had a full computer, but not all early all-in-one computers had floppy disk drives.

An Osbourne 1 computer with a built-in five-inch video terminal.


A Kaypro computer with a built-in nine-inch video terminal.

By the time video terminals became built into computers, computers could usually self-start (boot), loading software to communicate with the terminal without human intervention.

This leaves us with the earliest personal computers as we know them. By the time this level was reached, Microsoft had already developed a BASIC language interpreter that loaded from paper tape. Gary Kildall had already developed an operating system[11] that loaded from floppy disk called CP/M (Control Program for Microcomputers).[12] CP/M became the standard operating system on computers using a circuit board interconnect standard called S-100 that originated with the Altair 8800. With self-starting computers sporting floppy disk drives and video terminals, the personal computer industry was on the brink of the computer revolution.


Altair 8800 - Front Panel Programming Tutorial #1
—————————
1Parts of an IMSAI 8080 system were featured as props in the 1983 movie War Games.
2Assembly code represents processor operations using three or four-letter codes (mnemonics). These mnemonics are easier to remember than the numerical operation codes used by the processor. A single mnemonic can also represent multiple operation codes depending on context. Again, these mnemonics and contexts are easier for programs to remember than the numeric opcodes.
3Hexadecimal and octal are popular for noting binary numbers because they are fairly easily converted to binary and vice versa in one's head.
4Go to Altair 8800 - Front Panel Programming Tutorial #1 on YouTube to see an example of programming the Altair 8800.
5This assumes the teleprinter operated on ASCII code rather than Baudot code.
6This assumes the current working directory is C:\Windows\System32 (indicated by the prompt). If your command prompt opens in a different directory you must type ''copy c:\windows\system32\notepad.exe con'' at the prompt.
7The information in the NOTEPAD.EXE file is interpreted by the processor as instructions and data. When using ASCII code, only 96 of the possible combinations of ones and zeros represent text. Another 32 represent control codes for teleprinters. Half of the combinations mean nothing to a mechanical teleprinter but are interpreted by computers and some video terminals as graphics characters.
8This assumes the terminal stores text in ASCII code, which may or may not be the case.
9The dollar sign ($) denotes that the following number is in hexadecimal. In most other contexts hexadecimal numbers are preceded by 0x.
10Again, assuming the terminal uses ASCII code in the text buffer.
11An operating system stands between programs and hardware. It facilitates communication between the computer and peripherals (mass storage, printers, etc.), loads and starts programs and has an interface where users can issue instructions using typed commands or a point-and-click interface.
12Operating systems that loaded from floppy disk or used resources stored on hard disk or floppy disk became known as Disk Operating Systems (DOS).
Vocademy