ArticleslgStudy

computer science

COSMAC Elf

COSMAC Elf is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand COSMAC Elf rather than just read about it. In short: The COSMAC Elf is an early single-board personal computer based on the RCA 1802 microprocessor. It was originally described in a series of construction articles in Popular Electronics magazine in 1976 and 1977.

COSMAC Elf — main illustration
COSMAC Elf — illustration

Key takeaways

  • COSMAC Elf belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect COSMAC Elf to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of COSMAC Elf from memory before moving on to harder problems.

Reference excerpt

The COSMAC Elf is an early single-board personal computer based on the RCA 1802 microprocessor. It was originally described in a series of construction articles in Popular Electronics magazine in 1976 and 1977. The system operated without read-only memory (ROM) chips—programs were entered directly into RAM memory using the 1802's integrated direct memory access (DMA), 8 toggle switches, and an Input push button. An updated commercial version called the COSMAC VIP was later sold in kit form.

Description The original Elf featured two hexadecimal LED displays for byte data value output, and a set of 8 toggle switches for input (a hexadecimal keypad was an optional extension). The base configuration had 256 bytes of RAM, but expansion projects could raise that to a power of two-based memory store, with an upper limit of 64K address space. The first Elf design used a crystal with a frequency in the range of 1 to 2 MHz with the 1802's built in oscillator circuit. A simple circuit used the DMA feature of the 1802 to permit entry of programs and data into RAM through the toggle switches. Entering a byte via the toggle switches and pressing the "input" button would enter a byte into RAM and display it on the pair of hex LEDs, then advance the DMA counter to the next location. A "memory protect" switch could be used to disable memory alteration. If an error was made in program entry, it could be corrected by turning on memory protect, turning off load mode (thus resetting the program counter to zero), turning on load mode, and pressing "input" to advance to the address of the incorrect data. After turning off memory protect, the correct value could be entered. The fourth article of the series presented modifications to use a companion RCA 1861 “Pixie” video generator IC (CDP1861). The Pixie required a 1.76 MHz clock, and since that was an uncommon crystal frequency, usually a readily available 3.579545 MHz color burst crystal was instead used in a separate oscillator circuit with a divide-by-two circuit to drive the clock inputs of both the microprocessor and Pixie. The resulting 1.7897725 MHz clock was close enough for the hardware to work. Monochrome video output (with timing roughly approximating NTSC standard) could be generated using DMA operations interleaved with carefully arranged 1802 opcodes as instructions in software. The maximum resolution of the 1861 was 64h by 128v rectangular pixels. By changing the placement of instructions in the video display control and interrupt routines, pixel rows could be repeated to obtain lower resolutions, allowing the video display to be used with 256 bytes of RAM (64×32 square pixels). A one-bit output from the microprocessor, the Q line, could be driven by software to produce sounds through an attached speaker, to save programs in RAM to a cassette recorder, and for serial I/O output. Branch instructions in the 1802 instruction set could read the state of the EF1 through EF4 single bit value input lines, which were used to read the 'I' keypad (input) momentary pushbutton (typically EF4), programs from the cassette recorder through interface circuitry, serial I/O input, and input from peripherals such as a light pen. There are also seven 8-bit I/O ports available for decoding and interfacing.

Microcomputers

The original Elf computers were essentially home-built versions of the RCA Microkit, Microtutor I and Microtutor II, which were RCA's demonstration boards for their CDP1801 2-chip predecessor and single-chip CDP1802 microprocessors. Enhanced kits such as the Netronics Elf II and Quest Super Elf added built-in features such as keypads for data entry, serial I/O, cassette interface, and the CDP1861 "Pixie" video chip. RCA later introduced their own similarly expanded version as the COSMAC VIP. In August 2006, Nuts and Volts magazine, along with Spare Time Gizmos, released a project to build the "Cosmac Elf 2000," based on the original Elf, with some newer and easier to find components and enhanced features, modules, and functionality, including the STG1861 Pixie Graphics Replacement board that is functionally equivalent to the now-rare RCA CDP1861 integrated circuit. The Membership Card is a modern, simple COSMAC Elf-like remake for retrocomputing hobbyists that is designed to fit in an Altoids tin. Various other hobbyist systems can be found on the Internet, including hardware emulators using FPGA and modern microcontrollers.

Software A series of newsletters and small booklets offered by Netronics and Quest contained 1802 machine language and CHIP-8 programs, along with schematics for expanding the Elf and adding peripherals, including a light pen. Other, similar information and hobbyist software projects can be found on the Internet. The only published book about the 1802 is Tom Swan's "Programmer’s Guide to the 1802" (1981), which has been made available as a PDF after being out of print for many years. Tiny BASIC, a version of BASIC offered by Tom Pittman, could be used to write small BASIC programs on the Elf that could display through the Pixie low-resolution monochrome graphics display or TV-Typewriter hardware. Pittman also wrote a small booklet about the 1802 titled "A Short Course In Programming", which he has allowed to be published and made available online free of charge. Mike Riley has written an editor, assembler, BASIC and FORTH interpreters, a BIOS, and the Elf/OS disk operating system that will run on expanded Elf systems, including the COSMAC Elf 2000. Other languages available are noted at the RCA 1802 Wikipedia entry, including interpreters, compilers and assemblers. Game cartridges for the RCA Studio II contain Chip-8 games, which can run on other 1802 systems. File dumps of these games can be found on the Internet.

References

… excerpt ends here. Continue reading the full article.

Illustrations

COSMAC Elf illustration
COSMAC Elf: COSMAC Elf on display at the Computer History Museum. (Lower-middle left, below the Altair 8800 computer and next to the TV Typewriter.)
COSMAC Elf on display at the Computer History Museum. (Lower-middle left, below the Altair 8800 computer and next to the TV Typewriter.)

Worked examples

Example 1 — a first encounter with COSMAC Elf

Start with the simplest possible case. Write down what COSMAC Elf claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to COSMAC Elf before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about COSMAC Elf ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of COSMAC Elf

In research
COSMAC Elf appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses COSMAC Elf in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
COSMAC Elf is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1802-based computers, Computer-related introductions in 1976, Early microcomputers, so understanding it makes those chapters shorter.
In everyday life
Look for COSMAC Elf outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “COSMAC Elf” →

How to study COSMAC Elf in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what COSMAC Elf means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain COSMAC Elf out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is COSMAC Elf in simple terms?

The COSMAC Elf is an early single-board personal computer based on the RCA 1802 microprocessor. It was originally described in a series of construction articles in Popular Electronics magazine in 1976 and 1977.

Why does COSMAC Elf matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study COSMAC Elf?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on COSMAC Elf.

Tags

  • 1802-based computers
  • Computer-related introductions in 1976
  • Early microcomputers
  • RCA computers

Keep exploring