A Beginner’s Guide to Computer Technology
By Magnavox — Odyssey² by Magnavox
This gatefold will provide you with an electronic reference. Keep it open as you work with your Odyssey² computer.
| Key Code | Hex Code | Decimal Equiv. | Key Code | Hex Code | Decimal Equiv. |
|---|---|---|---|---|---|
| 0 | 00 | 0 | O | 17 | 23 |
| 1 | 01 | 1 | P | 0F | 15 |
| 2 | 02 | 2 | Q | 18 | 24 |
| 3 | 03 | 3 | R | 13 | 19 |
| 4 | 04 | 4 | S | 19 | 25 |
| 5 | 05 | 5 | T | 14 | 20 |
| 6 | 06 | 6 | U | 15 | 21 |
| 7 | 07 | 7 | V | 24 | 36 |
| 8 | 08 | 8 | W | 11 | 17 |
| 9 | 09 | 9 | X | 22 | 34 |
| A | 20 | 32 | Y | 2C | 44 |
| B | 25 | 37 | Z | 21 | 33 |
| C | 23 | 35 | Blank | 0C | 12 |
| D | 1A | 26 | : | 0A | 10 |
| E | 12 | 18 | $ | 0B | 11 |
| F | 1B | 27 | Clear | 2E | 46 |
| G | 1C | 28 | ? | 0D | 13 |
| H | 1D | 29 | * | 27 | 39 |
| I | 16 | 22 | + | 10 | 16 |
| J | 1E | 30 | − | 28 | 40 |
| K | 1F | 31 | × | 29 | 41 |
| L | 0E | 14 | ÷ | 2A | 42 |
| M | 26 | 38 | = | 2B | 43 |
| N | 2D | 45 | Enter | 2F | 47 |
[Diagram: Control Unit connected to Accumulator, Program Counter, Subroutine Return Address Register, Registers (0–9 and A–F), and ALU (Arithmetic Logic Unit). Also connected to Memory (ROM) Instructions and Constants, Keyboard, Symbol/Sound Generator, and TV Screen.]
[Diagram showing the Odyssey² keyboard layout with Numeric row (0–9), Function row (+ − × ÷ = YES NO CLEAR ENTER RESET), Alpha rows (Q–P / A–L / Z–?), and Space bar.]
Computer Intro is not for everyone—but if you’re up for a rewarding mental challenge, here is a fascinating entry point into a complex and highly technical subject.
The cartridge turns your Odyssey² into a very special kind of computer. It won’t balance your checkbook or do your income tax or plot the course of a spaceship to Mars.
But it will give you some idea of how those computers do their work. You will begin to understand how a computer “thinks” and even begin to think like a computer “thinks.”
The initial orientation and explanation are deliberately couched in the most simplistic of terms. They don’t assume anything more on your part than a working knowledge of basic arithmetic.
After a brief explanation of how computers work and what they are made of—you will start getting “hands on” experience and will learn by doing.
You will learn how to enter a program—the first step in learning how to actually write your own.
The gatefolds in the front and back of the manual provide you with electronic road maps. Keep these references in front of you and you will clearly understand what’s going on and how computers really compute.
In the beginning, there were ten fingers—then a prehistoric Einstein discovered his toes and man could count up to twenty.
The oldest computing device we know of is the abacus. It was first used in China in the sixth century B.C.
The very first digital computer was designed by Charles Babbage in the 1830’s. It was more than a calculator. Babbage designed it to be programmable, and it would have been able to perform any arithmetic or logic calculation.
It was designed to use punched cards for entering data and instructing the machine with mathematical commands.
There were two problems.
Problem one. Babbage’s elaborate drawings called for a building the size of a Dickensian shoe factory to house his “analytical engine.”
Problem two. Babbage died before the machine could be built.
The first practical programmable computer was built in a basement at Harvard University during World War II by IBM. It weighed 35 tons!
This machine used an exotic combination of electronic, electrical and mechanical gear to do its arithmetic. The instruction program was stored on a punched paper tape that unreeled automatically. Numbers were entered into the machine on a panel covered with 1,440 dials!
The first all-electronic computer was built at the University of Pennsylvania shortly after the war ended. ENIAC (Electronic Numerical Integrator and Computer) was 1,000 times faster than its predecessor.
But it filled a room 30 feet wide and 50 feet long. Its 18,000 vacuum tubes were connected by about a half-million soldering points.
Today, everything that ENIAC could do and far more is performed by a device slightly smaller in size.
It is less than one quarter of an inch square—and can make more than one million electronic decisions every second. It is called a semiconductor. It is possible for one semiconductor in one of its newest forms—the microprocessor—to account for more than 310 trillion separate functions.
And this is only the beginning!
If computer technology continues to develop at its present rate, one of these chips will be able to store about a quarter-million bits (the smallest unit of computer information) in its memory within a few years.
Ten years from this point, there will be chips capable of remembering a million bits of information.
By 1990, the number of logic or decision-making computer circuits on these one quarter inch chips are expected to number a quarter of a million.
Today’s large computers, selling in the one million dollar range and as big as several filing cabinets, contain only about 10,000 logic circuits and a main memory capacity of a few million bits.
As microprocessor technology progresses, computers may be developed that understand human speech.
It is even possible they can be taught to read handwriting!
The microprocessor in your Odyssey² is infinitely more sophisticated than the mathematical marvels that were the state of the art in the forties and fifties.
The technology of the microprocessor is unquestionably going to revolutionize the way the world works—and the way you’ll live. A computer will control your car’s automatic transmission and fuel injection system.
A computer will monitor fire and burglar alarm systems in your home.
The lights in your home will be computerized. So will the locks on the doors and windows.
A computer will even water the lawn.
A computer will do your shopping from the house—and pay your bills without you writing checks.
Computers will simulate three dimensional space for architects to help them mentally walk around their houses before they’re built.
Computers will alert doctors to patient problems that would be imperceptible under today’s circumstances.
Computers will help composers hear their music as they’re writing it—even if it’s too complicated for them to play.
Businessmen can have electronic simulations of their companies in their attaché cases.
We are really still just at the very beginning of the computer age. You have picked a very good time to get involved!
Computers have already carried man to the moon—to Mars—and far beyond. They lie at the heart of fearsome weapons systems. They fly planes—monitor automobile engines—run factories—and even translate languages. All of these with the brain power of a good screwdriver.
Congratulations! You have just completed your first lesson.
You are much smarter than any computer at the present state of the art!
For all of its awesome capabilities, the computer is nothing more than a rather simple-minded tool.
But once you learn how to use it, you’ll have more power at your command than Julius Caesar ever dreamed of.
A computer has few basic talents. It can add—and it can move numbers around.
A computer never forgets—and computers don’t make mistakes. (If a computer churns out misinformation, there’s a mistake in the program. Computers are utterly faithful in following instructions.)
Big deal. Computers can’t multiply, divide, or even subtract the way you do. But what a computer does do, it accomplishes with absolutely astonishing speed.
Your Odyssey² can make over 100,000 electronic decisions every second—and there are computers around that are more than ten times faster than that!
To multiply, Odyssey² simply adds numbers together at an incredible speed. To subtract, it moves numbers around in a special way so that adding them together will give the correct answer. This sounds like doing it the long way—but when you’re that fast at addition, the juggling act becomes worthwhile.
It’s not all that hard to talk with a computer. It only understands two words. Yes—and no. Yes—means that an electrical pulse is tickling the computer’s sensitivities. No—means that no electrical pulse is going through.
The symbol for “yes” in computer language is 1.
The symbol for “no” is 0.
Once you have memorized 0 and 1, you have memorized the entire alphabet of the only language computers speak in any country of the world.
This is called a binary system because there are only two symbols involved. It’s sort of a code. Here’s the key.
| 1 = 0001 | 5 = 0101 | 9 = 1001 | 13 = 1101 |
| 2 = 0010 | 6 = 0110 | 10 = 1010 | 14 = 1110 |
| 3 = 0011 | 7 = 0111 | 11 = 1011 | 15 = 1111 |
| 4 = 0100 | 8 = 1000 | 12 = 1100 | 16 = 0001 0000 |
| Keyboard Letter | Binary | Decimal | Hexadecimal |
|---|---|---|---|
| A | 0010 0000 | 32 | 20 |
| B | 0010 0101 | 37 | 25 |
| C | 0010 0011 | 35 | 23 |
| D | 0001 1010 | 26 | 1A |
| E | 0001 0010 | 18 | 12 |
| F | 0001 1011 | 27 | 1B |
| G | 0001 1100 | 28 | 1C |
| H | 0001 1101 | 29 | 1D |
| I | 0001 0110 | 22 | 16 |
| J | 0001 1110 | 30 | 1E |
| K | 0001 1111 | 31 | 1F |
| L | 0000 1110 | 14 | 0E |
| M | 0010 0110 | 38 | 26 |
| N | 0010 1101 | 45 | 2D |
| O | 0001 0111 | 23 | 17 |
| P | 0000 1111 | 15 | 0F |
| Q | 0001 1000 | 24 | 18 |
| R | 0001 0011 | 19 | 13 |
| S | 0001 1001 | 25 | 19 |
| T | 0001 0100 | 20 | 14 |
| U | 0001 0101 | 21 | 15 |
| V | 0010 0100 | 36 | 24 |
| W | 0001 0001 | 17 | 11 |
| X | 0010 0010 | 34 | 22 |
| Y | 0010 1100 | 44 | 2C |
| Z | 0010 0001 | 33 | 21 |
Working with endless daisy chains of 0’s and 1’s would be more than tedious for the human brain—but the computer is really good at it.
The inside of a computer is mainly a series of little electronic gates. 0—the absence of an electrical pulse—leaves the gate open. 1—the presence of an electrical pulse—closes the gate. And remember—the electronic gates in your Odyssey² computer are opening and closing at the rate of 100,000 times every second.
You will enter programs in your Odyssey² through either the hexadecimal or assembler language (these will be explained later). The Odyssey² will then change the data and instruction sets entered into binary language (1’s and 0’s) and store that information in the Memory and in the registers.
The actual computing is done by the computer’s Central Processing Unit (CPU). The CPU in your Odyssey² is composed of the Accumulator (a working register which stores data temporarily); the Program Counter (a working register which locates and identifies the instruction sets and keeps them in order); the Registers (in which data, implemented by the programmer, is stored); the Sub-Routine Return Register (which is used with a certain instruction set); the Arithmetic Logic Unit (ALU); and the Control Unit.
The Control Unit directs the flood of electronic traffic traveling through the computer and controls the data flow between the different components of the computer. For example, it regulates the flow of information between the Memory and Arithmetic Logic sections and also orders processed data to move from the Memory to the Output terminal. The Output terminal of your Odyssey² computer is the screen of your television set.
The Arithmetic Logic Unit is where the computer teaches numbers to tap dance. Its nickname is “number cruncher.” It acts on the binary data fed into the computer’s memory and registers—and then changes them according to the programmed instructions.
Now, you’re ready to learn by doing. You’re going to enter a program into your computer. Open the fold-out at the front of the book and you’ll see what happens to everything along the way.
Important point. The neat thing about computers is that they will always follow your instructions with unflagging good faith. The dumb thing about computers is that they will only do what you have instructed them to do.
It’s very important to make sure that you enter every step and do it right. If you make an error, the computer is going to make an error.
Be sure that the power to your Odyssey² console is turned off. Insert the COMPUTER INTRO cartridge into the console. Be sure the label side is facing the alpha-numeric keyboard. Now, turn on the power.
You’re going to be talking with your Odyssey² computer through the keyboard. It will talk back to you over your television screen.
Let’s take a brief trip around the keyboard. It has forty-eight keys. Each key has been encoded in the computer languages we’re going to be using. You’ll find this code on the gatefold at the front of the book.
The keyboard also contains some surprises—four games that have been pre-programmed in the cartridge.
Press 2 on the alpha-numeric keyboard. A FLASH CARD addition game will appear on your television set. An unsolved addition problem flashes on your screen. You enter the solution through the keyboard. If the answer is less than 10, preface the number with a 0. (Important! Always use the numeral 0 at the top of the keyboard when entering a 0.) If you give a wrong answer, an angry NO will appear on the screen. If you give a correct answer, it will appear in its proper position. To bring another problem to the screen, summon it from the computer by pressing any key.
Adding numbers is no big deal until you see how many addition problems you can solve in one minute. If you keep trying to beat your own record or another player, you can’t help but sharpen your skills.
Press RESET, then press 3 on the alpha-numeric keyboard and you’re into COMPUTER TELEPATHY! It’s a high-low game. The computer secretly chooses a number between 00 and 99. The secret number won’t appear on the screen—but a question mark will. You make a guess at the correct number and enter it into the computer. Your guess will appear on the screen. It will be followed by an H if it is higher than the computer’s secret number—or an L if it is lower. If you guess correctly, the number will be followed by an X. Play against an opponent and see who can guess the computer’s secret number in the fewest number of guesses.
Now, press RESET, then press 4 on the alpha-numeric keyboard. BETWEEN THE SHEETS appears on the screen. You’ll see three sets of numbers. Example: 03 07 00.
The first two numbers are the sheets. The computer has thought of another number which it is keeping to itself. The last number is your score. If you think the computer’s secret number is between 03 and 07, press YES on the alpha-numeric keyboard. If you don’t think it falls between 3 and 7, press NO. If you are correct, you score a point and the number will appear between the 3 and 7. If you are wrong, the computer rewards you with a couple of BEEPS right in the ear and your score remains the same.
Press RESET, then press 1 and a series of blocks appears on the screen. The blocks flash in random order and are accompanied by a buzzing sound. We call this spooky effect “THE CREEPY CRAWLER.” You can call it anything you want.
We can re-program The Creepy Crawler to display other symbols on the screen. There is a large selection of graphics in the memory of your Odyssey². You’ll find the complete collection in the fold-out at the back of the book.
The Creepy Crawler program is quite short and represents a good starting point. We’re going to follow this and succeeding programs with a sort of road map so you can see where your input goes and what the various parts of the computer do with it.
There are two ways you can program your computer. You can speak HEXADECIMAL code (machine language). An instruction would look like this: 60. Your computer takes 60 and converts it into its binary equivalent: 0110 0000. Notice that this binary translation has eight digits. These are called BITS. Bits are handled by the computer in groups of eight. One group is called a BYTE. A byte is the smallest piece of information a computer can work with.
In Odyssey² Hexadecimal language, 60 means “Load a value into Register 0.” (A register is a place where a computer stores information. There are sixteen registers in your Odyssey². Each register has room for one byte of information.)
The second computer language your Odyssey² understands is called ASSEMBLER. Assembler uses alpha-numeric symbols to input binary code instructions. An instruction in Assembler is more phonetic than Hex—but it is also longer.
Example: LDV.0.38 means—Load a value into Register 0—and that value is 38. (Important: Be sure to enter the periods in the assembler instructions or the computer will not know what you’re talking about.)
In the back of the book, you’ll find a complete chart of Instruction Sets for your Odyssey².
INSTRUCTION SETS are the codes that tell your computer what you want it to do with the data you’re going to give it.
Also Important: “0” is the equivalent of zero in the numeric section of your keyboard. “O” is the letter of the alphabet.
Now, open the gatefold at the back of the book. You’ll find a flow chart that tells you how to get into the various operating modes of your Odyssey². These modes are for displaying data in the registers, entering and executing a program, rolling through a program to check data and much more.
Leave the front and back gatefolds open. You’ll have your reference material right in front of you.
We are now ready to re-program the fearsome Creepy Crawler. First, we’ll enter in Hex—and then we’ll do a variation in Assembler.
Press the POWER BUTTON OFF and ON to clear the computer.
Step 00 — Press 60 — This is Op Code for Load Register 0. Register 0 is one of sixteen registers in your Odyssey² that make up part of its Random Access Memory (RAM). Each register is a small memory device that provides temporary storage for data and instructions which will eventually be needed by the ARITHMETIC LOGIC UNIT (ALU)—the place where all simple reasoning and arithmetic operations are performed. Look at the registers in the computer as sixteen in and out boxes on a desk that is shared by both you and the Arithmetic Logic Unit.
Press ENTER — Program Step 01 appears on the screen. Register 0 has now been activated to accept your entry upon execution of the program. (The program steps you enter into the computer do not actually become functional until you press E [EXECUTE] at the completion of the program.)
Step 01 — Press 3A — You have just selected an electronic figure from your computer’s gallery of electronic art and symbols, which are stored in the symbol/sound generator. You’ll find the entire gallery in the fold-out at the back of the book. We’ve selected the little man as an example, but you can actually use any of the figures or symbols for this program. They have been permanently stored in your computer.
There are two parts to the memory unit in your computer. The ROM (Read Only Memory) contains the instruction sets and constants to be used in programming. (The constants may be repetitive numbers needed for mathematical computation by the ALU—Arithmetic Logic Unit, or they may be letters, numbers, or symbols which you have entered into the Odyssey² in a program which will remain the same throughout the program. See the program “Message.”) The other part of the computer’s memory is called RAM (RANDOM ACCESS MEMORY). This memory component is like a blackboard. Programs, instruction sets and constants can be entered and later erased so that new data can be entered. You’re writing this program on the RAM component of the microprocessor in your Odyssey².
Press ENTER — Program step 02 appears on the screen. The little man will be loaded into Register 0.
Step 02 — Press 61 — This is Op Code for LOAD REGISTER 1. It tells your computer you want to give input to that data storage unit.
Press ENTER — Program step 03 appears on the screen—and the door to Register 1 will open to receive data.
Step 03 — Press 0C — This is Op Code for a blank like the space between words in a sentence.
Press ENTER — Program step 04 appears on your screen. The blank will be loaded into Register 1.
Step 04 — Press 6B — This is Op Code for positioning. You are opening the door to Register B and telling it you want it to display the little man at a certain place on the screen upon execution of the program. You’ll let it know where.
Press ENTER — Program step 05 appears. The door to Register B will open.
Step 05 — Press 00 — This entry tells the computer you will want it to display the little man at the furthest left position on the screen.
Press ENTER — Program step 06 appears on your screen. The positioning information will be loaded into Register B.
Register B is the register that positions symbols or characters on the screen. It has been given eleven positions. 00 is the furthest left. 0A is the furthest right. When Register B outputs on the screen, it automatically increments or advances by one. If we output a symbol in 00 (position one), the symbol will appear in the first position and Register B will then advance automatically to position 1 (01). If Register B outputs in the last position (0A), it automatically resets itself back to the first position (00) on the next step. Whatever data was in that first position will be replaced by the new input.
Step 06 — Press C8 — This is the Op Code that tells the computer you are going to want to bring that little man to the screen. You have given him a way to get out of Register B.
Press ENTER — Program Step 07 appears on the screen.
Step 07 — Press C1 — This is Op Code for telling the computer you want to bring that blank in Register 1 to the screen.
Press ENTER — Program step 08 appears on your screen to tell you everything is going along smoothly.
Step 08 — Press 05 — It’s sound effects time. This is an Op Code that tells the computer you will want to hear a one second buzz.
Press ENTER — Program step 09 appears.
Step 09 — Press 08 — This Op Code tells the computer you want it to come up with an unlimited sequence of random numbers. The computers that encipher and decipher secret messages for governments do this everyday. In the old days, crypt keys remained constant and could be broken easily. Today, they change constantly and at random. Today, it takes one computer to break another’s cipher.
Press ENTER — The random number instructions are entered into your computer. Program step 10 appears on the screen.
Step 10 — Press BB — This is Op Code for UNPACK Register B. This is the Register we use to position our little man on the screen. This unpacking instruction takes the random two digit number selected by the Accumulator and places one digit in Register B (we are unpacking Register B, thus the Op Code BB) and the other digit in the Register immediately following B, which is Register C. The digit in Register C is ignored. Another example of unpacking—If we had unpacked Register 0, the Op Code would have been B0, and one digit of the random number would have been placed in Register 0 and the second digit in Register 1.
To look at it another way, think of the Accumulator as a suitcase and the registers as a tall dresser with 16 drawers. You unpack two items from your suitcase and put the first away in a drawer. The second item will automatically go to the drawer just below it.
At the end of the Creepy Crawler program, a variation is written explaining how to use the second digit of the random number which was loaded into Register C, along with numerous figures to execute a random display of figures on the screen.
Through this unpacking instruction, the positioning Register (Register B) is loaded from the Accumulator with a random number. It is this instruction which will cause our little man to travel to unpredictable places on the screen. (The Accumulator is a small memory device in the CPU that provides temporary storage for the Arithmetic Logic Unit. It can store the result of an ALU operation or serve as an operation source [OPERAND] for the ALU.)
Press ENTER — The unpacking instruction is entered and program step 11 appears on your screen.
Step 11 — Press 12 — This Op Code tells your computer you’re going to want it to return to a previously programmed step.
Press ENTER — Program step 12 appears on the screen and the computer wonders which program steps you wish repeated.
Step 12 — Press 06 — You have just told the computer you want it always to go in motions and always return to program step 06. This was the place you wanted the little man positioned on the screen which was subsequently combined with a random number to change the positioning on the screen. In effect, you have now “looped” part of your program. It will do its thing endlessly with endless variations.
Press ENTER — The computer salutes and will do as you ordered. Program step 13 appears.
Press RESET — The program is stored and you are back in the COMMAND mode. “Command” appears on your screen.
Press E — You have instructed the computer to execute your instructions. The fearsome Creepy Crawler appears on your screen. The little man or whatever symbol you have chosen will flash and buzz in different positions on the screen.
Forever.
Or, until you turn it off.
Or, change the program.
Whichever comes first.
Important! The power switch on your console is your program eraser. Turn it off and the program is cleared from the unit automatically. Turn it on—and you’re ready to enter a new program.
Now that you’ve entered Creepy Crawler in HEX, try entering this variation in ASSEMBLER language. We will call this program Creepy Crawler with an All-Star Cast of Thousands.
First, turn the power off and on to erase any previous programming. Now, check the fold-out Operational Flow Chart to see how to get into the Assembler Input Mode.
Press RESET — Press P — Press A — Press I
You are now in the Assembler Mode at program step 00 and ready to go. One thing. Be sure to enter the periods as well as the letters and numbers.
Press L — Press D — Press V — Press . — Press 2 — Press . — Press 3 — Press ENTER
We are now at Program step 02. Continue entering in Assembler until you get to Program step 12, switch over to the HEX Input Mode. Check the Operational Flow Chart and then— Press CLEAR — Press ROLL — Press CLEAR — Press M — Press I
After you finish entering the program, press RESET to store the program—then press E (EXECUTE) and watch what happens!
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 62 13 | LDV.2.13 | 2 | Load Reg. 2 with 13 |
| 01 | 00 | RND | 1 | Accum. selects a random number |
| 02 | BB | UNPB | 1 | Unpack the random number into Reg. B and C |
| 03 | 9C | LDA.C | 1 | Load the Accum. from Reg. C |
| 04 | E2 | ADD.2 | 1 | Add the contents of Reg. 2 to the Accum. |
| 05 | AC | STO.C | 1 | Store the contents of Accum. in Reg. C |
| 06 | 09 | MOV | 1 | Load Accum. from a Program step |
| 07 | 8B | OTA | 1 | Output from Accum. to screen |
| 08 | 05 | SIG | 1 | One second buzz |
| 09 | 09 | NOP | 1 | No operation (used as pause) |
| 10 | 09 | NOP | 1 | No operation (used as pause) |
| 11 | 12 82 | GTO.82 | 2 | Instructs Odyssey² to go to Program step 02 and repeat program |
| (Steps 13–22 require Hex Mode — see page 27. Hex codes for various symbols; equivalents shown at front of book.) | ||||
| 13 | 32 | — | 1 | Hex codes for various symbols. These symbols with their Hex Code equivalents are shown at the front of the book. |
| 14 | 33 | — | 1 | |
| 15 | 3A | — | 1 | |
| 16 | 34 | — | 1 | |
| 17 | 35 | — | 1 | |
| 18 | 3D | — | 1 | |
| 19 | 3E | — | 1 | |
| 20 | 3F | — | 1 | |
| 21 | 36 | — | 1 | |
| 22 | 3C | — | 1 | |
The Roll Mode is for checking a program step to be sure it contains the correct data. It is also for making a change in a program step without having to erase and re-enter an entire program.
To enter the Roll Mode, press R if you are in either the Assembler or HEX input modes. If you are in the EXECUTION mode, press RESET, then P, then M (HEX) or A (ASSEMBLER)—and then press R.
Then, press U to display the program steps upward (00–99)—or press D to display the program steps downward (99–00). The Roll Mode will always display its information in HEX—even if you have been entering in Assembler.
If everything checks out, roll to the last program step entered and press CLEAR to re-enter the Assembler or HEX Input Mode.
If you wish to make a change, press CLEAR at the program step you wish to change. The data will be cleared.
Enter M for HEX or A for Assembler, depending on the code you have been using.
Press I—the program step you wish to change will appear on the screen.
Enter the new data.
Press RESET. You will be back in the COMMAND Mode and are ready to go on with the program.
The following series of programs will be presented with a running commentary that will tell you exactly where the data is going and what is happening to it. These programs are written in HEX code. At the end of each program, you’ll find a summary written in HEX as well as Assembler, so you can enter each program in either language.
This program will add two one digit numbers and display the total. Press the POWER BUTTON off and on to clear the computer.
Step 00 — Press 78 Press ENTER — You have told the computer you are going to input the first number into Register 0.
Step 01 — Press 04 Press ENTER — You instruct the computer to feed the second number of the addition problems into the Accumulator. Remember, the Accumulator provides temporary storage for the ALU where the numbers are going to be crunched.
Step 02 — Press E0 Press ENTER — This instructs the computer to add the contents of Register 0 to the contents of the Accumulator and to store the sum in the Accumulator.
Step 03 — Press B1 Press ENTER — This Op Code is an unpacking instruction. It tells the computer to unpack the sum which has been stored in the Accumulator into Register 1 and Register 2.
Step 04 — Press 6B Press ENTER — This starts a positioning instruction.
Step 05 — Press 00 Press ENTER — This Op Code tells the computer to display subsequent information at the 00 position on your TV screen.
Step 06 — Press C1 Press ENTER — You tell the computer you want to output the information in Register 1 (first digit sum).
Step 07 — Press C2 Press ENTER — You also want to output the data in Register 2 (second digit sum).
Step 08 — Press 12 Press ENTER — This tells the computer you want it always to return to a certain step and repeat the program from that point.
Step 09 — Press 00 Press ENTER — The computer is instructed to return to step 00 and be ready to perform a continuous series of addition problems.
The program is now completed.
Press RESET — The program is now stored in the computer’s memory and you are back in the COMMAND Mode.
Press E — The computer executes your program. A question mark appears on the screen. The computer is asking for two 1 digit numbers to add.
Enter the First Number. Press any digit from 0 through 9. You will hear a beep confirming entry. The number will not appear on the screen. That instruction was not included in this program.
Enter the Second Number. Press any digit 0 through 9 and the sum total of the two entered numbers will immediately appear on the screen.
To enter a new problem, press any single digit number. Then, press the other single digit number.
The previous sum will be replaced by the answer of the new addition problem as soon as you have entered the second number of the new problem.
Important: Remember to get into the proper input mode for the language you are using. Press PMI for HEX. Press PAI for Assembler.
Very Important: Look at Program step 04. It is a two Byte instruction. Remember, in Binary each byte is composed of eight bits. 6B (HEX) = 0110 1011 (BINARY). 00 (HEX) = 0000 0000 (BINARY). Therefore, 6B 00 is a two byte instruction. If you are in the HEX mode, each Byte must be entered separately (Press 6B, Press ENTER, Press 00, Press ENTER). If you are in the Assembler mode, both Bytes are fed into the computer with one entry (LDV.B.00).
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 78 | INP.0 | 1 | Input Reg. 0 with 1st number |
| 01 | 04 | INA | 1 | Input Accum. with 2nd number |
| 02 | E0 | ADD.0 | 1 | Add Reg. 0 to Accum. |
| 03 | B1 | UNP.1 | 1 | Unpack Accum. into Reg. 1 and Reg. 2 |
| 04 | 6B 00 | LDV.B.00 | 2 | Set output position to 00 |
| 06 | C1 | OUT.1 | 1 | Output Reg. 1, 1st digit sum |
| 07 | C2 | OUT.2 | 1 | Output Reg. 2, 2nd digit sum |
| 08 | 12 00 | GTO.00 | 2 | Go to step 00 and repeat |
This program will also add two one digit numbers. However, this time when you enter the second number, the entire problem will appear on the screen. (Example: 2+4=6.) You will be entering + and = signs in this program.
First, press the POWER BUTTON off and on to clear the computer. Then—
Step 00 — Press 78 Press ENTER — You tell the computer the first number will be entered into Register 0.
Step 01 — Press 04 Press ENTER — You tell the computer to accept the second number to the Accumulator.
Step 02 — Press 6B Press ENTER — This starts an output position entry.
Step 03 — Press 00 Press ENTER — The output position is set at 00 at the far left of the screen.
Step 04 — Press C8 Press ENTER — The output channel from Register 0 will open for the first number of the addition problem.
Step 05 — Press 63 Press ENTER — The input channel to Register 3 will open.
Step 06 — Press 10 Press ENTER — 10 will be loaded into Register 3. 10 is Op Code for the (+) sign.
Step 07 — Press C3 Press ENTER — The output channel from Register 3 will open so the (+) sign can be displayed on the screen.
Step 08 — Press 0B Press ENTER — The output channel of the Accumulator will open so that the second number can be displayed on the screen.
Step 09 — Press 63 Press ENTER — The input channel to Register 3 will open.
Step 10 — Press 2B Press ENTER — 2B will be loaded into Register 3. 2B is Op Code for the (=) sign.
Step 11 — Press C3 Press ENTER — The output channel from Register 3 will open so the (=) sign may be displayed on the screen.
Step 12 — Press E0 Press ENTER — This instruction adds the contents of Register 0 to the contents of the Accumulator and stores the result in the Accumulator. Remember, Register 0 contained the first number of the addition problem. The Accumulator held the second number.
Step 13 — Press B1 Press ENTER — This program step unpacks the contents of the Accumulator storing the first digit of the sum in Register 1 and the second digit of the sum in Register 2.
Step 14 — Press C1 Press ENTER — The output channel from Register 1 will open to let the first digit sum be displayed on the screen.
Step 15 — Press C2 Press ENTER — The output channel from Register 2 will open to let the second digit sum be displayed on the screen.
Step 16 — Press 12 Press ENTER — This begins an instruction to return to a previous step.
Step 17 — Press 00 Press ENTER — The computer is instructed to return to step 00 and be ready to
solve a new addition problem. The old problem will not erase from the screen until both digits of the new problem are entered.Press RESET — The program is now stored in the computer.
Press E — The computer is ready to execute the program. A question mark appears on the screen asking for input.
Press any single digit number. Nothing appears on the screen.
Press a second single digit number. The entire problem and the solution appear on the screen. Both will remain there until two new digits are entered.
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 78 | INP.0 | 1 | Input Reg. 0 with 1st number |
| 01 | 04 | INA | 1 | Input Accum. with 2nd number |
| 02 | 6B 00 | LDV.B.00 | 2 | Set output position |
| 04 | C8 | OUT.0 | 1 | Output 1st number from Reg. 0 |
| 05 | 63 10 | LDV.3.10 | 2 | Load Reg. 3 with (+) sign |
| 07 | C3 | OUT.3 | 1 | Out Reg. 3, (+) on screen |
| 08 | 0B | OTA | 1 | Output 2nd number |
| 09 | 63 2B | LDV.3.2B | 2 | Load Reg. 3 with (=) sign |
| 11 | C3 | OUT.3 | 1 | Output (=) sign on screen |
| 12 | E0 | ADD.0 | 1 | Add Reg. 0 to Accum. |
| 13 | B1 | UNP.1 | 1 | Unpack Accum. into Reg. 1 and Reg. 2 |
| 14 | C1 | OUT.1 | 1 | Output Reg. 1, 1st digit sum |
| 15 | C2 | OUT.2 | 1 | Output Reg. 2, 2nd digit sum |
| 16 | 12 00 | GTO.00 | 2 | Go to step 00 and repeat |
After you enter this program a question mark on the screen asks you to press in two one digit numbers for the computer to add. The first number appears on the screen followed by (+) sign. When you press the second number, it appears on the screen followed by a (=) sign and the answer. When the first digit of the next addition problem is entered, the first problem will disappear from the screen. To begin, turn off the power to erase the previous program.
Step 00 — Press 6B Press ENTER — You are setting the output position of Register B.
Press 00 Press ENTER — That output position is 00 at the far left of the screen.
Step 02 — Press 70 Press ENTER — You tell the computer that the first number of the addition problem will be stored in Register 0.
Step 03 — Press C0 Press ENTER — This tells the computer you will want it to output the contents of Register 0.
Step 04 — Press 63 Press ENTER — You are preparing Register 3 to accept data.
Step 05 — Press 10 Press ENTER — Register 3 will be loaded with a 10—the code for a (+) sign. You will find the complete code for all of the graphics stored in your computer on the fold-out at the back of the book.
Step 06 — Press C3 Press ENTER — This will open the way to output the (+) sign from Register 3.
Step 07 — Press 04 Press ENTER — This will open the Accumulator for future input.
Step 08 — Press 0B Press ENTER — The output channel of the Accumulator is set to open.
Step 09 — Press 63 Press ENTER — You want to load a value into Register 3.
Step 10 — Press 2B Press ENTER — That value is 2B—the code for the (=) sign.
Step 11 — Press C3 Press ENTER — This will open the way to output the (=) sign from Register 3.
Step 12 — Press E0 Press ENTER — The computer will then add the contents of Register 0 to the Accumulator. Register 0 has already been instructed to accept the first number in the addition problem (Step 02)—and the Accumulator has been instructed to accept the second number.
Step 13 — Press B1 Press ENTER — This Op Code will unpack the contents of the Accumulator (which contains the sum) into Register 1 and Register 2.
Step 14 — Press C1 Press ENTER — This will open the output channel of Register 1.
Step 15 — Press C2 Press ENTER — This will open the output channel of Register 2.
Step 16 — Press 70 Press ENTER — This input is a pause operation. It tells the computer to leave the first problem on the screen until another problem is entered.
Step 17 — Press 6C Press ENTER — Register C will be opened for loading.
Step 18 — Press 0B Press ENTER — Register C will be loaded with 0B—the Op Code for the decimal number 11, which is exactly the number of positions available on the screen.
Step 19 — Press 67 Press ENTER — Register 7 will be ready for loading.
Step 20 — Press 0C Press ENTER — 0C is Op Code for blank spaces as indicated in the computer graphics section in the fold-out at the back of the book. Register 7 will be loaded with blank spaces. The computer will use these blank spaces to erase the old problem on the screen when the first digit of the new problem is entered.
Step 21 — Press 9C Press ENTER — The Accumulator will be loaded with the contents of Register C—the decimal number 11.
Step 22 — Press 64 Press ENTER — This will open Register 4 to accept data.
Step 23 — Press 00 Press ENTER — Register 4 will be loaded with 00.
Step 24 — Press 02 Press ENTER — The amount in the Accumulator will be decremented (subtracted) by one each time this step is reached.
Step 25 — Press C7 Press ENTER — Register 1 will output its blank spaces.
Step 26 — Press 24 Press ENTER — This is a branch instruction—sort of a fork in the electronic road. The computer is instructed to continue on to the next program step if the number in the Accumulator equals the number in Register 4 (00).
Step 27 — Press 24 Press ENTER — The computer is instructed to return to step 24 if the number in Register 4 is not equal to the Accumulator. Step 24 will decrement the contents of the Accumulator (which originally was 11) by 1 each time until the Accumulator is reset at 00 to match Register 4. Program steps 16 through 27 demonstrate how a computer erases by outputting blank spaces to the screen.
Step 28 — Press 6B Press ENTER — We are resetting Register B to return to its original output position once the Accumulator is equal to Register 4.
Step 29 — Press 00 Press ENTER — The output position of Register B is set at the extreme left position of the screen.
Step 30 — Press 12 Press ENTER — This Op Code instructs the computer to branch to another program step when the amount in the Accumulator equals 00.
Step 31 — Press 03 Press ENTER — The step the computer returns to is 03. Now, you are able to enter and solve repeated addition problems.
Press RESET — The program is stored.
Press E — The program is executed. See the beginning of the program for use instructions.
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 6B 00 | LDV.B.00 | 2 | Set output position to 00 |
| 02 | 70 | INP.0 | 1 | Input 1st number to Reg. 0 |
| 03 | C0 | OUT.0 | 1 | Output Reg. 0 |
| 04 | 63 10 | LDV.3.10 | 2 | Load Reg. 3 with (+) sign |
| 06 | C3 | OUT.3 | 1 | Output (+) sign from Reg. 3 |
| 07 | 04 | INA | 1 | Input Accum. (second number) |
| 08 | 0B | OTA | 1 | Output from Accum. |
| 09 | 63 2B | LDV.3.2B | 2 | Load Reg. 3 with (=) sign |
| 11 | C3 | OUT.3 | 1 | Output (=) sign from Reg. 3 |
| 12 | E0 | ADD.0 | 1 | Add Reg. 0 to Accum. |
| 13 | B1 | UNP.1 | 1 | Unpack Accum. into Reg. 1 and Reg. 2 |
| 14 | C1 | OUT.1 | 1 | Output Reg. 1 |
| 15 | C2 | OUT.2 | 1 | Output Reg. 2 |
| 16 | 70 | INP.0 | 1 | This is used as a pause operation |
| 17 | 6C 0B | LDV.C.0B | 2 | Load Reg. C with Hex 0B (#11) |
| 19 | 67 0C | LDV.7.0C | 2 | Load Reg. 7 with blank spaces |
| 21 | 9C | LDA.C | 1 | Load Accum. from Reg. C |
| 22 | 64 00 | LDV.4.00 | 2 | Load Reg. 4 with 00 |
| 24 | 02 | DEC | 1 | Subtract 1 from Accum. |
| 25 | C7 | OUT.7 | 1 | Output Reg. 7 (blank spaces) |
| 26 | 24 24 | BNE.4.24 | 2 | Branch if Accum. does not = Reg. 4 |
| 28 | 6B 00 | LDV.B.00 | 2 | Set output position to 00 |
| 30 | 12 03 | GTO.03 | 2 | Go to step 03 and repeat |
After you enter this program a question mark will appear on the screen asking for input. The first digit entered is the number you wish to multiply (the multiplicand). It appears on the screen with an (X) sign. The second digit entered is the multiplier. The complete problem will now appear on the screen along with the answer. Odyssey² solves multiplication problems through an addition process. If the problem is 3 × 7, the computer will arrive at the answer by adding 7+7+7. Program steps 00 through 11 are instructions which allow the problem to be displayed on the screen. The mathematical operational sequence begins with step 12.
First, press the POWER BUTTON off and on to erase the previous program.
Step 00 — Press 6B Press ENTER — The output position of Register B is ready for setting.
Step 01 — Press 00 Press ENTER — You set the output of Register B for the far left of the screen.
Step 02 — Press 70 Press ENTER — The multiplicand is directed to be stored in Register 0.
Step 03 — Press C0 Press ENTER — Register 0 is given an output channel.
Step 04 — Press 66 Press ENTER — The door will be opened to Register 6.
Step 05 — Press 29 Press ENTER — An (×) sign will be entered into Register 6.
Step 06 — Press C6 Press ENTER — Register 6 is given an output channel.
Step 07 — Press 71 Press ENTER — The multiplier will be stored into Register 1.
Step 08 — Press C1 Press ENTER — The multiplier is given a way out of Register 1.
Step 09 — Press 67 Press ENTER — The door to Register 7 is instructed to open.
Step 10 — Press 2B Press ENTER — 2B is Op Code for (=). The (=) sign will be loaded into Register 7.
Step 11 — Press C7 Press ENTER — This will provide an output channel for Register 7.
Step 12 — Press 90 Press ENTER — The Accumulator is instructed to be ready to accept data from Register 0. This is the Register that holds the number you want to multiply. The Accumulator will be loaded with the same value as the contents of Register 0—however, Register 0 will continue to retain its data.
Step 13 — Press E0 Press ENTER — The computer is instructed to add the contents of the Accumulator to Register 0. Remember, that Odyssey² multiplies by a series of addition steps. This is the first addition step.
Step 14 — Press A2 Press ENTER — The sum of the digits from the Accumulator and Register 0 will be stored in Register 2.
Step 15 — Press 91 Press ENTER — The Accumulator will be loaded from Register 1 which holds the multiplier. The Accumulator will now know the number of addition steps it must perform to arrive at an answer.
Step 16 — Press 02 Press ENTER — This step will decrement the Accumulator which contains the multiplier by 1 so that the computer can keep track of how many addition steps have been made.
Step 17 — Press A1 Press ENTER — The difference will be stored in Register 1.
Step 18 — Press 63 Press ENTER — The door to Register 3 will open.
Step 19 — Press 01 Press ENTER — 01 will be stored in Register 3. This will give the computer a reference point which will halt the addition process. When the Accumulator contains the contents of Register 1 (the multiplier), it is compared to the contents of Register 3 (which is 01). If the contents in Register 1, which is now in the Accumulator, and Register 3 coincide, the computer will stop adding. If they are not equal, the computer will loop back and continue the addition process.
Step 20 — Press 33 Press ENTER — This starts a branch operation.
Step 21 — Press 25 Press ENTER — The computer is instructed to branch to step 25 if the contents of the Accumulator and Register 3 are equal. In which case, the answer will be unpacked and displayed on the screen.
Step 22 — Press 92 Press ENTER — The Accumulator will be loaded with the information in Register 2, which contains the data fed in Program Step 14.
Step 23 — Press 12 Press ENTER — The computer is instructed to return to a previous step in the program if the conditions in program step 19 have not been met.
Step 24 — Press 13 Press ENTER — The computer is instructed to return to step 13 and once again add the contents of Register 0 to the Accumulator. (Register 0 holds the multiplicand.)
Step 25 — Press 92 Press ENTER — The Accumulator will be loaded with the contents of Register 2 which contains the sum of the addition operations. We are almost at the end of the tunnel. This operation is performed when the contents of the Accumulator and Register 3 are equal.
Step 26 — Press B4 Press ENTER — This is a two digit unpacking operation, which has been explained in Addition Program A.
Step 27 — Press C4 Press ENTER — An output channel for Register 4.
Step 28 — Press C5 Press ENTER — An output channel for Register 5.
Step 29 — Press 12 Press ENTER — You instruct the computer to return to a previous program step.
Step 30 — Press 00 Press ENTER — That step is 00. The computer will now be ready to accept a new multiplication problem.
Press RESET — The program is stored.
Press E — The program is executed.
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 6B 00 | LDV.B.00 | 2 | Set output position |
| 02 | 70 | INP.0 | 1 | Multiplicand stored in Reg. 0 |
| 03 | C0 | OUT.0 | 1 | Output Reg. 0 |
| 04 | 66 29 | LDV.6.29 | 2 | Symbol (×) stored in Reg. 6 |
| 06 | C6 | OUT.6 | 1 | Output Reg. 6; Reg. 6 (×) |
| 07 | 71 | INP.1 | 1 | Multiplier stored in Reg. 1 |
| 08 | C1 | OUT.1 | 1 | Output Multiplier |
| 09 | 67 2B | LDV.7.2B | 2 | Symbol (=) stored in Reg. 7 |
| 11 | C7 | OUT.7 | 1 | Output Reg. 7 |
| 12 | 90 | LDA.0 | 1 | Add Accum. to Reg. 0 |
| 13 | E0 | ADD.0 | 1 | Add Reg. 0 to Accum. |
| 14 | A2 | STO.2 | 1 | Store sum in Reg. 2 |
| 15 | 91 | LDA.1 | 1 | Load Accum. from Reg. 1 |
| 16 | 02 | DEC | 1 | Decrement Accum. by 1 |
| 17 | A1 | STO.1 | 1 | Store difference in Reg. 1 |
| 18 | 63 01 | LDV.3.01 | 2 | Load Reg. 3 with 01 — Reg. 3 |
| 20 | 33 25 | BEQ.3.25 | 2 | Go to step 25 if Accum. = Reg. 3 |
| 22 | 92 | LDA.2 | 1 | Load Accum. from Reg. 2 |
| 23 | 12 13 | GTO.13 | 2 | Go to step 13 |
| 25 | 92 | LDA.2 | 1 | Load Accum. from Reg. 2 |
| 26 | B4 | UNP.4 | 1 | Unpack two digits |
| 27 | C4 | OUT.4 | 1 | Output Reg. 4 |
| 28 | C5 | OUT.5 | 1 | Output Reg. 5 |
| 29 | 12 00 | GTO.00 | 2 | Go to step 00 and repeat |
A question mark will appear on the screen. The first number entered will be the dividend and it will be followed by a (÷) sign. The second number entered will be the divisor. It will appear on the screen along with an (=) sign and the answer. Your Odyssey² computer accomplishes division by a series of subtractions. It’s the Odyssey² multiplication process in reverse.
Note: There are two conditions in division that must be provided. The first condition is when the divisor can be divided into the dividend equally. Example: 6 ÷ 2 = 3. The second condition is when the divisor cannot be divided into the dividend equally and there is a remainder. Example: 9 ÷ 2 = 4 + R. Your Odyssey² has been instructed to display (÷ R) if there is a remainder. This program provides branching instructions to satisfy both conditions.
To begin, turn the POWER BUTTON off and on to erase any previous program.
Step 00 — Press 63 Press ENTER — The door to Register 3 will be opened.
Step 01 — Press 00 Press ENTER — We call this “initialization”—a step to insure that Register 3 is set at absolute zero after each problem is solved. Register 3 will contain the sum of the subtraction operations Odyssey² will perform to find the quotient.
Step 02 — Press 6B Press ENTER — The door to Register B will be opened.
Step 03 — Press 00 Press ENTER — Register B will be positioned to output at the far left of the screen.
Step 04 — Press 70 Press ENTER — The number to be divided (the dividend) will go into Register 0. The dividend must always be larger than the divisor.
Step 05 — Press C0 Press ENTER — The output channel to Register 0 is set to open.
Step 06 — Press 69 Press ENTER — Register 9 will be opened for input.
Step 07 — Press 2A Press ENTER — 2A is Op Code for (÷). The division sign will go into Register 9.
Step 08 — Press C9 Press ENTER — The output channel of Register 9 is set to open.
Step 09 — Press 71 Press ENTER — The divisor will be loaded into Register 1.
Step 10 — Press C1 Press ENTER — The output channel of Register 1 is instructed to open.
Step 11 — Press 6A Press ENTER — The door to Register A will be opened.
Step 12 — Press 2B Press ENTER — 2B is Op Code for (=). The equal sign will go into Register A.
Step 13 — Press CA Press ENTER — The Register A output channel is instructed to open.
Step 14 — Press 91 Press ENTER — The Accumulator will be loaded with the contents of Register 1 which contains the divisor. We are going to use a sample problem so the explanation will be easier (6÷2=3). The Accumulator will be loaded with the divisor (2).
Step 15 — Press D0 Press ENTER — The contents of the Accumulator will be subtracted from the contents of Register 0 which contains the dividend (6).
Step 16 — Press A0 Press ENTER — The difference (6−2=4) between the dividend and the divisor will be stored in Register 0.
Step 17 — Press 93 Press ENTER — The Accumulator will be loaded with the contents of Register 3. This is the Register that was “initialized” at 00 so that we could keep track of the number of times we subtracted.
Step 18 — Press 03 Press ENTER — A 1 will then be added to the Accumulator. This is called an increment.
Step 19 — Press A3 Press ENTER — The sum of the Accumulator is then stored in Register 3. This Register now contains 01.
Step 20 — Press 90 Press ENTER — The Accumulator will be loaded with the contents of Register 0. Register 0 has been loaded with a value of 4, the difference between the dividend and the divisor. This value was loaded into Register 0 in Program step 16.
Step 21 — Press 13 Press ENTER — This will be the start of a branch operation.
Step 22 — Press 40 Press ENTER — The computer will branch to step 40 if the Accumulator equals 0. Once the Accumulator equals 0, the problem is finished and Program step 40 will unpack the answer and it will be displayed on the screen.
Step 23 — Press 91 Press ENTER — If the Accumulator does not equal 0, go to this program step. The Accumulator will be loaded with the contents of Register 1 which contains the divisor (2).
Step 24 — Press 50 Press ENTER — Another branch operation will be started.
Step 25 — Press 28 Press ENTER — The computer will be instructed to branch to program step 28 if Register 0 which contains the dividend (4) is less than the Accumulator which contains the divisor (2) from Register 1.
Step 26 — Press 12 Press ENTER — This tells the computer to return to a previous step if Register 0 is not less than the Accumulator.
Step 27 — Press 15 Press ENTER — This completes the return instructions. The computer is programmed to return to step 15. This step begins the subtraction operations which will continue until Register 0 is loaded into the Accumulator at step 21 and the Accumulator equals 0 in this example. When this condition is met, Odyssey² will loop to Program step 40.
Step 28 — Press 93 Press ENTER — This is the step your computer will branch to if a remainder is included. The branching instructions were given in steps 24 and 25. They programmed the computer to branch to step 28 if Register 0 which contains the dividend is less than the Accumulator which at this point contains the divisor. We will use 9÷2=4+R as our sample problem. All program steps have been the same up to this point. The computer has looped to step 15 several times. Register 0 now contains 01 and the Accumulator contains 02. This step will load the Accumulator from Register 3 which contains the number of times (2) has been subtracted from (9) which is (4).
Step 29 — Press B4 Press ENTER — This instruction will unpack the answer.
Step 30 — Press C4 Press ENTER — The first digit, stored in Register 4, will be displayed on the screen.
Step 31 — Press C5 Press ENTER — The second digit, stored in Register 5, will be displayed on the screen.
Step 32 — Press 66 Press ENTER — Register 6 will open.
Step 33 — Press 10 Press ENTER — 10 will be loaded into Register 6. 10 is the Op Code for (+).
Step 34 — Press 67 Press ENTER — Register 7 will be opened.
Step 35 — Press 13 Press ENTER — 13 will be loaded into Register 7. 13 is the Op Code for (R).
Step 36 — Press C6 Press ENTER — The output channel for the (+) sign will be opened.
Step 37 — Press C7 Press ENTER — The output channel for (R) will open.
Step 38 — Press 12 Press ENTER — The computer is instructed to return to a previous step.
Step 39 — Press 00 Press ENTER — The computer will return to step 00 and be ready to solve another problem.
Our program ends at this point if we have solved a problem that contains a remainder. If not, as in our first example (6÷2=3), we would have jumped from Program step 21 to Program step 40.
Step 40 — Press 93 Press ENTER — The Accumulator will be loaded with the contents of Register 3. It will contain the number of times the divisor has been subtracted from the dividend. In step 21, the computer was programmed to branch to this step when the contents of the Accumulator equaled 0. We were doing 6÷2=3 so Register 3 contains (3)—the number of times (2) has been subtracted from (6).
Step 41 — Press B4 Press ENTER — This unpacking operation will convert the answer from binary into decimal.
Step 42 — Press C4 Press ENTER — The output channel of Register 4 will be opened for the first digit.
Step 43 — Press C5 Press ENTER — The output channel of Register 5 will be opened for the second digit.
Step 44 — Press 66 Press ENTER — Register 6 will open.
Step 45 — Press 0C Press ENTER — Register 6 will be loaded with 0C which is Op Code for a blank space.
Step 46 — Press 67 Press ENTER — Register 7 will open.
Step 47 — Press 0C Press ENTER — Register 7 will be loaded with a blank space. Registers 6 and 7 have been loaded with blanks so that (+R) will not be displayed on the screen when this branch of the program is employed by the computer.
Step 48 — Press C6 Press ENTER — The output channel from Register 6 will open.
Step 49 — Press C7 Press ENTER — The output channel from Register 7 will open.
Step 50 — Press 12 Press ENTER — The computer is instructed to return to a previous step.
Step 51 — Press 00 Press ENTER — The computer is instructed to return to step 00 and be ready to solve another problem.
Press RESET — The program is stored.
Press E — The program is executed.
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 63 00 | LDV.3.00 | 2 | Reg. 3 = 00 (initialization) |
| 02 | 6B 00 | LDV.B.00 | 2 | Reg. B = 00 (positioning) |
| 04 | 70 | INP.0 | 1 | Dividend stored in Reg. 0 |
| 05 | C0 | OUT.0 | 1 | Output Reg. 0 |
| 06 | 69 2A | LDV.9.2A | 2 | Symbol (÷) stored in Reg. 9 |
| 08 | C9 | OUT.9 | 1 | Output Reg. 9 |
| 09 | 71 | INP.1 | 1 | Divisor stored in Reg. 1 |
| 10 | C1 | OUT.1 | 1 | Output Reg. 1 |
| 11 | 6A 2B | LDV.A.2B | 2 | Symbol (=) stored in Reg. A |
| 13 | CA | OUT.A | 1 | Output Reg. A |
| 14 | 91 | LDA.1 | 1 | Load Accum. from Reg. 1 |
| 15 | D0 | SUB.0 | 1 | Sub. Accum. from Reg. 0 |
| 16 | A0 | STO.0 | 1 | Store difference in Reg. 0 |
| 17 | 93 | LDA.3 | 1 | Load Accum. from Reg. 3 |
| 18 | 03 | INC | 1 | Add 1 to the Accum. |
| 19 | A3 | STO.3 | 1 | Store sum in Reg. 3 |
| 20 | 90 | LDA.0 | 1 | Load Accum. from Reg. 0 |
| 21 | 13 40 | BRZ.40 | 2 | Branch to step 40 if Accum. equals 0 |
| 23 | 91 | LDA.1 | 1 | Load Accum. from Reg. 1 |
| 24 | 50 28 | BLS.0.28 | 2 | Branch to step 28 if Reg. 0 is less than Accum. |
| 26 | 12 15 | GTO.15 | 2 | Go to step 15 |
| 28 | 93 | LDA.3 | 1 | Load Accum. from Reg. 3 |
| 29 | B4 | UNP.4 | 1 | Unpack two digits |
| 30 | C4 | OUT.4 | 1 | Output 1st digit which is stored in Reg. 4 |
| 31 | C5 | OUT.5 | 1 | Output 2nd digit which is stored in Reg. 5 |
| 32 | 66 10 | LDV.6.10 | 2 | Symbol (+) stored in Reg. 6 |
| 34 | 67 13 | LDV.7.13 | 2 | Symbol (R) stored in Reg. 7 |
| 36 | C6 | OUT.6 | 1 | Output (+) sign |
| 37 | C7 | OUT.7 | 1 | Output (R) |
| 38 | 12 00 | GTO.00 | 2 | Go to step 00 |
| 40 | 93 | LDA.3 | 1 | Load Accum. from Reg. 3 |
| 41 | B4 | UNP.4 | 1 | Unpack two digits |
| 42 | C4 | OUT.4 | 1 | Output 1st digit from Reg. 4 |
| 43 | C5 | OUT.5 | 1 | Output 2nd digit from Reg. 5 |
| 44 | 66 0C | LDV.6.0C | 2 | A blank is stored in Reg. 6 |
| 46 | 67 0C | LDV.7.0C | 2 | A blank is stored in Reg. 7 |
| 48 | C6 | OUT.6 | 1 | Output blank |
| 49 | C7 | OUT.7 | 1 | Output blank |
| 50 | 12 00 | GTO.00 | 2 | Branch to step 00 |
This program gives you an example of how and when to use the instructions “Go to Subroutine” and “Return.”
A “Go to Subroutine” instruction tells the computer to branch to a specific program step which contains an operation you may wish to use several times in one program. You can use the same operation several times without having to re-write it. When writing a program using this instruction, the next program step after the “Go to Subroutine” instruction must be reserved for returning from the Subroutine.
A program having a “Go to Subroutine” instruction must have a “Return from Subroutine” instruction as well.
After you enter this program, you will be able to find the area of a rectangle or the area of a triangle. First, enter the base measurement—then, enter the height measurement. Press 1 to find the area of a rectangle (Base × Height). Press 2 to find the area of a triangle (Base × Height ÷ 2).
Before entering this program, refer to the program on pages 69 and 70 while we explain how it works.
Program steps 00 through 08 will be the same for both problems.
(00 through 08) Step 08 programs your selection of 1) rectangle area problem, or 2) triangle area problem to be loaded into the Accumulator. First, we’ll see what happens when 1 is loaded into the Accumulator.
(09 and 10) Steps 09 and 10 instruct the computer to branch to Program step 13 if the Accumulator (which contains 01) equals the contents of Register 1 (which is 01). If we had entered a 2, the computer would have proceeded from Program step 08 to Program steps 11 and 12.
(13 and 14) Program steps 13 and 14 instruct the computer to go to step 66 which starts the multiplication subroutine. (Base × Height = Area of Rectangle)
(66) Program step 66 loads the Accumulator with the contents of Register 3 which contains the base (Step 06). We’ll use 8 as our example of the base measurement.
(67) Program step 67 adds the contents of Register 3 (which contains the base measurement of 8 in our example) to the contents of the Accumulator which now also contains 8.
(68) The contents of the Accumulator (8+8=16) are stored in Register 5.
(69) The Accumulator is loaded with the contents of Register 4 which contains the height. We’ll use 3 as our example. This data was entered into Register 4 in Program step 07.
(70) In Program step 70, the Accumulator is decremented by 1. (Remember, in multiplying, the multiplier is decremented by 1 with each addition operation until the multiplier equals 01).
(71) The contents of the Accumulator (now 2) are loaded into Register 4.
(72 through 73) These instructions tell the computer to branch to Program step 77 if the contents of the Accumulator are equal to the contents of Register 1. (Register 1 = 01). This was accomplished in Program step 02.
(74) If the Accumulator does not equal 01 at Program step 72, the Accumulator will move to Program step 75 and be loaded from Register 6 which contains 16.
(75 and 76) Go to step 67. The addition process is repeated until the amount in the Accumulator is equal to the value of Register 1. When this condition is achieved, the computer will branch to Program step 77 as instructed by Program steps 72 and 73.
(77) The Accumulator is loaded from Register 5. (Register 5 now equals 24 which is the answer.)
(78) Program step 78 instructs the computer to return from subroutine.
This returns the computer to program step 15 which unpacks the contents of Register 5.
Program steps 16 and 17 output the answer to the screen.
Program step 18 tells the computer to go to the blanking operation at program step 58.
Program steps 58 through 63 output blank spaces that erase the old problem and make room for a new one.
Program step 64 tells the computer to return to step 00 and get ready to solve a new problem.
Now, we’ll see how this program computes the area of a triangle (Base × Height ÷ 2). For our example, we’ll use 6 as the base and 2 as the height.
This time we will choose 2 (triangle routine) at Program step 08 to load into the Accumulator. Since Program steps 09 and 10 do not apply, the computer will jump to Program step 11.
Program step 11 instructs Odyssey² to branch to program step 20 for the triangle routine.
Program step 20 instructs Odyssey² to branch to step 66 for the multiply routine.
Program steps 66 through 75 perform the addition operations and continue to loop until the Accumulator equals Register 1 (81). Then the Odyssey² branches to step 77.
Program step 77 loads the Accumulator with Register 5, which holds the answer for B × H or 6 × 2 = 12. We must now divide this answer by 2 to find the area of a triangle.
Program step 78 instructs Odyssey² to return to the program step immediately following the subroutine from which it branched originally.
Program step 22—a pause is implemented.
Program step 23 stores Accumulator (which contains 12) in Register 3. This now becomes the dividend.
Program steps 24 and 25 load Register 4 with 02; this becomes the divisor.
Program steps 26 and 27 load Register 7 with 00. This is the initialization operation, since this Register will hold the sum of the subtraction operations. (“Initialization” was first introduced at the beginning of the One Digit Division Program.)
Program step 28 loads Accumulator from Register 4 (which contains the divisor, 2).
Program step 29 subtracts Accumulator from Register 3 (which contains the dividend, 12).
Program step 30 stores the difference (12−2=10) in Register 3; Register 3 = 10.
Program step 31 loads Accumulator from Register 7; Register 7 = 00.
Program step 32 adds one to the Accumulator. Remember, this is done to keep track of the number of times we subtract the divisor from the dividend.
Program step 33 stores sum in Register 7; Register 7 = 01.
Program step 34 loads Accumulator from Register 3; Register 3 = 10, dividend.
Program steps 35 and 36 order a branch to step 54 if Accumulator equals 00.
Program step 37 loads Accumulator from Register 4; Register 4 = 2, divisor.
Program steps 38 and 39 branch to step 42 if Register 3 is less than the Accumulator.
Program step 40. If the Odyssey² has not branched at this point to another step number, this instruction loops the Odyssey² back to Program step 29, so that additional subtraction operations can be performed.
At Program step 35, the computer, after completing the subtraction operations so that the Accumulator and Register 3 (the dividend) equal 00, branches to step 54. At Program step 54, the Accumulator is loaded from Register 7 (which contains the number of times we subtracted the answer). Program step 55 then unpacks this answer and Program steps 56 and 57 output the answer to the screen. Blanks are outputted, since in this example there is no remainder, and at step 64, the Odyssey² is instructed to return to Program step 00 in preparation for a new problem.
*Note: If there had been a remainder, the computer would have branched at Program step 38 to step 42 and when the answer was unpacked and displayed on the screen, a (+R) would also have been displayed.
Now, you’re ready to enter the program into your Odyssey². Be sure to turn the power off and on to erase any previous data.
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 6B 00 | LDV.B.00 | 2 | Reg. B = 00 (Positioning) |
| 02 | 61 01 | LDV.1.01 | 2 | Area of rectangle—select (1) |
| 04 | 62 02 | LDV.2.02 | 2 | Area of triangle—select (2) |
| 06 | 73 | INP.3 | 1 | Input value (base) to Reg. 3 |
| 07 | 74 | INP.4 | 1 | Input value (height) to Reg. 4 |
| 08 | 04 | INA | 1 | Select 1 or 2 |
| 09 | 31 13 | BEQ.1.13 | 2 | Go to rectangle routine |
| 11 | 32 20 | BEQ.2.20 | 2 | Go to triangle routine |
| 13 | 14 66 | GTS.66 | 2 | Go to multiply subroutine |
| 15 | B5 | UNP.5 | 1 | Unpack Reg. 5 and 6 |
| 16 | C5 | OUT.5 | 1 | Output 1st digit |
| 17 | C6 | OUT.6 | 1 | Output 2nd digit |
| 18 | 12 58 | GTO.58 | 2 | Go to blanking operation |
| 20 | 14 66 | GTS.66 | 2 | Go to multiply subroutine |
| 22 | 00 | NOP | 1 | No operation (pause) |
| 23 | A3 | STO.3 | 1 | Store Accum. in Reg. 3 |
| 24 | 64 02 | LDV.4.02 | 2 | Load Reg. 4 with 02 |
| 26 | 67 00 | LDV.7.00 | 2 | Load Reg. 7 with 00 |
| 28 | 94 | LDA.4 | 1 | Load Accum. from Reg. 4 |
| 29 | D3 | SUB.3 | 1 | Subtract Accum. from Reg. 3 |
| 30 | A3 | STO.3 | 1 | Store difference in Reg. 3 |
| 31 | 97 | LDA.7 | 1 | Load Accum. from Reg. 7 |
| 32 | 03 | INC | 1 | Add one to Accum. |
| 33 | A7 | STO.7 | 1 | Store sum in Reg. 7 |
| 34 | 93 | LDA.3 | 1 | Load Accum. from Reg. 3 |
| 35 | 13 54 | BRZ.54 | 2 | Branch to step 54 if A = 0 |
| 37 | 94 | LDA.4 | 1 | Load Accum. from Reg. 4 |
| 38 | 53 42 | BLS.3.42 | 2 | Branch to step 42 if Reg. 3 is less than Accum. |
| 40 | 12 29 | GTO.29 | 2 | Go to step 29 |
| 42 | 97 | LDA.7 | 1 | Load Accum. from Reg. 7 |
| 43 | B8 | UNP.8 | 1 | Unpack Reg. 8 and Reg. 9 |
| 44 | C8 | OUT.8 | 1 | Output 1st digit |
| 45 | C9 | OUT.9 | 1 | Output 2nd digit |
| 46 | 6E 10 | LDV.E.10 | 2 | Load Reg. E with Symbol (+) |
| 48 | 6F 13 | LDV.F.13 | 2 | Load Reg. F with Symbol (R) |
| 50 | CE | OUT.E | 1 | Output (+) |
| 51 | CF | OUT.F | 1 | Output (R) |
| 52 | 12 58 | GTO.58 | 2 | Go to step 58 |
| 54 | 97 | LDA.7 | 1 | Load Accum. from Reg. 7 |
| 55 | B8 | UNP.8 | 1 | Unpack Reg. 8 and Reg. 9 |
| 56 | C8 | OUT.8 | 1 | Output 1st digit |
| 57 | C9 | OUT.9 | 1 | Output 2nd digit |
| 58 | 6E 0C | LDV.E.0C | 2 | Load Reg. E with a blank |
| 60 | 6F 0C | LDV.F.0C | 2 | Load Reg. F with a blank |
| 62 | CE | OUT.E | 1 | Output blank |
| 63 | CF | OUT.F | 1 | Output blank |
| 64 | 12 00 | GTO.00 | 2 | Go to step 00 |
| 66 | 93 | LDA.3 | 1 | Load Accum. from Reg. 3 |
| 67 | E3 | ADD.3 | 1 | Add Reg. 3 to Accum. |
| 68 | A5 | STO.5 | 1 | Store Accum. in Reg. 5 |
| 69 | 94 | LDA.4 | 1 | Load Accum. from Reg. 4 |
| 70 | 02 | DEC | 1 | Decrement Accum. by 1 |
| 71 | A4 | STO.4 | 1 | Store Accum. in Reg. 4 |
| 72 | 31 77 | BEQ.1.77 | 2 | If Accum. = Reg. 1, branch to step 77 |
| 74 | 95 | LDA.5 | 1 | Load Accum. from Reg. 5 |
| 75 | 12 67 | GTO.67 | 2 | Go to step 67 |
| 77 | 95 | LDA.5 | 1 | Load Accum. from Reg. 5 |
| 78 | 07 | RET | 1 | Return to subroutine |
When you enter this program, a Flash Card addition game will appear on your television set. An unsolved addition problem flashes on the screen. You enter the solution through the keyboard. If the answer is less than 10, preface the number with a 0.
This program is different from the Flash Card game which is already programmed in the computer. In this program, the old problem is erased automatically and a new problem is displayed on the screen. There is also a rather interesting reward for entering the correct answer. Program steps 45 through 61 input a computerized musical comedy production number. Program steps 70 through 78 are the rests (pauses) in the melody.
Program step 26 is a packing operation. The data from Register 3 and Register 4 is combined and loaded into the Accumulator.
Program steps 62 through 69 reset Register B to 00 so that it’s ready for the next problem. Program steps 62 through 69 reset Register 3 to 00 so that it’s ready for the next problem.
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 6A 0C | LDV.A.0C | 2 | Load a blank into Reg. A |
| 02 | 68 10 | LDV.8.10 | 2 | Load a (+) sign into Reg. 8 |
| 04 | 69 2B | LDV.9.2B | 2 | Load an (=) sign into Reg. 9 |
| 06 | 6C 2D | LDV.C.2D | 2 | Load (N) into Reg. C |
| 08 | 6D 17 | LDV.D.17 | 2 | Load (O) into Reg. D |
| 10 | 08 | RND | 1 | Load Accum. with random number |
| 11 | B0 | UNP.0 | 1 | Separate digits |
| 12 | 6B 00 | LDV.B.00 | 2 | Set output position |
| 14 | C0 | OUT.0 | 1 | Output first digit |
| 15 | C8 | OUT.8 | 1 | Output (+) sign |
| 16 | C1 | OUT.1 | 1 | Output second digit |
| 17 | 00 | NOP | 1 | A no operation instruction must follow every third output instruction in a row |
| 18 | C9 | OUT.9 | 1 | Output (=) sign |
| 19 | 90 | LDA.0 | 1 | Load Accum. from Reg. 0 |
| 20 | E1 | ADD.1 | 1 | Add Reg. to the Accum. |
| 21 | A2 | STO.2 | 1 | Store sum in Reg. 2 |
| 22 | 73 | INP.3 | 1 | Input first digit guess |
| 23 | C3 | OUT.3 | 1 | Output first digit guess |
| 24 | 74 | INP.4 | 1 | Input second digit guess |
| 25 | C4 | OUT.4 | 1 | Output second digit guess |
| 26 | B3 | PAK.3 | 1 | Combine digits. This is a packing operation. |
| 27 | CA | OUT.A | 1 | Output blank |
| 28 | 32 45 | BEQ.2.45 | 2 | If correct guess…buzz |
| 30 | CC | OUT.C | 1 | Output (N) |
| 31 | CD | OUT.D | 1 | Output (O) |
| 32 | 6B 04 | LDV.B.04 | 2 | Set output position to 04 |
| 34 | 73 | INP.3 | 1 | Input first number of second guess |
| 35 | C3 | OUT.3 | 1 | Output first number |
| 36 | CA | OUT.A | 1 | Output blank |
| 37 | CA | OUT.A | 1 | Output blank |
| 38 | 00 | NOP | 1 | No operation |
| 39 | CA | OUT.A | 1 | Output blank |
| 40 | CA | OUT.A | 1 | Output blank |
| 41 | 6B 00 | LDV.B.00 | 2 | Set position to 00 |
| 43 | CA | OUT.A | 1 | Output blank |
| 44 | 9B | LDA.B | 1 | Load Accum. from Reg. B |
| 45 | 14 70 | GTS.70 | 2 | Buzz |
| 46 | 05 | SIG | 1 | Buzz |
| 47 | 14 70 | GTS.70 | 2 | No sound |
| 48 | 05 | SIG | 1 | Buzz |
| 49 | 14 70 | GTS.70 | 2 | Buzz |
| 50 | 05 | SIG | 1 | Buzz |
| 51 | 14 70 | GTS.70 | 2 | No sound |
| 52 | 05 | SIG | 1 | Buzz |
| 53 | 14 70 | GTS.70 | 2 | No sound |
| 54 | 05 | SIG | 1 | Buzz |
| 55 | 14 70 | GTS.70 | 2 | Buzz |
| 56 | 05 | SIG | 1 | Buzz |
| 57 | 14 70 | GTS.70 | 2 | No sound |
| 58 | 14 70 | GTS.70 | 2 | No sound |
| 59 | 14 70 | GTS.70 | 2 | Buzz |
| 60 | 05 | SIG | 1 | Buzz |
| 61 | 6B 00 | LDV.B.00 | 2 | Set position to 00 |
| 63 | CA | OUT.A | 1 | Output blank |
| 64 | 9B | LDA.B | 1 | Load Accum. from Reg. B |
| 65 | 13 10 | BRZ.10 | 2 | If Accum. = 0, computer branches to step 10 |
| 67 | 12 64 | GTO.64 | 2 | Go to step 64 |
| 69 | 67 00 | LDV.7.00 | 2 | Load Reg. 7 with 00 |
| 71 | 00 | NOP | 1 | No operation |
| 72 | 02 | DEC | 1 | Subtract 1 from Accum. |
| 73 | 27 75 | BNE.7.75 | 2 | Branch if Accum. is not = Reg. 7 which contains 00 |
| 75 | 00 | NOP | 1 | No operation |
| 77 | 27 75 | BNE.7.75 | 2 | Branch if Accum. is not = Reg. 7 which contains 00 |
| 79 | 07 | RET | 1 | Return from subroutine |
These three sample programs are presented to show you the three different instructions which can be used to input and output a letter on the screen.
For the first example, we have chosen to input and display the letter “H” or 1D in HEX Code. With this type of program, whatever is loaded into the register and is outputted to the screen will remain on the screen. You cannot change it. With this program, you could enter a complete message and have it remain on the screen.
The second example uses the instructions “Input to a Register” and “Output from a Register,” but does not designate any particular value. Thus, once the program is entered, any value can be entered and it will be displayed on the screen.
The third example is similar to the second in that any value may be entered, but it is inputted to the Accumulator rather than to a register.
You will note, in all three examples, the last instruction was “Input to a Register” which was used as a pause since no output instruction was indicated, thus only one keyboard depression could be made. Now, try this—using example two or three, program the appropriate instruction sets in order to create a loop so that all 11 positions on the screen may be used. (Hint! Refer back to the addition programs. Check to see how they let you keep entering one problem after another by returning to a previous program step.)
Example A
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 6B 00 | LDV.B.00 | 2 | Positioning |
| 02 | 60 1D | LDV.0.1D | 2 | Load Reg. 0 with H |
| 04 | C0 | OUT.0 | 1 | Output Reg. 0 = H |
| 05 | 71 | INP.1 | 1 | Input to Reg. 1 (used as pause) |
Example B
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 6B 00 | LDV.B.00 | 2 | Positioning |
| 02 | 70 | INP.0 | 1 | Input Reg. 0 |
| 03 | C0 | OUT.0 | 1 | Output Reg. 0 |
| 04 | 71 | INP.1 | 1 | Input Reg. 1 (pause) |
Example C
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 6B 00 | LDV.B.00 | 2 | Positioning |
| 02 | 04 | INA | 1 | Input Accum. |
| 03 | 0B | OTA | 1 | Output Accum. |
| 04 | 71 | INP.1 | 1 | Input Reg. 1 (pause) |
After being entered, this program allows you to enter a six letter word into the Odyssey². Six dots appear on the screen and your opponent enters a letter. If it is used in the word, it appears on the screen in the correct position. If the letter does not appear in the word, nothing happens.
Program step 00 used as a flag or reference position. 01 is loaded into Register 7. 01 was chosen rather than 00 because 01 can only mean the decimal number 1 and nothing else, while 00 can be a number or the instruction “No Operation.”
Program steps 04, 05, and 06 input 1st letter into Register 9, load a dot into Register 1, output Register 1 to screen. This is an initialization process and steps 07 through 27 are the same. This is done so that the six dots appear on the screen when the word is first inputted. Note the Register Use column.
Program steps 28 through 37 position Odyssey² to 00 each time a guess is made and output to the screen either the correct letter guessed or a dot.
Program steps 38 and 39 instruct Odyssey² to return to 00 if Accumulator equals the contents of Register 7. The computer is now ready for a new game. (Note: This is a flag or reference point.)
Program step 40 inputs a guess to the Accumulator. It is compared to each register in Program steps 41 through 52.
Program steps 53 and 54 instruct Odyssey² to go to Program step 71 if a letter in the word is missing.
Program steps 71 and 72 load Register 8 with a dot.
Program step 73 loads the Accumulator from Register 8.
Program steps 74 through 85 instruct Odyssey² to branch to Program step 28 if any register (1 through 6) is equal to the Accumulator (in other words, if the register still remains a dot.)
Program steps 86 and 87 load Register 7 with a 2B (=). This is a flag.*
Program steps 88 and 90 sound the buzz which indicates the word has been displayed correctly.
Program steps 91 and 92 instruct Odyssey² to go to step 28 for positioning. Program steps 28 through 37 display word on screen. Program steps 38 and 39 instruct Odyssey² to return to 00 if Accumulator = Register 7. Program step 00 loads Register with 01 and game continues.
*Note: The 2B (=) sign was used as a flag in this instance; however, any sign could have been used instead.
| Step | Hex Code | Assembler Code | Byte | Remarks | Register/Use |
|---|---|---|---|---|---|
| 00 | 67 01 | LDV.7.01 | 2 | Reg. 7 loaded with reference position (flag) | 01 |
| 02 | 6B 00 | LDV.B.00 | 2 | Positioning | |
| 04 | 79 | INP.9 | 1 | Input 1st letter | 2—1st dot |
| 05 | 61 27 | LDV.1.27 | 2 | Read 1st dot | 3—2nd dot |
| 07 | C1 | OUT.1 | 1 | 1st dot on screen | 4—3rd dot |
| 08 | 7A | INPA | 1 | Input 2nd letter | 5—4th dot |
| 09 | 62 27 | LDV.2.27 | 2 | Read 2nd dot | 6—5th dot |
| 11 | C2 | OUT.2 | 1 | 2nd dot on screen | 7—6th dot (flag) |
| 12 | 7C | INPC | 1 | Input 3rd letter | |
| 13 | 63 27 | LDV.3.27 | 2 | Read 3rd dot | 9—1st letter |
| 15 | C3 | OUT.3 | 1 | 3rd dot on screen | A—2nd letter |
| 16 | 7D | INPD | 1 | Input 4th letter | B—Positioning |
| 17 | 64 27 | LDV.4.27 | 2 | Read 4th dot | C—3rd letter |
| 19 | C4 | OUT.4 | 1 | 4th dot on screen | D—4th letter |
| 20 | 7E | INPE | 1 | Input 5th letter | E—5th letter |
| 21 | 65 27 | LDV.5.27 | 2 | Read 5th dot | F—6th letter |
| 23 | C5 | OUT.5 | 1 | 5th dot on screen | |
| 24 | 7F | INPF | 1 | Input 6th letter | |
| 25 | 66 27 | LDV.6.27 | 2 | Read 6th dot | |
| 27 | C6 | OUT.6 | 1 | 6th dot on screen | |
| 28 | 6B 00 | LDV.B.00 | 2 | Position on screen | |
| 30 | C1 | OUT.1 | 1 | Put dots on screen | |
| 31 | C2 | OUT.2 | 1 | Put dots on screen | |
| 32 | C3 | OUT.3 | 1 | Put dots on screen | |
| 33 | 00 | NOP | 1 | No operation | |
| 34 | C4 | OUT.4 | 1 | Put dots on screen | |
| 35 | C5 | OUT.5 | 1 | Put dots on screen | |
| 36 | C6 | OUT.6 | 1 | Put dots on screen | |
| 37 | 00 | NOP | 1 | No operation | |
| 38 | 37 00 | BEQ.7.00 | 2 | Reset | |
| 40 | 04 | INA | 1 | Input guess to Accum. | |
| 41 | 39 55 | BEQ.9.55 | 2 | Letter in word | |
| 42 | 3A 58 | BEQ.A.58 | 2 | Letter in word | |
| 43 | 3C 61 | BEQ.C.61 | 2 | Letter in word | |
| 45 | 3D 64 | BEQ.D.64 | 2 | Letter in word | |
| 47 | 3E 67 | BEQ.E.67 | 2 | Letter in word | |
| 49 | 3F 70 | BEQ.F.70 | 2 | Letter in word | |
| 51 | 12 71 | GTO.71 | 2 | Wrong guess | |
| 53 | A1 | STO.1 | 1 | 1st letter correct | |
| 54 | 12 43 | GTO.43 | 2 | Check next position | |
| 56 | A2 | STO.2 | 1 | 2nd letter correct | |
| 57 | 12 45 | GTO.45 | 2 | Check next position | |
| 59 | A3 | STO.3 | 1 | 3rd letter correct | |
| 60 | 12 47 | GTO.47 | 2 | Check next position | |
| 62 | A4 | STO.4 | 1 | 4th letter correct | |
| 63 | 12 49 | GTO.49 | 2 | Check next position | |
| 65 | A5 | STO.5 | 1 | 5th letter correct | |
| 66 | 12 51 | GTO.51 | 2 | Check next position | |
| 68 | A6 | STO.6 | 1 | 6th letter correct | |
| 69 | 12 51 | GTO.51 | 2 | Check next position | |
| 71 | 68 27 | LDV.8.27 | 2 | Load Reg. 8 with dot | |
| 73 | 98 | LDA.8 | 1 | Accum. is loaded from Reg. 8 which contains a dot | |
| 74 | 31 28 | BEQ.1.28 | 2 | Position (Step 28) | |
| 76 | 32 28 | BEQ.2.28 | 2 | Position (Step 28) | |
| 78 | 33 28 | BEQ.3.28 | 2 | Position (Step 28) | |
| 80 | 34 28 | BEQ.4.28 | 2 | Position (Step 28) | |
| 82 | 35 28 | BEQ.5.28 | 2 | Position (Step 28) | |
| 84 | 36 28 | BEQ.6.28 | 2 | Position (Step 28) | |
| 86 | 67 2B | LDV.7.2B | 2 | Set flag to (=) | |
| 88 | 97 | LDA.7 | 1 | Accum. loaded from Reg. 7 which contains 01 | |
| 89 | 05 | SIG | 1 | ||
| 90 | 05 | SIG | 1 | ||
| 91 | 12 28 | GTO.28 | 2 | Positioning |
This program gives you a choice of six different messages to display on the screen. By pressing 1, 2, 3, 4, 5, or 6 you can select from the following messages: Hello, Talk A Look, Remarka-ble, New For, Questions, and Come Back.
Before entering this program, there are four new Op Codes to learn.
INA (Op Code 04) means Input to Accumulator. This instruction allows a number to be entered from the keyboard directly into the Accumulator.
ADD.0 (Op Code E0) means Add Register 0 to Accumulator. This instruction adds the contents of Register 0 to the Accumulator.
STO.C (Op Code AC) means Store Accumulator in Register C. This instruction stores the contents of the Accumulator in Register C.
MOV (Op Code 09) means Move. This is a special instruction. It loads the Accumulator with the contents at the program step whose address is in Register C.
To begin, turn the POWER BUTTON off and on to erase any previous program.
Press RESET — You are in the “Command” mode.
Press P — You have entered the “Program” mode.
Press M — “Hex Input” appears on the screen. The computer is ready to accept instructions in Op Code.
Press I — Step 00 appears on the screen, and you are ready to enter the program.
Step 00
Press 60 Press ENTER — The door to Register 0 will be opened.
Step 01
Press 90 Press ENTER — Register 0 will be loaded with 90, the address of the first entry in the location table. The location table begins at program step 90 and contains the starting addresses of each of the six messages.
Step 02
Press 61 Press ENTER — The door to Register 1 will be opened.
Step 03
Press 0C Press ENTER — Register 1 will be loaded with 0C, the Op Code for a blank.
Step 04
Press 04 Press ENTER — INA — the keyboard is activated so a number can be entered directly into the Accumulator.
Step 05
Press E0 Press ENTER — ADD.0 — the contents of Register 0 (90) are added to the Accumulator. If 1 was entered, the Accumulator now contains 91.
Step 06
Press AC Press ENTER — STO.C — the contents of the Accumulator (91) are stored in Register C.
Step 07
Press 09 Press ENTER — MOV — the Accumulator is loaded with the contents at the program step whose address is in Register C (91). The contents at step 91 is 36 (start of message 1). Accumulator is now 36.
Step 08
Press AC Press ENTER — STO.C — the contents of the Accumulator (36) are stored in Register C. Register C now points to the start of the selected message.
Step 09
Press 6B Press ENTER — The door to Register B will be opened.
Step 10
Press 00 Press ENTER — Register B is loaded with 00 (left-side screen positioning).
Step 11
Press 62 Press ENTER — The door to Register 2 will be opened.
Step 12
Press 0B Press ENTER — Register 2 is loaded with 0B (11 decimal) — the number of screen positions.
Step 13
Press 63 Press ENTER — The door to Register 3 will be opened.
Step 14
Press 00 Press ENTER — Register 3 is loaded with 00, used as a reference value in the blanking loop.
Step 15
Press 91 Press ENTER — LDA.1 — the Accumulator is loaded with the blank (0C) from Register 1.
Step 16
Press 0B Press ENTER — OTA — the blank is output to the screen.
Step 17
Press 92 Press ENTER — LDA.2 — the Accumulator is loaded with the countdown value from Register 2.
Step 18
Press 02 Press ENTER — DEC — the Accumulator is decremented by 1.
Step 19
Press A2 Press ENTER — STO.2 — the decremented value is stored back in Register 2.
Step 20
Press 23 Press ENTER — BNE — branch if not equal.
Step 21
Press 15 Press ENTER — Branch to step 15 if the Accumulator does not equal Register 3 (00). This loops until all 11 screen positions are blanked.
Step 22
Press 6B Press ENTER — The door to Register B will be opened again.
Step 23
Press 00 Press ENTER — Register B is repositioned to 00 (left side of screen) for message display.
Step 24
Press 09 Press ENTER — MOV — Register C moves to the next program step and the Accumulator is loaded with the character at that step. (Register C stays in the message data area; the program counter auto-increments by 1 each pass, fetching successive characters.)
Step 25
Press 33 Press ENTER — BEQ — branch if equal.
Step 26
Press 04 Press ENTER — Branch to step 04 if the Accumulator equals 00 (end-of-message sentinel).
Step 27
Press 0B Press ENTER — OTA — the character in the Accumulator is output to the screen.
Step 28
Press 12 Press ENTER — GTO — go to.
Step 29
Press 24 Press ENTER — Go to step 24 to fetch the next character.
Press RESET — The program is stored.
Press E — The program is executed.
| Step | Hex Code | Assembler Code | Byte | Remarks |
|---|---|---|---|---|
| 00 | 60 90 | LDV.0.90 | 2 | Location table address (90) loaded into Reg. 0 |
| 02 | 61 0C | LDV.1.0C | 2 | Blank (0C) loaded into Reg. 1 |
| 04 | 04 | INA | 1 | Press 1, 2, 3, 4, 5, or 6 |
| 05 | E0 | ADD.0 | 1 | Add Reg. 0 to Accumulator |
| 06 | AC | STO.C | 1 | Store Accumulator in Reg. C |
| 07 | 09 | MOV | 1 | Load Accumulator with contents at address in Reg. C |
| 08 | AC | STO.C | 1 | Store message start address in Reg. C |
| 09 | 6B 00 | LDV.B.00 | 2 | Position output to left of screen |
| 11 | 62 0B | LDV.2.0B | 2 | Load Reg. 2 with 11 (screen positions countdown) |
| 13 | 63 00 | LDV.3.00 | 2 | Load Reg. 3 with 00 (reference for BNE) |
| 15 | 91 | LDA.1 | 1 | Load Accumulator from Reg. 1 (blank) |
| 16 | 0B | OTA | 1 | Output blank to screen |
| 17 | 92 | LDA.2 | 1 | Load Accumulator from Reg. 2 (countdown) |
| 18 | 02 | DEC | 1 | Decrement Accumulator by 1 |
| 19 | A2 | STO.2 | 1 | Store decremented value in Reg. 2 |
| 20 | 23 15 | BNE.3.15 | 2 | Loop to step 15 if Accumulator not equal Reg. 3 |
| 22 | 6B 00 | LDV.B.00 | 2 | Reposition Reg. B to left of screen |
| 24 | 09 | MOV | 1 | Load next message character into Accumulator |
| 25 | 33 04 | BEQ.3.04 | 2 | Branch to step 04 if Accumulator equals 00 (end of message) |
| 27 | 0B | OTA | 1 | Output character to screen |
| 28 | 12 24 | GTO.24 | 2 | Go to step 24 for next character |
| 30 | 1D | * | 1 | H |
| 31 | 12 | * | 1 | E |
| 32 | 0E | * | 1 | L |
| 33 | 17 | * | 1 | L |
| 34 | 1F | * | 1 | O |
| 35 | 00 | * | 1 | End of Message 1 (HELLO) |
| 36 | 17 | * | 1 | T |
| 37 | 20 | * | 1 | A |
| 38 | 0E | * | 1 | L |
| 39 | 17 | * | 1 | L |
| 40 | 0C | * | 1 | Blank |
| 41 | 20 | * | 1 | A |
| 42 | 0C | * | 1 | Blank |
| 43 | 0E | * | 1 | L |
| 44 | 17 | * | 1 | L |
| 45 | 1F | * | 1 | O |
| 46 | 12 | * | 1 | K |
| 47 | 00 | * | 1 | End of Message 2 (TAKE A LOOK) |
| 48 | 13 | * | 1 | R |
| 49 | 12 | * | 1 | E |
| 50 | 26 | * | 1 | M |
| 51 | 20 | * | 1 | A |
| 52 | 13 | * | 1 | R |
| 53 | 1F | * | 1 | K |
| 54 | 20 | * | 1 | A |
| 55 | 25 | * | 1 | B |
| 56 | 0E | * | 1 | L |
| 57 | 12 | * | 1 | E |
| 58 | 00 | * | 1 | End of Message 3 (REMARKABLE) |
| 59 | 2D | * | 1 | N |
| 60 | 12 | * | 1 | E |
| 61 | 11 | * | 1 | W |
| 62 | 0C | * | 1 | Blank |
| 63 | 1B | * | 1 | F |
| 64 | 1F | * | 1 | O |
| 65 | 13 | * | 1 | R |
| 66 | 0C | * | 1 | Blank |
| 67 | 00 | * | 1 | End of Message 4 (NEW FOR) |
| 68 | 12 | * | 1 | Q |
| 69 | 18 | * | 1 | U |
| 70 | 12 | * | 1 | E |
| 71 | 15 | * | 1 | S |
| 72 | 19 | * | 1 | T |
| 73 | 16 | * | 1 | I |
| 74 | 1F | * | 1 | O |
| 75 | 2D | * | 1 | N |
| 76 | 15 | * | 1 | S |
| 77 | 0C | * | 1 | Blank |
| 78 | 00 | * | 1 | End of Message 5 (QUESTIONS) |
| 79 | 23 | * | 1 | C |
| 80 | 1F | * | 1 | O |
| 81 | 26 | * | 1 | M |
| 82 | 12 | * | 1 | E |
| 83 | 0C | * | 1 | Blank |
| 84 | 25 | * | 1 | B |
| 85 | 20 | * | 1 | A |
| 86 | 23 | * | 1 | C |
| 87 | 1F | * | 1 | K |
| 88 | 00 | * | 1 | End of Message 6 (COME BACK) |
| 90 | 36 | * | 1 | Location table: start of Message 1 |
| 91 | 36 | * | 1 | Location table: start of Message 1 (selection 1 offset) |
| 92 | 48 | * | 1 | Location table: start of Message 2 |
| 93 | 59 | * | 1 | Location table: start of Message 3 |
| 94 | 6A | * | 1 | Location table: start of Message 4 |
| 95 | 79 | * | 1 | Location table: start of Message 5 |
| 96 | 81 | * | 1 | Location table: start of Message 6 |
Note: When entering single letters and numbers, the Hex Code only is used, since there is no Assembler Code equivalent. An asterisk (*) in the Assembler Code column indicates a data byte with no mnemonic.
You have now had some experience in entering programs and should have some insight into how a computer “thinks.” As you have learned, Odyssey² has 16 registers, each containing 8 bits of information. It has 99 program steps and 11 screen positions. There are blank program sheets in the back of this booklet for your use. As you gain experience you will find it less and less necessary to refer to the programs in this book and will be entering them from memory.
There are eight Operating Modes:
The Command Mode is the mode in which you have access to all other modes.
To enter the Command Mode:
From the Command Mode you may enter the following modes:
The Continue Mode is used to locate problems in a register or program step. To use it:
Note: Only one FF halt statement at a time should be used.
The Display Mode allows you to examine the contents of registers and other internal components.
To enter Display Mode: Press D from Command Mode.
To display contents:
To leave Display Mode: Press CLEAR or RESET.
The Program Mode sets the Odyssey² to accept a program.
To enter Program Mode: Press P from Command Mode.
From Program Mode: press A to enter Assembler Mode, or M to enter Hex Input Mode.
To leave Program Mode: Press RESET (returns to Command Mode).
To enter Assembler Mode: Press A from Program Mode, or press CLEAR from Input Mode.
From Assembler Mode: press I to enter Input Mode, or R to enter Roll Mode.
To leave Assembler Mode: Press CLEAR or RESET.
To enter Hex Input Mode: Press M from Program Mode, or press CLEAR from Input Mode.
From Hex Input Mode: press I to enter Input Mode, or R to enter Roll Mode.
To leave Hex Input Mode: Press CLEAR or RESET.
To enter Input Mode: Press I from Assembler Mode or Hex Input Mode.
In Input Mode: type assembler mnemonics or hexadecimal Op Codes to enter program instructions.
To leave Input Mode: press RESET to return to Command Mode, or press CLEAR to return to Assembler/Hex Input Mode.
To enter Roll Mode: Press R from Assembler Mode or Hex Input Mode.
In Roll Mode: press U to roll up through program steps (00 to 99), or D to roll down (99 to 00).
To leave Roll Mode: Press CLEAR (returns to Assembler or Hex Input Mode).
The following diagram illustrates the logic gate operations the Odyssey² performs when computing 1+1=2. The problem “1+1=?” is entered via the keyboard. The two inputs pass through an Or gate (output: 1) and an And gate (output: 0, the carry bit). The Or gate output (1) and the inverted carry from a Not gate combine in a second And gate to produce binary 10, which equals decimal 2. The Symbol/Sound Generator converts this binary result into the decimal display “1+1=2.”
The functions of these logic gates are called AND, OR and NOT.
This diagram demonstrates how a computer’s logic circuit adds 1 and 1:
This is expressed as 1 and 0 — the binary equivalent of 2.
Computers operate only on binary numbers. A computer can add, subtract, multiply (by adding the same number repeatedly), and divide (by using subtraction and addition). When a computer adds and subtracts binary numbers, there are several rules which it follows:
Binary Addition:
0 + 0 = 0 0 + 1 = 1 1 + 0 = 1 1 + 1 = 0 with a carry of 1
A carry bit is produced from the addition of 1+1. Binary carries are treated in the same way as decimal carries; they are carried to the left.
Example: 9 = 0000 1001
+7 = 0000 0111
16 = 0001 0000
Binary Subtraction:
Example: 10 = 0000 1010 minuend
-5 = 0000 0101 subtrahend
Rule 1: 0000 0101 becomes 1111 1010
Rule 2: 1111 1010
+ 1
1111 1011
Rule 3: 0000 1010
+1111 1011
0000 0101
Listed below are some binary numbers and their decimal equivalents:
1 = 0001 5 = 0101 9 = 1001 13 = 1101 2 = 0010 6 = 0110 10 = 1010 14 = 1110 3 = 0011 7 = 0111 11 = 1011 15 = 1111 4 = 0100 8 = 1000 12 = 1100 16 = 0001 0000
| Instruction | Hex Code | Assembler Code | Byte |
|---|---|---|---|
| Input | |||
| Input to Register | 7R | INP.R | 1 |
| Input to Accumulator | 04 | INA | 1 |
| Output | |||
| Output from Register | CR | OUT.R | 1 |
| Output from Accumulator | 0B | OTA | 1 |
| One second Buzz | 05 | SIG | 1 |
| Change Accumulator Contents | |||
| Set to 0 | 01 | CLR | 1 |
| Subtract 1 | 02 | DEC | 1 |
| Add 1 | 03 | INC | 1 |
| Load with Random No. | 08 | RND | 1 |
| Load from Program Step | 09 | MOV | 1 |
| Combine / Separate | |||
| Combine 2 digits | 8R | PAK.R | 1 |
| Separate 2 digits | BR | UNP.R | 1 |
| Register Operations | |||
| Load from Register | 9R | LDA.R | 1 |
| Subtract from Register | DR | SUB.R | 1 |
| Add Register | ER | ADD.R | 1 |
| Change Register Contents | |||
| Store Accumulator | AR | STO.R | 1 |
| Load A Value | 6RNN | LDV.R.NN | 2 |
| Control Execution Order | |||
| No Operation | 00 | NOP | 1 |
| Halt | FF | HLT | 1 |
| Go to Subroutine | 14NN | GTS.NN | 2 |
| Return from Subroutine | 07 | RET | 1 |
| Branching Decision | |||
| Branch on Decimal Borrow | 10NN | BDB.NN | 2 |
| Branch on Decimal Carry | 11NN | BDC.NN | 2 |
| Branch Unconditionally | 12NN | GTO.NN | 2 |
| Branch if Accum. is 0 | 13NN | BRZ.NN | 2 |
| Branch if Reg. not = Accum. | 2RNN | BVN.R.NN | 2 |
| Branch if Reg. = Accum. | 3RNN | BEQ.R.NN | 2 |
| Branch if Reg. > Accum. | 4RNN | BGT.R.NN | 2 |
| Branch if Reg. < Accum. | 5RNN | BLS.R.NN | 2 |
*The Accumulator contains eight bits of data. The first four are the high order bits and the last four are the low order bits.
[Blank program recording sheets for entering your own programs. Each sheet has columns for: Step, Hex Code, Assembler Code, Byte, Remarks, and Register Use (registers 0–9, A–F).]
This gatefold will provide you with an electronic road map — please keep it open as you work with your Odyssey² computer.
IB3389-1 AJ9406
THE ULTIMATE COMPUTER VIDEO GAME SYSTEM…BY MAGNAVOX
It’s not for everyone — but if you’re up to a rewarding mental challenge, here is a fascinating entry point into a complex and highly technical subject. This cartridge turns your Odyssey² into a very special kind of computer. It won’t balance your checkbook or plot the course of a spaceship to Mars — but it will give you some idea of how those computers do their work. You will learn how computers “think.” You will learn how to enter a program — the first step in learning how to actually write one. Electronic road maps graphically show you where each byte of data goes — and what happens to it. Then, you will actually run the program and see the exciting results on your TV. Shut off the power and the old program is automatically erased so you can enter a new one immediately!
©1979 Magnavox Consumer Electronics Company
Odyssey is a trademark of the Magnavox Company