[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.00,0:00:14.61,Default,,0000,0000,0000,,{\i1}34C3 preroll music{\i0} Dialogue: 0,0:00:14.61,0:00:21.22,Default,,0000,0000,0000,,Herald: The following talk is about a very\Nrelevant piece of technological legacy of Dialogue: 0,0:00:21.22,0:00:27.99,Default,,0000,0000,0000,,our human race. The first piece of\Ncomputer that landed on our moon and Dialogue: 0,0:00:27.99,0:00:33.62,Default,,0000,0000,0000,,actually it became a metric. People\Nstarted to compare other architectures, Dialogue: 0,0:00:33.62,0:00:40.61,Default,,0000,0000,0000,,other computers in volumes of multiples of\Nprocessing speed of this computer. It's Dialogue: 0,0:00:40.61,0:00:46.10,Default,,0000,0000,0000,,rocket science, but it's even harder: it's\Ncomputer rocket science. So I'm very happy Dialogue: 0,0:00:46.10,0:00:50.92,Default,,0000,0000,0000,,to have Christian Hessmann, or Hessie, on\Nstage who is actually a rocket scientist. Dialogue: 0,0:00:50.92,0:00:52.80,Default,,0000,0000,0000,,And for the ...\N{\i1}laughter{\i0} Dialogue: 0,0:00:52.80,0:00:58.25,Default,,0000,0000,0000,,... for the computer part we have Michael\NSteil who is the founder of the Xbox Linux Dialogue: 0,0:00:58.25,0:01:02.67,Default,,0000,0000,0000,,project and has gathered with this project\Nand many others lots and lots of Dialogue: 0,0:01:02.67,0:01:06.52,Default,,0000,0000,0000,,experience around architectures of\Ncomputers. So please give a warm round of Dialogue: 0,0:01:06.52,0:01:09.55,Default,,0000,0000,0000,,applause for the Ultimate\NApollo Guidance talk! Dialogue: 0,0:01:09.55,0:01:18.06,Default,,0000,0000,0000,,{\i1}applause{\i0} Dialogue: 0,0:01:18.06,0:01:22.66,Default,,0000,0000,0000,,Michael Steil: Welcome! Is this on?\NCan you all hear me? Yes. Dialogue: 0,0:01:22.66,0:01:27.14,Default,,0000,0000,0000,,Welcome to the Ultimate Apollo Guidance\NComputer Talk, a.k.a. a comprehensive Dialogue: 0,0:01:27.14,0:01:32.36,Default,,0000,0000,0000,,introduction into computer architecture.\NAnd operating systems. And spaceflight. Dialogue: 0,0:01:32.36,0:01:34.16,Default,,0000,0000,0000,,{\i1}laughter{\i0} Dialogue: 0,0:01:34.16,0:01:37.59,Default,,0000,0000,0000,,My name is Michael Steil ...\NChristian: ... and I'm Christian Hessmann. Dialogue: 0,0:01:37.59,0:01:42.10,Default,,0000,0000,0000,,Michael: This talk is number six in a series\Nby various people. The idea is to explain as Dialogue: 0,0:01:42.10,0:01:46.49,Default,,0000,0000,0000,,much as possible about a classic computer\Nsystem in 60 minutes. The Apollo Guidance Dialogue: 0,0:01:46.49,0:01:50.86,Default,,0000,0000,0000,,Computer AGC is a digital computer that\Nwas designed from scratch specifically for Dialogue: 0,0:01:50.86,0:01:54.58,Default,,0000,0000,0000,,use on board of the Apollo spacecraft to\Nsupport the Apollo moon landings between Dialogue: 0,0:01:54.58,0:02:01.92,Default,,0000,0000,0000,,1969 and 1972. Developed at MIT between\N1961 and 1966 a total of 42 AGCs were Dialogue: 0,0:02:01.92,0:02:06.65,Default,,0000,0000,0000,,built at a cost of about $200,000 each.\NThe base clock is about one megahertz, Dialogue: 0,0:02:06.65,0:02:11.29,Default,,0000,0000,0000,,all data is 15 bits, and there are two\Nkilowords of RAM and 36 kiloword ROM, Dialogue: 0,0:02:11.29,0:02:16.48,Default,,0000,0000,0000,,words of ROM. It's about the size of\Na large suitcase, weighs 32 kilograms and Dialogue: 0,0:02:16.48,0:02:22.13,Default,,0000,0000,0000,,consumes about 55 watts. Its user\Ninterface is a numeric display and keyboard. Dialogue: 0,0:02:22.13,0:02:27.08,Default,,0000,0000,0000,,Some historical context: In the\Nmid 1960s you couldn't just take Dialogue: 0,0:02:27.08,0:02:29.58,Default,,0000,0000,0000,,an off-the-shelf computer and\Nput it into a spacecraft. Dialogue: 0,0:02:29.58,0:02:31.77,Default,,0000,0000,0000,,The first mini computers were\Nthe size of a small fridge - Dialogue: 0,0:02:31.77,0:02:36.32,Default,,0000,0000,0000,,too heavy, to power-hungry and too slow\Nfor real-time scientific calculations, Dialogue: 0,0:02:36.32,0:02:40.04,Default,,0000,0000,0000,,even though the industry had come a long\Nway since the previous decade. Dialogue: 0,0:02:40.04,0:02:43.11,Default,,0000,0000,0000,,Already 10 years later\Nthough, microcomputers with highly Dialogue: 0,0:02:43.11,0:02:46.82,Default,,0000,0000,0000,,integrated circuits started outclassing\Nthe AGC Hardware in many regards. Dialogue: 0,0:02:46.82,0:02:49.96,Default,,0000,0000,0000,,There are many reasons that make the AGC\Nespecially interesting: Dialogue: 0,0:02:51.42,0:02:55.63,Default,,0000,0000,0000,,The architecture is very 60s and feels\Nvery alien to us today, Dialogue: 0,0:02:55.63,0:02:58.06,Default,,0000,0000,0000,,the hardware is very innovative for its time. Dialogue: 0,0:02:58.06,0:03:01.56,Default,,0000,0000,0000,,It has some very interesting\Nand unusual peripherals. Dialogue: 0,0:03:01.56,0:03:04.77,Default,,0000,0000,0000,,Its operating system was revolutionary\Nfor its time and Dialogue: 0,0:03:04.77,0:03:07.88,Default,,0000,0000,0000,,the mission software has all the bits to\N- with the right hardware attached - Dialogue: 0,0:03:07.88,0:03:09.39,Default,,0000,0000,0000,,fly you to the moon. Dialogue: 0,0:03:10.71,0:03:13.36,Default,,0000,0000,0000,,C: In the Apollo program, the Apollo\Nguidance computer was used Dialogue: 0,0:03:13.36,0:03:16.70,Default,,0000,0000,0000,,in two unmanned test missions, where\Nit was remote control from the ground, Dialogue: 0,0:03:16.70,0:03:21.06,Default,,0000,0000,0000,,and three manned test missions, and in\Nthe seven manned landing missions. Dialogue: 0,0:03:21.06,0:03:24.50,Default,,0000,0000,0000,,Astronauts hated the idea of giving up any\Ncontrol to a computer, Dialogue: 0,0:03:24.50,0:03:27.12,Default,,0000,0000,0000,,they wanted to be in charge. \NAnd while as a fallback, Dialogue: 0,0:03:27.12,0:03:29.17,Default,,0000,0000,0000,,most of the mission could also\Nbe flown manually, Dialogue: 0,0:03:29.17,0:03:30.91,Default,,0000,0000,0000,,the mission planners got their way. Dialogue: 0,0:03:30.91,0:03:33.42,Default,,0000,0000,0000,,To understand the purpose\Nand the responsibilities of the Dialogue: 0,0:03:33.42,0:03:36.07,Default,,0000,0000,0000,,Apollo Guidance Computer, we need to\Nfirst look at the Apollo mission. Dialogue: 0,0:03:36.07,0:03:38.98,Default,,0000,0000,0000,,The core strategy of the Apollo program\Nwas, instead of landing Dialogue: 0,0:03:38.98,0:03:42.39,Default,,0000,0000,0000,,the complete spacecraft on the moon,\Nfor which an extremely large rocket Dialogue: 0,0:03:42.39,0:03:45.24,Default,,0000,0000,0000,,would have been required, to only\Nland a much smaller lander Dialogue: 0,0:03:45.24,0:03:48.75,Default,,0000,0000,0000,,while the larger part with the fuel\Nfor the way back stays in orbit. Dialogue: 0,0:03:48.75,0:03:51.87,Default,,0000,0000,0000,,So the Apollo spacecraft can be\Nseparated into the lunar module, Dialogue: 0,0:03:51.87,0:03:56.33,Default,,0000,0000,0000,,the command module and the service module.\NThe Saturn 5 rocket launches it and Dialogue: 0,0:03:56.33,0:03:59.14,Default,,0000,0000,0000,,three astronauts from Cape Kennedy\Ninto Earth orbit. Dialogue: 0,0:03:59.14,0:04:02.97,Default,,0000,0000,0000,,By accelerating at the right time the\Ntranslunar injection moves the spacecraft Dialogue: 0,0:04:02.97,0:04:06.75,Default,,0000,0000,0000,,into a so-called free return orbit,\Nbut just coasting it would travel Dialogue: 0,0:04:06.75,0:04:09.05,Default,,0000,0000,0000,,around the moon and back to earth. Dialogue: 0,0:04:09.05,0:04:11.95,Default,,0000,0000,0000,,Right at the beginning of this three-day journey\Nthe command and service module Dialogue: 0,0:04:11.95,0:04:17.19,Default,,0000,0000,0000,,extracts the lunar module and docks with it.\NBy braking on the far side of the moon the Dialogue: 0,0:04:17.19,0:04:22.35,Default,,0000,0000,0000,,spacecraft enters a lunar orbit. After two\Nof the astronauts have climbed into the Dialogue: 0,0:04:22.35,0:04:26.59,Default,,0000,0000,0000,,lunar module, and after undocking, the\Nlunar module breaks - this is called Dialogue: 0,0:04:26.59,0:04:32.85,Default,,0000,0000,0000,,powered descent - and lands. Dialogue: 0,0:04:32.85,0:04:36.24,Default,,0000,0000,0000,,{\i1}Applause{\i0} Dialogue: 0,0:04:36.24,0:04:40.02,Default,,0000,0000,0000,,After taking off again, the lunar module\Nrendezvous with the command and service Dialogue: 0,0:04:40.02,0:04:43.22,Default,,0000,0000,0000,,module and the two astronauts from the\Nlunar module climb into the command module Dialogue: 0,0:04:43.22,0:04:47.24,Default,,0000,0000,0000,,and the lunar module is jettisoned. The\Nremaining command and service module Dialogue: 0,0:04:47.24,0:04:50.52,Default,,0000,0000,0000,,accelerates at the far side of the\NMoon for trajectory towards Earth. Dialogue: 0,0:04:50.52,0:04:55.01,Default,,0000,0000,0000,,For entry, only the command module remains.\NBy the way, these excellent visualizations Dialogue: 0,0:04:55.01,0:04:58.14,Default,,0000,0000,0000,,are from Jared Owen's "How the Apollo\Nspacecraft works" videos, Dialogue: 0,0:04:58.14,0:05:00.97,Default,,0000,0000,0000,,which we can highly recommend. Dialogue: 0,0:05:00.97,0:05:03.53,Default,,0000,0000,0000,,The command and service\Nmodule and the lunar module each contained Dialogue: 0,0:05:03.53,0:05:07.19,Default,,0000,0000,0000,,one a AGC. It was the same hardware,\Nbut attached to partially different Dialogue: 0,0:05:07.19,0:05:11.04,Default,,0000,0000,0000,,I/O devices, and with the software\Nadapted for the specific spacecraft. Dialogue: 0,0:05:11.04,0:05:15.25,Default,,0000,0000,0000,,The astronauts interact with them through\Nthe display and keyboard units, which are Dialogue: 0,0:05:15.25,0:05:18.87,Default,,0000,0000,0000,,mounted alongside these\Nhundreds of switches. Dialogue: 0,0:05:18.87,0:05:22.59,Default,,0000,0000,0000,,The computer's responsibilities\Nduring the mission are to track Dialogue: 0,0:05:22.59,0:05:26.20,Default,,0000,0000,0000,,the position and speed, the so called\Nstate vector of both spacecraft, Dialogue: 0,0:05:26.20,0:05:30.45,Default,,0000,0000,0000,,stabilize the spacecraft's attitude,\Ncalculate the control engine burns and Dialogue: 0,0:05:30.45,0:05:34.73,Default,,0000,0000,0000,,monitor or control the\NSaturn V during launch. Dialogue: 0,0:05:36.81,0:05:40.28,Default,,0000,0000,0000,,M: In order to understand how the Apollo\Nguidance computer does all this, Dialogue: 0,0:05:40.28,0:05:43.90,Default,,0000,0000,0000,,we'll look at its architecture, the\Nhardware implementation, some of its Dialogue: 0,0:05:43.90,0:05:47.52,Default,,0000,0000,0000,,interesting peripherals, the system\Nsoftware as well as ... Dialogue: 0,0:05:47.52,0:05:50.34,Default,,0000,0000,0000,,the system software as well as\Nthe mission software. Dialogue: 0,0:05:50.34,0:05:55.29,Default,,0000,0000,0000,,The architecture of the\NAGC can be described as a Von Neumann Dialogue: 0,0:05:55.29,0:05:59.37,Default,,0000,0000,0000,,accumulator machine with 15 bit one's\Ncomplement big-endian arithmetic. Dialogue: 0,0:05:59.37,0:06:03.20,Default,,0000,0000,0000,,So we'll talk about the instruction set, the\Narithmetic model and instruction encoding Dialogue: 0,0:06:03.20,0:06:06.69,Default,,0000,0000,0000,,as well as the memory model, I/O\Noperations and counters, and finally the Dialogue: 0,0:06:06.69,0:06:11.74,Default,,0000,0000,0000,,interrupt model. Machine code instruction\Nsets vary widely. The instruction set of a Dialogue: 0,0:06:11.74,0:06:14.30,Default,,0000,0000,0000,,modern ARM processor, which is mainly\Noptimized for runtime performance Dialogue: 0,0:06:14.30,0:06:18.73,Default,,0000,0000,0000,,consists of about 400 instructions. Subleq\Nis a language mostly of academic interest, Dialogue: 0,0:06:18.73,0:06:22.01,Default,,0000,0000,0000,,that shows that a single instruction can\Nbe enough to solve the same problems as Dialogue: 0,0:06:22.01,0:06:25.99,Default,,0000,0000,0000,,all other turing-complete languages. While\Na more complex constructions, that can Dialogue: 0,0:06:25.99,0:06:30.74,Default,,0000,0000,0000,,achieve higher code density and contribute\Nto higher performance, it also generally Dialogue: 0,0:06:30.74,0:06:34.60,Default,,0000,0000,0000,,means that the CPU will be drastically\Nmore complex. A computer from the early Dialogue: 0,0:06:34.60,0:06:38.25,Default,,0000,0000,0000,,1960s consisted of only a few thousand\Ntransistors as opposed to today's Dialogue: 0,0:06:38.25,0:06:42.97,Default,,0000,0000,0000,,billions, which is why this is the sweet\Nspot for the AGC. 36 instructions provided Dialogue: 0,0:06:42.97,0:06:46.79,Default,,0000,0000,0000,,just about the performance that was\Nrequired for the mission. These are the 36 Dialogue: 0,0:06:46.79,0:06:50.77,Default,,0000,0000,0000,,instructions: some load and store\Ninstructions, arithmetic and logic, Dialogue: 0,0:06:50.77,0:06:56.12,Default,,0000,0000,0000,,control flow instructions, I/O instructions\Nand instructions for dealing with interrupts. Dialogue: 0,0:06:56.12,0:06:59.93,Default,,0000,0000,0000,,The memory model is the cornerstone\Nof the instruction set. Memory consists of Dialogue: 0,0:06:59.93,0:07:04.99,Default,,0000,0000,0000,,4096 cells, numbered in hexadecimal\N000 through FFF. Each cell contains a Dialogue: 0,0:07:04.99,0:07:10.71,Default,,0000,0000,0000,,15 bit word, numbered between 0 and\N7FFF. Almost all changes in data - Dialogue: 0,0:07:10.71,0:07:15.96,Default,,0000,0000,0000,,in memory go through a 15 bit accumulator,\Nalso called the A register. A program can Dialogue: 0,0:07:15.96,0:07:19.08,Default,,0000,0000,0000,,copy words between the accumulator and a\Nmemory cell, but also add, subtract, Dialogue: 0,0:07:19.08,0:07:23.34,Default,,0000,0000,0000,,multiply and divide values, as they are\Nmoved around. The data in memory can have Dialogue: 0,0:07:23.34,0:07:26.69,Default,,0000,0000,0000,,many meanings, depending on how it is\Ninterpreted. These values may represent Dialogue: 0,0:07:26.69,0:07:29.74,Default,,0000,0000,0000,,integers, while those three words are\Nmeant to be decoded as machine code Dialogue: 0,0:07:29.74,0:07:33.09,Default,,0000,0000,0000,,instructions. Code and data in a single\Naddress space make the AGC a so-called Von Dialogue: 0,0:07:33.09,0:07:38.14,Default,,0000,0000,0000,,Neumann machine. The CPU's program counter\NPC always holds the address of the Dialogue: 0,0:07:38.14,0:07:42.31,Default,,0000,0000,0000,,instruction to be executed next. The\N'load' instruction copies the contents of Dialogue: 0,0:07:42.31,0:07:46.20,Default,,0000,0000,0000,,a given memory cell into the accumulator.\NThe PC goes on to the next instruction. Dialogue: 0,0:07:46.20,0:07:50.22,Default,,0000,0000,0000,,The 'add' instruction adds contents of a\Ngiven memory cell to the accumulator, and Dialogue: 0,0:07:50.22,0:07:53.16,Default,,0000,0000,0000,,the 'store' instruction copies the value\Nin the accumulator into memory at a given Dialogue: 0,0:07:53.16,0:07:57.83,Default,,0000,0000,0000,,location. The generalized version of these\Ninstructions we just saw, use K as a Dialogue: 0,0:07:57.83,0:08:02.73,Default,,0000,0000,0000,,placeholder for a memory address as an\Nargument. These are cards that are quick Dialogue: 0,0:08:02.73,0:08:08.12,Default,,0000,0000,0000,,reference of instructions. This is the\Ngeneric syntax of the instruction, a short Dialogue: 0,0:08:08.12,0:08:11.46,Default,,0000,0000,0000,,description, the exact operations in\Npseudocode - this one takes a memory Dialogue: 0,0:08:11.46,0:08:15.19,Default,,0000,0000,0000,,address k and adds it to a, the\Naccumulator - the encoding of the Dialogue: 0,0:08:15.19,0:08:19.64,Default,,0000,0000,0000,,instruction in memory, and the number of\Nclock cycles. The original syntax is the Dialogue: 0,0:08:19.64,0:08:22.95,Default,,0000,0000,0000,,name the original designers gave to the\Ninstruction. For this talk I have chosen a Dialogue: 0,0:08:22.95,0:08:27.40,Default,,0000,0000,0000,,more modern syntax, here on the right,\Nwhich makes it much more easier, much Dialogue: 0,0:08:27.40,0:08:30.99,Default,,0000,0000,0000,,easier to describe the CPU both to people\Nwith and without a background in machine Dialogue: 0,0:08:30.99,0:08:34.72,Default,,0000,0000,0000,,programming. Let's have a look at the\Ninstruction set in detail. Here's an Dialogue: 0,0:08:34.72,0:08:39.04,Default,,0000,0000,0000,,example of the load instruction. Load a\Ncomma indirect two zero zero. On the left Dialogue: 0,0:08:39.04,0:08:42.82,Default,,0000,0000,0000,,you see the set of registers of the AGC.\NMost operations work with the accumulator, Dialogue: 0,0:08:42.82,0:08:47.07,Default,,0000,0000,0000,,so we will be ignoring the other registers\Nfor now. While executing this instruction, Dialogue: 0,0:08:47.07,0:08:50.78,Default,,0000,0000,0000,,the CPU looks at memory at location two\Nzero zero, reads its contents and copies Dialogue: 0,0:08:50.78,0:08:55.67,Default,,0000,0000,0000,,it into the accumulator. This is the store\Ninstruction "store", a load indirect two Dialogue: 0,0:08:55.67,0:08:59.01,Default,,0000,0000,0000,,zero zero comma A. Like with all\Ninstructions the first argument is the Dialogue: 0,0:08:59.01,0:09:03.04,Default,,0000,0000,0000,,destination - memory - the second one the\Nsource - the accumulator. It looks up Dialogue: 0,0:09:03.04,0:09:06.49,Default,,0000,0000,0000,,address two zero zero in memory and copies\Nthe contents of the accumulator to that Dialogue: 0,0:09:06.49,0:09:10.11,Default,,0000,0000,0000,,cell. There's also an exchange\Ninstruction which can atomically swap the Dialogue: 0,0:09:10.11,0:09:14.87,Default,,0000,0000,0000,,contents of the accumulator and a memory\Ncell. The 'add' instruction will look up Dialogue: 0,0:09:14.87,0:09:18.33,Default,,0000,0000,0000,,the contents of a given memory address and\Nadd it to the contents of the accumulator Dialogue: 0,0:09:18.33,0:09:23.05,Default,,0000,0000,0000,,and store the result back into the\Naccumulator. And there's a 'subtract' Dialogue: 0,0:09:23.05,0:09:26.59,Default,,0000,0000,0000,,instruction. It takes the contents of\Nmemory dest and subtracts it from the Dialogue: 0,0:09:26.59,0:09:30.72,Default,,0000,0000,0000,,content of the accumulator and stores the\Nresult back into the accumulator. Dialogue: 0,0:09:30.72,0:09:34.14,Default,,0000,0000,0000,,The result of every subtraction can be\Nnegative, so we need to talk about how Dialogue: 0,0:09:34.14,0:09:39.29,Default,,0000,0000,0000,,negative numbers are expressed on the AGC.\NLet's look at just 4 bit numbers. Dialogue: 0,0:09:39.29,0:09:44.86,Default,,0000,0000,0000,,4-bit unsigned integers can express values\Nfrom 0 to 15 with sign and value encoding Dialogue: 0,0:09:44.86,0:09:48.41,Default,,0000,0000,0000,,the uppermost bit corresponds to the sign,\Nand the remaining 3 bits represent the Dialogue: 0,0:09:48.41,0:09:52.87,Default,,0000,0000,0000,,absolute value. Consequently, there are\Nseparate values for plus 0 and minus 0. Dialogue: 0,0:09:52.87,0:09:55.59,Default,,0000,0000,0000,,This encoding is hard to work with, since\Nthe 0 transitions need to be special Dialogue: 0,0:09:55.59,0:09:59.43,Default,,0000,0000,0000,,cased. One's Complement encoding has the\Norder of the negative numbers reversed. Dialogue: 0,0:09:59.43,0:10:03.71,Default,,0000,0000,0000,,The 0 transitions are simpler now, but\Nthere's still two representations of 0. Dialogue: 0,0:10:03.71,0:10:07.39,Default,,0000,0000,0000,,Modern Two's Complement encoding only has\Na single encoding for 0, and it's fully Dialogue: 0,0:10:07.39,0:10:12.18,Default,,0000,0000,0000,,backwards compatible with unsigned\Naddition and subtraction. In the 1960s, Dialogue: 0,0:10:12.18,0:10:15.67,Default,,0000,0000,0000,,computers designed for scientific\Ncalculations are usually One's Complement Dialogue: 0,0:10:15.67,0:10:21.04,Default,,0000,0000,0000,,and so is the AGC. Unsigned four bit\Nnumbers can express values from 0 to 15. Dialogue: 0,0:10:21.04,0:10:25.78,Default,,0000,0000,0000,,In One's Complement the values 0 through 7\Nmatch the unsigned values 0 through 7, and Dialogue: 0,0:10:25.78,0:10:30.32,Default,,0000,0000,0000,,the negative size side is organized like\Nthis: Unlike Two's Complement, the two Dialogue: 0,0:10:30.32,0:10:33.59,Default,,0000,0000,0000,,sides are perfectly symmetrical, so\Nnegating a number is as easy as Dialogue: 0,0:10:33.59,0:10:40.20,Default,,0000,0000,0000,,complementing it, that is, flipping all\Nthe bits. So the two representations of 0 Dialogue: 0,0:10:40.20,0:10:45.83,Default,,0000,0000,0000,,are plus 0, with all 0 bits, and minus 0,\Nwith all 1 bits. Addition in the positive Dialogue: 0,0:10:45.83,0:10:50.18,Default,,0000,0000,0000,,space is equivalent to the unsigned\Nversion, same in the negative space when Dialogue: 0,0:10:50.18,0:10:54.45,Default,,0000,0000,0000,,mapping signed negative numbers to their\Nunsigned counterparts. It gets interesting Dialogue: 0,0:10:54.45,0:11:01.51,Default,,0000,0000,0000,,when we have a 0 transition. Signed 6 - 4\Nis 6 + (-4) which is unsigned 6 + 11, Dialogue: 0,0:11:01.51,0:11:07.97,Default,,0000,0000,0000,,which in modulus 16 is 1. We have a carry.\NIn One's Complement, a carry needs to be Dialogue: 0,0:11:07.97,0:11:11.32,Default,,0000,0000,0000,,added to the end result, so we get two,\Nwhich is correct. The trick to jump over Dialogue: 0,0:11:11.32,0:11:14.17,Default,,0000,0000,0000,,the duplicate 0 on a zero-transition\Nby adding the carries is called Dialogue: 0,0:11:14.17,0:11:16.33,Default,,0000,0000,0000,,the 'end-around-carry'. Dialogue: 0,0:11:16.33,0:11:20.05,Default,,0000,0000,0000,,An overflow means that the signed result\Ndoes not fit into the number space. Dialogue: 0,0:11:20.05,0:11:24.63,Default,,0000,0000,0000,,Signed 7 + 1 would result in signed -7,\Nwhich is incorrect. The same happens Dialogue: 0,0:11:24.63,0:11:28.42,Default,,0000,0000,0000,,when overshooting negative numbers. After\Napplying the end-around carry, the result Dialogue: 0,0:11:28.42,0:11:33.19,Default,,0000,0000,0000,,of signed 7 here is incorrect. The CPU\Ndetects this and flags the result, the Dialogue: 0,0:11:33.19,0:11:37.43,Default,,0000,0000,0000,,accumulator has an extra bit to record the\Ninformation about an overflow, we call it V. Dialogue: 0,0:11:37.43,0:11:44.94,Default,,0000,0000,0000,,So if we have code that reads the value\Nof 7FFF from memory and adds 1, the result Dialogue: 0,0:11:44.94,0:11:49.14,Default,,0000,0000,0000,,is 0 and an overflow is detected, so the\Naccumulator is flagged. The store Dialogue: 0,0:11:49.14,0:11:52.58,Default,,0000,0000,0000,,instruction in addition to writing A to\Nmemory, does extra work if there's an Dialogue: 0,0:11:52.58,0:11:57.88,Default,,0000,0000,0000,,overflow condition: it clears the overflow\Ncondition, writes plus 1 or minus 1 into A, Dialogue: 0,0:11:57.88,0:12:01.97,Default,,0000,0000,0000,,depending on whether it's a positive or\Na negative overflow, and skips the next Dialogue: 0,0:12:01.97,0:12:05.79,Default,,0000,0000,0000,,instruction. This way the program can\Ndetect the overflow and use the plus 1 or Dialogue: 0,0:12:05.79,0:12:10.67,Default,,0000,0000,0000,,minus 1 to apply the signed carry to a\Nhigher-order word. By storing A to memory, Dialogue: 0,0:12:10.67,0:12:15.46,Default,,0000,0000,0000,,we now have a double-word result. In one's\Ncomplement negating a number is as easy Dialogue: 0,0:12:15.46,0:12:19.07,Default,,0000,0000,0000,,as flipping every bit in a word so there's\Na dedicatet instruction for loading and Dialogue: 0,0:12:19.07,0:12:22.16,Default,,0000,0000,0000,,negating a value. ldc, which stands for\N'load complement', reads a word from Dialogue: 0,0:12:22.16,0:12:27.61,Default,,0000,0000,0000,,memory, negates it by inverting all the\Nbits and writes it into the accumulator. Dialogue: 0,0:12:27.61,0:12:31.73,Default,,0000,0000,0000,,Incrementing, that is adding 1 to a word,\Nis such a common operation that there's a Dialogue: 0,0:12:31.73,0:12:35.51,Default,,0000,0000,0000,,dedicated instruction that increments a\Nword in memory in place. There is no Dialogue: 0,0:12:35.51,0:12:38.88,Default,,0000,0000,0000,,corresponding decrement instruction.\NInstead, there are two similar instructions: Dialogue: 0,0:12:38.88,0:12:43.14,Default,,0000,0000,0000,,augment and diminish. The increment\Ninstruction adds one to the original value, Dialogue: 0,0:12:43.14,0:12:46.41,Default,,0000,0000,0000,,the augment instruction adds one\Nto all positive values and Dialogue: 0,0:12:46.41,0:12:51.02,Default,,0000,0000,0000,,subtracts 1 from all negative values.\NEffectively increments the absolute value Dialogue: 0,0:12:51.02,0:12:54.82,Default,,0000,0000,0000,,retaining the sign. The diminish\Ninstruction decrements positive values and Dialogue: 0,0:12:54.82,0:13:00.36,Default,,0000,0000,0000,,increments negative values. Optimized for\Nscientific calculations, the CPU has Dialogue: 0,0:13:00.36,0:13:04.42,Default,,0000,0000,0000,,dedicated multiplication circuitry. The\Nmodel instruction reads a word from memory Dialogue: 0,0:13:04.42,0:13:09.02,Default,,0000,0000,0000,,and multiplies it with the accumulator.\NWhen you multiply two signed 15 bit words, Dialogue: 0,0:13:09.02,0:13:13.14,Default,,0000,0000,0000,,you need up to 29 bits, that is two words,\Nfor the result. The complete result will Dialogue: 0,0:13:13.14,0:13:17.15,Default,,0000,0000,0000,,be written into two registers, the upper\Nhalf into A and the lower half into B. Dialogue: 0,0:13:17.15,0:13:21.42,Default,,0000,0000,0000,,B is a separate 15 bit register which is\Nmostly used together with the accumulator Dialogue: 0,0:13:21.42,0:13:26.54,Default,,0000,0000,0000,,with instructions that deal with 30 bit\Ndata. Double word values are expressed Dialogue: 0,0:13:26.54,0:13:29.71,Default,,0000,0000,0000,,with the uppermost bits in A, or, if in\Nmemory, at lower addresses, and the lower Dialogue: 0,0:13:29.71,0:13:34.30,Default,,0000,0000,0000,,bits in B, or at higher addresses, making\Nthe AGC a big endian machine. Assuming the Dialogue: 0,0:13:34.30,0:13:38.29,Default,,0000,0000,0000,,normalized form, with matching signs, the\Neffective value is the concatenation of Dialogue: 0,0:13:38.29,0:13:42.29,Default,,0000,0000,0000,,the two times 14 bits of the values. Dialogue: 0,0:13:42.29,0:13:45.99,Default,,0000,0000,0000,,Division also works with double words.\NIt takes the combination of Dialogue: 0,0:13:45.99,0:13:49.54,Default,,0000,0000,0000,,the A and B registers as the dividend\Nand a word from memory as the divisor. Dialogue: 0,0:13:49.54,0:13:52.66,Default,,0000,0000,0000,,There are also two results:\Nthe result and the remainder. Dialogue: 0,0:13:52.66,0:13:55.23,Default,,0000,0000,0000,,The result is written into A and\Nthe remainder in to B. Dialogue: 0,0:13:55.23,0:13:59.59,Default,,0000,0000,0000,,Some other instructions also allow\Nusing A and B as a double word register. Dialogue: 0,0:13:59.59,0:14:02.96,Default,,0000,0000,0000,,Load a b comma indirect two zero zero\Nlooks up addresse two zero zero in Dialogue: 0,0:14:02.96,0:14:06.44,Default,,0000,0000,0000,,memory and reads the words at this\Nand the next cell into A and B. Dialogue: 0,0:14:06.44,0:14:09.90,Default,,0000,0000,0000,,The load complement variant does the same\Nbut inverts all bits during the load. Dialogue: 0,0:14:09.90,0:14:12.75,Default,,0000,0000,0000,,There is no instruction to store A and B\Nin a single step, Dialogue: 0,0:14:12.75,0:14:16.15,Default,,0000,0000,0000,,but there is a double word\Nexchange instruction. And finally there's Dialogue: 0,0:14:16.15,0:14:21.08,Default,,0000,0000,0000,,an add instruction that works in double\Nwords. And to load and store just the B Dialogue: 0,0:14:21.08,0:14:26.46,Default,,0000,0000,0000,,register there's an exchange instruction\Nfor that. For working with tables there's Dialogue: 0,0:14:26.46,0:14:29.73,Default,,0000,0000,0000,,the indexed addressing mode. Any\Ninstruction that takes an address as an Dialogue: 0,0:14:29.73,0:14:35.61,Default,,0000,0000,0000,,argument can use it. This example 'load A\Ncomma indirect 7 0 0 plus indirect 8 0' Dialogue: 0,0:14:35.61,0:14:42.52,Default,,0000,0000,0000,,first looks up address 0 8 0, adds it to\Nthe base of 7 0 0, which results in 7 0 2, Dialogue: 0,0:14:42.52,0:14:47.07,Default,,0000,0000,0000,,reads from that address and writes the\Nresult into A. What does this mean? Dialogue: 0,0:14:47.07,0:14:51.40,Default,,0000,0000,0000,,There's a table in memory at 7 0 0. In the\Nexample, it contains multiples of 3, and Dialogue: 0,0:14:51.40,0:14:56.31,Default,,0000,0000,0000,,an index to that table is stored in memory\Nat 0 8 0, which in the example is 2. Dialogue: 0,0:14:56.31,0:15:00.53,Default,,0000,0000,0000,,So we read the entry at index 2 of\Nthe table, which is 6. Dialogue: 0,0:15:00.53,0:15:03.80,Default,,0000,0000,0000,,Without a base address, we get\Nthe syntax in this example: Dialogue: 0,0:15:03.80,0:15:08.32,Default,,0000,0000,0000,,load A comma double indirect 8 0.\NThe base is effectively zero in this case. Dialogue: 0,0:15:08.32,0:15:13.49,Default,,0000,0000,0000,,The CPU will look up the value at 0 8 0\Nin memory, add it to the base of 0, Dialogue: 0,0:15:13.49,0:15:16.99,Default,,0000,0000,0000,,so the value is still the same.\NAnd read from that address. Dialogue: 0,0:15:16.99,0:15:21.48,Default,,0000,0000,0000,,In this case, memory at 0 8 0 effectively\Nstores what C programmers know Dialogue: 0,0:15:21.48,0:15:25.20,Default,,0000,0000,0000,,as a pointer, and 3A0 is the pointer's\Ndifferent destination. Dialogue: 0,0:15:25.20,0:15:28.78,Default,,0000,0000,0000,,The instruction performed it indirectly. Dialogue: 0,0:15:29.60,0:15:32.60,Default,,0000,0000,0000,,By default, instructions are\Nexecuted sequentially. Dialogue: 0,0:15:32.60,0:15:36.25,Default,,0000,0000,0000,,The program counter PC increments as\Ninstructions are executed, always pointing Dialogue: 0,0:15:36.25,0:15:39.95,Default,,0000,0000,0000,,to the next instruction. Control flow\Ninstructions like jump and conditional Dialogue: 0,0:15:39.95,0:15:44.61,Default,,0000,0000,0000,,jump change that. When the CPU hits a jump\Ninstruction, it will load its argument Dialogue: 0,0:15:44.61,0:15:49.08,Default,,0000,0000,0000,,into the program counter, which means that\Nexecution will continue at that address. Dialogue: 0,0:15:49.08,0:15:53.39,Default,,0000,0000,0000,,jz, jump if zero, only jumps if A is zero.\NOtherwise it continues with the next Dialogue: 0,0:15:53.39,0:15:57.63,Default,,0000,0000,0000,,instruction. Similarly, jlez only jumps if\NA is negative or zero. Dialogue: 0,0:15:57.63,0:16:03.45,Default,,0000,0000,0000,,CCS count compare and skip, is a fun one.\NIt's a four-way fork for execution. Dialogue: 0,0:16:03.45,0:16:06.82,Default,,0000,0000,0000,,Depending on whether the value in\Nmemory is positive, negative, Dialogue: 0,0:16:06.82,0:16:11.05,Default,,0000,0000,0000,,plus minus - plus zero, minus zero, it will\Njump to one of the next four instructions. Dialogue: 0,0:16:11.05,0:16:14.21,Default,,0000,0000,0000,,If you know the value is\Npositive or zero, you can ignore Dialogue: 0,0:16:14.21,0:16:16.48,Default,,0000,0000,0000,,the other two cases and just\Nfill the first two slots. Dialogue: 0,0:16:16.48,0:16:20.43,Default,,0000,0000,0000,,And if it's supposed to be only negative,\Nyou have to skip the first two slots. Dialogue: 0,0:16:20.43,0:16:23.88,Default,,0000,0000,0000,,They should never be reached, but\Nit's good practice for them to fill them Dialogue: 0,0:16:23.88,0:16:29.03,Default,,0000,0000,0000,,with error handlers. Since CCS also puts\Nthe absolute diminished value of the Dialogue: 0,0:16:29.03,0:16:34.49,Default,,0000,0000,0000,,memory location into A, so it decrements\NA, a special case of CCS A can be used for Dialogue: 0,0:16:34.49,0:16:38.68,Default,,0000,0000,0000,,loops that count down A. The call\Ninstruction. Isn't it for calling Dialogue: 0,0:16:38.68,0:16:42.61,Default,,0000,0000,0000,,subroutines aka functions. It's like a\Njump instruction but it saves its origin, Dialogue: 0,0:16:42.61,0:16:45.81,Default,,0000,0000,0000,,so the callee can return to it later. For\Nthe call instruction, the program counter Dialogue: 0,0:16:45.81,0:16:49.87,Default,,0000,0000,0000,,is incremented first, and then copied into\Nthe link register LR. Finally, the Dialogue: 0,0:16:49.87,0:16:52.93,Default,,0000,0000,0000,,argument of the call instruction is copied\Ninto the program counter, so that Dialogue: 0,0:16:52.93,0:16:57.44,Default,,0000,0000,0000,,execution continues there. The link\Nregister now contains the return address. Dialogue: 0,0:16:57.44,0:17:00.94,Default,,0000,0000,0000,,At the end of the subroutine, the RET\Ninstruction effectively copies the Dialogue: 0,0:17:00.94,0:17:05.01,Default,,0000,0000,0000,,contents of the linked register into the\Nprogram counter, so execution resumes just Dialogue: 0,0:17:05.01,0:17:08.69,Default,,0000,0000,0000,,after the call instruction.\NIf the subroutine wants to call Dialogue: 0,0:17:08.69,0:17:11.50,Default,,0000,0000,0000,,its own subroutine, the program has to\Nsave the link register before, Dialogue: 0,0:17:11.50,0:17:15.07,Default,,0000,0000,0000,,and restore it afterwards. There's an\Nexchange instruction specifically for this. Dialogue: 0,0:17:15.07,0:17:18.58,Default,,0000,0000,0000,,For additional levels, a stack can be\Nconstructed, manually, Dialogue: 0,0:17:18.58,0:17:20.40,Default,,0000,0000,0000,,using the indexing syntax. Dialogue: 0,0:17:20.40,0:17:24.01,Default,,0000,0000,0000,,So far we've seen the following\Nregisters: the A register is used for Dialogue: 0,0:17:24.01,0:17:27.84,Default,,0000,0000,0000,,memory accesses and all arithmetic. It is\Ncombined with the B register for double Dialogue: 0,0:17:27.84,0:17:31.73,Default,,0000,0000,0000,,width arithmetic, the program counter to\Nkeep track of what to execute and the link Dialogue: 0,0:17:31.73,0:17:34.83,Default,,0000,0000,0000,,register remembers the return address when\Ncalling a subroutine. We haven't seen the Dialogue: 0,0:17:34.83,0:17:38.52,Default,,0000,0000,0000,,zero register yet. It always contains\Nzero, so when we read from it, we get zero Dialogue: 0,0:17:38.52,0:17:42.28,Default,,0000,0000,0000,,and when we write to it the value gets\Ndiscarded. There are three more registers Dialogue: 0,0:17:42.28,0:17:46.33,Default,,0000,0000,0000,,that we will talk about later. The eight\Nregisters are numbered, that is they are Dialogue: 0,0:17:46.33,0:17:50.61,Default,,0000,0000,0000,,assigned memory addresses. This means that\Nthe first eight words in memory are Dialogue: 0,0:17:50.61,0:17:53.94,Default,,0000,0000,0000,,actually occupied by the registers. They\Ncan be accessed using the addresses and Dialogue: 0,0:17:53.94,0:17:57.90,Default,,0000,0000,0000,,all instructions that take a memory\Naddress. This allows for much greater Dialogue: 0,0:17:57.90,0:18:01.56,Default,,0000,0000,0000,,flexibility in the instruction set: we can\Nload A with the contents of the B register Dialogue: 0,0:18:01.56,0:18:05.44,Default,,0000,0000,0000,,by reading the contents of memory at\Nlocation 1 into A. The content of zero can Dialogue: 0,0:18:05.44,0:18:09.69,Default,,0000,0000,0000,,be loaded into A by just reading from\Nmemory at 7, which is the zero register. Dialogue: 0,0:18:09.69,0:18:14.19,Default,,0000,0000,0000,,A can be incremented by incrementing\Nmemory at zero and B can be used as Dialogue: 0,0:18:14.19,0:18:20.50,Default,,0000,0000,0000,,a pointer by reading from double indirect\None. Let's look at memory more closely. Dialogue: 0,0:18:20.50,0:18:26.72,Default,,0000,0000,0000,,Memory is 4096 words and goes from\N000 to FFF. The registers are located at Dialogue: 0,0:18:26.72,0:18:31.14,Default,,0000,0000,0000,,the very bottom of memory. Including them,\Nthere are 1024 words of RAM, Dialogue: 0,0:18:31.14,0:18:35.10,Default,,0000,0000,0000,,random access memory, and\Nthree kilowords of ROM, read-only memory. Dialogue: 0,0:18:35.10,0:18:38.82,Default,,0000,0000,0000,,The AGC was originally architected to\Nonly have this little RAM and ROM, Dialogue: 0,0:18:38.82,0:18:42.22,Default,,0000,0000,0000,,but there's actually more.\NLet's look at the RAM area. Dialogue: 0,0:18:42.22,0:18:45.96,Default,,0000,0000,0000,,The uppermost quarter is banked. The area\Nis a window through which one of eight Dialogue: 0,0:18:45.96,0:18:50.54,Default,,0000,0000,0000,,different banks can be accessed, each 250\Nwords in size. The erasable Bank register Dialogue: 0,0:18:50.54,0:18:56.04,Default,,0000,0000,0000,,EB points to one of these banks. If EB is\N0, Bank 0 is visible in the banked area. Dialogue: 0,0:18:56.04,0:19:01.31,Default,,0000,0000,0000,,If EB is five, bank five is visible.\NAddresses in the fixed area always Dialogue: 0,0:19:01.31,0:19:05.10,Default,,0000,0000,0000,,represent the same RAM cells, but these\Nare not additional cells, but the same as Dialogue: 0,0:19:05.10,0:19:09.03,Default,,0000,0000,0000,,banks zero, one and two. This means that\Nthere's a total of 8 times 256 words of Dialogue: 0,0:19:09.03,0:19:15.69,Default,,0000,0000,0000,,RAM, two kilowords. ROM is organized\Nsimilarly. The lower kiloword is banked. Dialogue: 0,0:19:15.69,0:19:22.28,Default,,0000,0000,0000,,The fixed bank register FB selects one of\Nthe 32 banks. Support for more than 32 Dialogue: 0,0:19:22.28,0:19:26.09,Default,,0000,0000,0000,,kilowords of ROM was added at the last\Nminute. The 'superbank' bit can switch the Dialogue: 0,0:19:26.09,0:19:28.33,Default,,0000,0000,0000,,uppermost eight banks to the second set..\N{\i1}laughter{\i0} Dialogue: 0,0:19:28.33,0:19:32.88,Default,,0000,0000,0000,,so that a total of 40 kilowords are\Nsupported by the architecture. Dialogue: 0,0:19:32.88,0:19:36.80,Default,,0000,0000,0000,,The fixed ROM area will always show the\Nsame contents as two of the ROM banks, the Dialogue: 0,0:19:36.80,0:19:42.17,Default,,0000,0000,0000,,designers chose banks two and three to\Nsimplify address encoding. In practice, Dialogue: 0,0:19:42.17,0:19:46.85,Default,,0000,0000,0000,,fixed ROM contains core operating system\Ncode, and fixed RAM core operating system Dialogue: 0,0:19:46.85,0:19:49.87,Default,,0000,0000,0000,,data, that have to be available at all\Ntimes. The remaining functionality is Dialogue: 0,0:19:49.87,0:19:55.06,Default,,0000,0000,0000,,distributed across the different ROM and\NRAM banks. Switching the RAM Bank can be Dialogue: 0,0:19:55.06,0:19:58.96,Default,,0000,0000,0000,,done by writing through the EB register.\NThis is not a separate instruction but can Dialogue: 0,0:19:58.96,0:20:04.28,Default,,0000,0000,0000,,be expressed by writing A to memory\Nlocation three. If A is five, writing A Dialogue: 0,0:20:04.28,0:20:09.58,Default,,0000,0000,0000,,into EB will make RAM Bank five visible at\N3 0 0. The same store instruction could be Dialogue: 0,0:20:09.58,0:20:13.66,Default,,0000,0000,0000,,used to write to the FB register at memory\Nlocation 4, to switch the ROM Bank. But Dialogue: 0,0:20:13.66,0:20:17.67,Default,,0000,0000,0000,,that wouldn't work for a common case.\NIf code in one bank wants to call code in Dialogue: 0,0:20:17.67,0:20:21.56,Default,,0000,0000,0000,,another Bank, by first switching the\NROM Bank, load FB, and then doing Dialogue: 0,0:20:21.56,0:20:26.06,Default,,0000,0000,0000,,the function call, writing the bank number\Ninto FB will switch out the bank the code Dialogue: 0,0:20:26.06,0:20:29.23,Default,,0000,0000,0000,,is currently running on, so it won't\Nbe able to execute the call instruction. Dialogue: 0,0:20:29.23,0:20:32.01,Default,,0000,0000,0000,,Instead it will continue running some\Ncompletely unrelated code that happens Dialogue: 0,0:20:32.01,0:20:34.11,Default,,0000,0000,0000,,to get the same address on\Nthe other bank. Dialogue: 0,0:20:34.11,0:20:37.22,Default,,0000,0000,0000,,To call code on a different Bank,\NFB and PC registers need Dialogue: 0,0:20:37.22,0:20:41.89,Default,,0000,0000,0000,,to be changed atomically. call f is only a\Nsynonym for the existing double word Dialogue: 0,0:20:41.89,0:20:47.49,Default,,0000,0000,0000,,exchange instruction. Code first has to\Nload the bank and the program counter into Dialogue: 0,0:20:47.49,0:20:55.75,Default,,0000,0000,0000,,A and B. Which then call f can atomically\Nmove into FB and PC. The same exchange Dialogue: 0,0:20:55.75,0:20:59.34,Default,,0000,0000,0000,,instruction can be used for a far return:\Nit moves the original values back into FB Dialogue: 0,0:20:59.34,0:21:06.36,Default,,0000,0000,0000,,and PC. The two Bank registers only hold\Nfive and three bits respectively. The Dialogue: 0,0:21:06.36,0:21:10.66,Default,,0000,0000,0000,,other bits are zero and there's a third\Nbank register, BB, both banks, which Dialogue: 0,0:21:10.66,0:21:15.00,Default,,0000,0000,0000,,merges the information from both other\Nbank registers. The call far both banks Dialogue: 0,0:21:15.00,0:21:18.14,Default,,0000,0000,0000,,synonym is a double word exchange\Ninstruction that updates the program Dialogue: 0,0:21:18.14,0:21:22.77,Default,,0000,0000,0000,,counter and both banks. Subroutines\Nusually have their private variables on Dialogue: 0,0:21:22.77,0:21:26.50,Default,,0000,0000,0000,,particular RAM banks. Call for both banks\Npasses control to a function on the Dialogue: 0,0:21:26.50,0:21:29.87,Default,,0000,0000,0000,,different ROM Bank and also directly\Nswitches RAM banks, so that the callee can Dialogue: 0,0:21:29.87,0:21:33.89,Default,,0000,0000,0000,,immediately access its variables. Return\Nfor both banks returns to the caller, Dialogue: 0,0:21:33.89,0:21:39.16,Default,,0000,0000,0000,,restoring its RAM Bank configuration. The\Nunusual ordering of the bank registers was Dialogue: 0,0:21:39.16,0:21:43.30,Default,,0000,0000,0000,,chosen to allow for a double word exchange\Nof FB and PC, as well as for a double word Dialogue: 0,0:21:43.30,0:21:49.15,Default,,0000,0000,0000,,exchange of PC and BB. Now we've seen all\Neight registers. There's eight more Dialogue: 0,0:21:49.15,0:21:52.21,Default,,0000,0000,0000,,special locations in memory above the\Nregisters, the shadow area, which we'll Dialogue: 0,0:21:52.21,0:21:56.18,Default,,0000,0000,0000,,talk about later. And above those, there\Nare four so-called editing registers, Dialogue: 0,0:21:56.18,0:22:00.03,Default,,0000,0000,0000,,which make up for the missing shift and\Nrotate instructions. When writing a 15 bit Dialogue: 0,0:22:00.03,0:22:05.66,Default,,0000,0000,0000,,value into the ROR editing register, it\Nwill be moved to the right by one bit, and Dialogue: 0,0:22:05.66,0:22:09.67,Default,,0000,0000,0000,,the lowest bit will be cycled to the top.\NThe result can then be read back. Dialogue: 0,0:22:09.67,0:22:17.33,Default,,0000,0000,0000,,ROL rotates left, SHR shifts to the right\Nduplicating the top bit, and SHR7 shifts Dialogue: 0,0:22:17.33,0:22:20.89,Default,,0000,0000,0000,,to the right by 7 bits, filling the top\Nwith zeros. This is needed for the Dialogue: 0,0:22:20.89,0:22:25.76,Default,,0000,0000,0000,,interpreter system software component that\Nwe'll learn about later. We have seen that Dialogue: 0,0:22:25.76,0:22:29.67,Default,,0000,0000,0000,,the CPU is connected to RAM and ROM over\Nthe memory bus, but computers also talk to Dialogue: 0,0:22:29.67,0:22:34.58,Default,,0000,0000,0000,,peripheral devices that is the I/O bus.\NWe've already seen the address space for Dialogue: 0,0:22:34.58,0:22:39.53,Default,,0000,0000,0000,,memory; there is a second address space\Nto talk to devices. There are 512 I/O Dialogue: 0,0:22:39.53,0:22:44.55,Default,,0000,0000,0000,,channels numbered 000 through FFF. Each\Nchannel is 15 bits, and the in and out Dialogue: 0,0:22:44.55,0:22:48.98,Default,,0000,0000,0000,,instructions can read words from -, and\Nwrite words to I/O channels. For many Dialogue: 0,0:22:48.98,0:22:53.69,Default,,0000,0000,0000,,devices, a channel contains 15 individual\Ncontrol bits. A control bit can for Dialogue: 0,0:22:53.69,0:22:58.64,Default,,0000,0000,0000,,example toggle a lamp on a display. The\N'out OR' instruction sets individual bits, Dialogue: 0,0:22:58.64,0:23:03.58,Default,,0000,0000,0000,,and 'out AND' clears individual bits. So\NI/O instructions can work on the whole Dialogue: 0,0:23:03.58,0:23:10.40,Default,,0000,0000,0000,,word or do boolean operations on them:\NAND, OR and XOR. To make boolean Dialogue: 0,0:23:10.40,0:23:15.32,Default,,0000,0000,0000,,operations also usable between registers,\Nchannels 1 and 2 are actually aliases of Dialogue: 0,0:23:15.32,0:23:21.86,Default,,0000,0000,0000,,the B and LR registers, which allows for\Nthese instructions. For AND there's also a Dialogue: 0,0:23:21.86,0:23:27.30,Default,,0000,0000,0000,,dedicated instruction that works on A and\Nmemory. After the registers, the shadow Dialogue: 0,0:23:27.30,0:23:31.91,Default,,0000,0000,0000,,area, and the editing registers, there's\Nanother special area: the counters. Like Dialogue: 0,0:23:31.91,0:23:36.09,Default,,0000,0000,0000,,I/O channels, they connect to external\Ndevices but they don't send bits or hold Dialogue: 0,0:23:36.09,0:23:39.96,Default,,0000,0000,0000,,words back and forth, instead they are\Ncontrolled by hardware pulses, or cause Dialogue: 0,0:23:39.96,0:23:44.63,Default,,0000,0000,0000,,hardware pulses. On every pulse, TIME1\Ngets incremented for example, while other Dialogue: 0,0:23:44.63,0:23:51.22,Default,,0000,0000,0000,,counters take the number stored into them\Nby code and count down, generating pulses. Dialogue: 0,0:23:51.22,0:23:55.19,Default,,0000,0000,0000,,When I/O devices need to signal the CPU,\Nthay can interrupt normal execution. Dialogue: 0,0:23:55.19,0:23:58.51,Default,,0000,0000,0000,,Next to the program counter, which points\Nto the next instruction, there's the Dialogue: 0,0:23:58.51,0:24:02.52,Default,,0000,0000,0000,,instruction register which holds the\Ncurrent opcode. When an interrupt happens, Dialogue: 0,0:24:02.52,0:24:08.57,Default,,0000,0000,0000,,the CPU copies PC into a special memory\Nlocation PC' and IR into IR' and then Dialogue: 0,0:24:08.57,0:24:12.34,Default,,0000,0000,0000,,jumps to a magic location depending on the\Ntype of interrupt, in this example 814. Dialogue: 0,0:24:12.34,0:24:16.06,Default,,0000,0000,0000,,When the interrupt handlers finished\Nservicing the device the iret instruction Dialogue: 0,0:24:16.06,0:24:20.53,Default,,0000,0000,0000,,will copy PC' and IR' back into PC and IR,\Nso execution will continue at the original Dialogue: 0,0:24:20.53,0:24:26.69,Default,,0000,0000,0000,,location. Memory locations eight through\Nhex F are shadows of the eight registers. Dialogue: 0,0:24:26.69,0:24:30.36,Default,,0000,0000,0000,,PC and IR are automatically saved by\Ninterrupts and the remaining registers Dialogue: 0,0:24:30.36,0:24:35.33,Default,,0000,0000,0000,,need to be saved by software if necessary.\NThe overflow condition flag cannot be Dialogue: 0,0:24:35.33,0:24:40.12,Default,,0000,0000,0000,,saved or restored, so while there's an\Noverflow condition until the next store Dialogue: 0,0:24:40.12,0:24:44.02,Default,,0000,0000,0000,,instruction, which resolves the offload,\Ninterrupts will be disabled. Dialogue: 0,0:24:44.02,0:24:49.96,Default,,0000,0000,0000,,The 11 interrupt handlers have to reside\Nin fixed ROM starting at 8 0 0. Dialogue: 0,0:24:49.96,0:24:54.61,Default,,0000,0000,0000,,There are 4 words for each entry.\NTypical interrupt entry code saves A and B, Dialogue: 0,0:24:54.61,0:25:00.32,Default,,0000,0000,0000,,loads A and B with a bank and PC of the\Nactual handler and jumps there. Dialogue: 0,0:25:00.32,0:25:04.16,Default,,0000,0000,0000,,Interrupt 0 is special: it's the\Nentry point on reset. Dialogue: 0,0:25:04.16,0:25:07.80,Default,,0000,0000,0000,,Next we will enter the interrupt return\Ninstruction, there's an instruction Dialogue: 0,0:25:07.80,0:25:11.02,Default,,0000,0000,0000,,to cause an interrupt in software,\Nand instructions to enable and Dialogue: 0,0:25:11.02,0:25:15.96,Default,,0000,0000,0000,,disable interrupts globally. There is one\Nmore special memory location at hex 37, Dialogue: 0,0:25:15.96,0:25:20.83,Default,,0000,0000,0000,,the watchdog. This location needs to be\Nread from or - read from or written to - Dialogue: 0,0:25:20.83,0:25:23.94,Default,,0000,0000,0000,,at least every 0.64 seconds\Notherwise the hardware will decide the Dialogue: 0,0:25:23.94,0:25:29.54,Default,,0000,0000,0000,,system software is unresponsive and cause\Na reset. Now we've seen an instruction set Dialogue: 0,0:25:29.54,0:25:33.04,Default,,0000,0000,0000,,and in the examples we've seen the codes\Nthat represent instructions in memory. Dialogue: 0,0:25:33.04,0:25:37.07,Default,,0000,0000,0000,,Let's look at how the encoding works. The\Nload instruction, the upper three bits are Dialogue: 0,0:25:37.07,0:25:41.79,Default,,0000,0000,0000,,the opcode representing the load a and the\Nremaining 12 bits encode the address. Dialogue: 0,0:25:41.79,0:25:44.61,Default,,0000,0000,0000,,This allows for a total of eight\Ninstructions but there are more Dialogue: 0,0:25:44.61,0:25:48.57,Default,,0000,0000,0000,,than eight instructions. RAM addresses\Nalways start with zero zero and Dialogue: 0,0:25:48.57,0:25:53.56,Default,,0000,0000,0000,,ROM adresses start with anything but\Nzero zero. So the store instruction, Dialogue: 0,0:25:53.56,0:25:57.10,Default,,0000,0000,0000,,which only makes sense on RAM, only\Nneeds to encode 10 address bits instead Dialogue: 0,0:25:57.10,0:26:02.62,Default,,0000,0000,0000,,of 12, making room for another\Nthree RAM-only instructions. Dialogue: 0,0:26:02.62,0:26:05.54,Default,,0000,0000,0000,,The same is true for the increment\Ninstruction, which makes room for Dialogue: 0,0:26:05.54,0:26:10.31,Default,,0000,0000,0000,,three more, as well as CCS which shares\Nan opcode with jump, which only works Dialogue: 0,0:26:10.31,0:26:15.78,Default,,0000,0000,0000,,on ROM addresses. Since jumps to the\Nbank register don't make much sense Dialogue: 0,0:26:15.78,0:26:21.31,Default,,0000,0000,0000,,these codes are used to encode STI, CLI\Nand extend. Extend is a prefix. Dialogue: 0,0:26:21.31,0:26:23.57,Default,,0000,0000,0000,,It changes the meaning of the opcode\Nof the next instruction ... Dialogue: 0,0:26:23.57,0:26:28.39,Default,,0000,0000,0000,,{\i1}laughter{\i0} ... allowing for a\Nsecond set of two-word instructions. Dialogue: 0,0:26:28.39,0:26:33.99,Default,,0000,0000,0000,,There's one more special call instruction\N'call 2' which is 'call LR', Dialogue: 0,0:26:33.99,0:26:37.51,Default,,0000,0000,0000,,which is the return instruction. But\Nthe CPU doesn't special case this one. Dialogue: 0,0:26:37.51,0:26:42.01,Default,,0000,0000,0000,,Return is a side-effect of calling memory\Nat location 2. It executes the instruction Dialogue: 0,0:26:42.01,0:26:45.96,Default,,0000,0000,0000,,encoded in the LR register, the 12 bit\Naddress with the leading zeros decodes Dialogue: 0,0:26:45.96,0:26:52.20,Default,,0000,0000,0000,,into another call instruction which\Ntransfers control to the return address. Dialogue: 0,0:26:52.20,0:26:56.93,Default,,0000,0000,0000,,Indexed addressing is achieved by using\Nthe index prefix. An indexed instruction Dialogue: 0,0:26:56.93,0:27:00.48,Default,,0000,0000,0000,,consists of two instruction words, index\Nand the base instruction. The addressing Dialogue: 0,0:27:00.48,0:27:03.69,Default,,0000,0000,0000,,code in the base instruction is the base\Naddress and the index instruction encodes Dialogue: 0,0:27:03.69,0:27:08.81,Default,,0000,0000,0000,,the address of the index. Index is an\Nactual instruction. The CPU reads from the Dialogue: 0,0:27:08.81,0:27:14.55,Default,,0000,0000,0000,,given address, 0 8 0 in the example, then\Nadds its value, 3, to the instruction code Dialogue: 0,0:27:14.55,0:27:19.83,Default,,0000,0000,0000,,of the following instruction 3 7 0 0 which\Nis stored in the internal IR register. Dialogue: 0,0:27:19.83,0:27:23.98,Default,,0000,0000,0000,,Then it uses the resulting instruction\Ncode 3 7 0 3 for the next instruction, Dialogue: 0,0:27:23.98,0:27:29.88,Default,,0000,0000,0000,,which is a load from 703, the effective\Naddress. If an interrupt occurs after in Dialogue: 0,0:27:29.88,0:27:33.20,Default,,0000,0000,0000,,the index instruction, that is no problem\Nbecause IR contains the effective Dialogue: 0,0:27:33.20,0:27:36.34,Default,,0000,0000,0000,,instruction code which will be saved into\NIR Prime and restored at the end of the Dialogue: 0,0:27:36.34,0:27:40.49,Default,,0000,0000,0000,,interrupt handler. Finally there's one\Nindex encoding with a special meaning. Dialogue: 0,0:27:40.49,0:27:42.95,Default,,0000,0000,0000,,When the address looks like it's\Nreferencing the shadow instruction Dialogue: 0,0:27:42.95,0:27:47.06,Default,,0000,0000,0000,,register it's an interrupt return\Ninstruction. Looking at the instruction Dialogue: 0,0:27:47.06,0:27:50.23,Default,,0000,0000,0000,,set architecture as a whole, there are\Nmany quirky and unusual features when Dialogue: 0,0:27:50.23,0:27:53.47,Default,,0000,0000,0000,,compared to modern architectures. It uses\NOne's Complement instead of Two's Dialogue: 0,0:27:53.47,0:27:57.81,Default,,0000,0000,0000,,Complement; it has no status register; the\Noverflow flag can't even be saved so Dialogue: 0,0:27:57.81,0:28:01.90,Default,,0000,0000,0000,,interrupts are disabled until the overflow\Nis resolved; the store instruction may Dialogue: 0,0:28:01.90,0:28:06.61,Default,,0000,0000,0000,,skip a word under certain circumstances;\Nthe ccs destruction can skip several words Dialogue: 0,0:28:06.61,0:28:11.05,Default,,0000,0000,0000,,and can be outright dangerous if the\Ninstructions following it use prefixes; Dialogue: 0,0:28:11.05,0:28:14.38,Default,,0000,0000,0000,,there are no shift or rotate instructions\Nbut magic memory locations that shift and Dialogue: 0,0:28:14.38,0:28:18.89,Default,,0000,0000,0000,,rotate when writing into them; most\Nboolean instructions only work on I/O Dialogue: 0,0:28:18.89,0:28:23.04,Default,,0000,0000,0000,,channels; indexing is done by hacking the\Nfollowing instruction code, and the Dialogue: 0,0:28:23.04,0:28:28.40,Default,,0000,0000,0000,,architecture has no concept of a stack,\Nindexing has to be used if one is needed. Dialogue: 0,0:28:28.40,0:28:32.93,Default,,0000,0000,0000,,This was the architecture of the Apollo\Nguidance computer, now let's look at how Dialogue: 0,0:28:32.93,0:28:36.46,Default,,0000,0000,0000,,this architecture is implemented in\Nhardware. The hardware implementation runs Dialogue: 0,0:28:36.46,0:28:40.32,Default,,0000,0000,0000,,at one megahertz, is micro coded and uses\Nintegrated circuits, core memory, and core Dialogue: 0,0:28:40.32,0:28:43.31,Default,,0000,0000,0000,,rope memory. We'll look at the block\Ndiagram and how instructions are Dialogue: 0,0:28:43.31,0:28:46.100,Default,,0000,0000,0000,,implemented in micro code, and then about\Nhow the schematics map to integrated Dialogue: 0,0:28:46.100,0:28:52.89,Default,,0000,0000,0000,,circuits on modules on trays. This\Nsimplified block diagram shows the AGC at Dialogue: 0,0:28:52.89,0:28:57.19,Default,,0000,0000,0000,,the hardware level. Each box contains on\Nthe order of 500 logic gates. The dotted Dialogue: 0,0:28:57.19,0:29:01.34,Default,,0000,0000,0000,,lines are wires that to move a single bit\Nof information, the solid lines are 15 Dialogue: 0,0:29:01.34,0:29:07.05,Default,,0000,0000,0000,,wires that move a data word. These units\Ndeal with timing and control, and these Dialogue: 0,0:29:07.05,0:29:11.37,Default,,0000,0000,0000,,are the central units. The central\Nregister unit stores A, B, link registers, Dialogue: 0,0:29:11.37,0:29:16.41,Default,,0000,0000,0000,,and program counter, and the arithmetic\Nunit can add and subtract numbers. The Dialogue: 0,0:29:16.41,0:29:22.09,Default,,0000,0000,0000,,memory components deal with RAM and ROM.\NThe main clock of about one megahertz Dialogue: 0,0:29:22.09,0:29:25.45,Default,,0000,0000,0000,,feeds into the sequence generator which\Nkeeps cycling through twelve stages, which Dialogue: 0,0:29:25.45,0:29:31.34,Default,,0000,0000,0000,,is one memory cycle, MCT. Instructions\Nusually take as many memory cycles as they Dialogue: 0,0:29:31.34,0:29:35.90,Default,,0000,0000,0000,,need memory accesses, so load, add, and\Nstore take two cycles, and jump takes one. Dialogue: 0,0:29:35.90,0:29:39.52,Default,,0000,0000,0000,,The sequence generator contains a\Ncollection of 12 step micro programs for Dialogue: 0,0:29:39.52,0:29:44.69,Default,,0000,0000,0000,,each MCT, for each instruction, like this\None for the load instruction. In each Dialogue: 0,0:29:44.69,0:29:51.74,Default,,0000,0000,0000,,step, the entries send control pulses to\Nthe other units, which are connected Dialogue: 0,0:29:51.74,0:29:57.06,Default,,0000,0000,0000,,through the write bus. The control signal\NWA for example instructs the register unit Dialogue: 0,0:29:57.06,0:30:01.40,Default,,0000,0000,0000,,to put the contents of A onto the write\Nbus, and RA makes it read the value on the Dialogue: 0,0:30:01.40,0:30:06.63,Default,,0000,0000,0000,,bus into A. Memory is also connected to\Nthe write bus. WS will copy the bus Dialogue: 0,0:30:06.63,0:30:10.35,Default,,0000,0000,0000,,contents into the memory address register,\Nand RG and WG will read and write the G Dialogue: 0,0:30:10.35,0:30:15.72,Default,,0000,0000,0000,,register, which buffers the cells value\Nafter read and before a write. So in stage Dialogue: 0,0:30:15.72,0:30:24.63,Default,,0000,0000,0000,,7 for example RG puts the memory buffer\Nonto the bus, and WB writes the bus Dialogue: 0,0:30:24.63,0:30:30.00,Default,,0000,0000,0000,,contents into the temporary G register.\NAnd in T10, B gets put on the bus and it Dialogue: 0,0:30:30.00,0:30:33.90,Default,,0000,0000,0000,,gets read into the A register. At the\Nbeginning of every memory cycle the Dialogue: 0,0:30:33.90,0:30:37.86,Default,,0000,0000,0000,,hardware sends the memory address S,\Nusually what's encoded instruction, to Dialogue: 0,0:30:37.86,0:30:42.33,Default,,0000,0000,0000,,memory and copies the contents of that\Naddress into G. in the second half of the Dialogue: 0,0:30:42.33,0:30:47.100,Default,,0000,0000,0000,,MCT it stores G back into the same cell.\NSo if we show memory timing next to the Dialogue: 0,0:30:47.100,0:30:50.44,Default,,0000,0000,0000,,microcode, as well as the pseudocode\Nversion of the load instruction which is Dialogue: 0,0:30:50.44,0:30:55.47,Default,,0000,0000,0000,,easier to read, we can see it loads the\Nvalue from memory into G copies it into B Dialogue: 0,0:30:55.47,0:30:59.05,Default,,0000,0000,0000,,and then copies it into A. More\Ninteresting is the exchange instruction. Dialogue: 0,0:30:59.05,0:31:05.52,Default,,0000,0000,0000,,It saves A to B, reads memory into G,\Ncopies the result into A, copies the old Dialogue: 0,0:31:05.52,0:31:11.21,Default,,0000,0000,0000,,value into G, and stores that G into\Nmemory. Division for example takes several Dialogue: 0,0:31:11.21,0:31:15.46,Default,,0000,0000,0000,,MCT and it's micro program is way more\Ncomplex. But there are more micro programs Dialogue: 0,0:31:15.46,0:31:18.80,Default,,0000,0000,0000,,than the ones for the machine\Ninstructions. Since there is only a single Dialogue: 0,0:31:18.80,0:31:21.58,Default,,0000,0000,0000,,adding unit in the whole computer,\Nincrementing and decrementing the counters Dialogue: 0,0:31:21.58,0:31:26.07,Default,,0000,0000,0000,,is done by converting the pulses into\Nspecial instructions that get injected Dialogue: 0,0:31:26.07,0:31:30.54,Default,,0000,0000,0000,,into the instruction stream. There are 14\Nof these so-called unprogrammed sequences Dialogue: 0,0:31:30.54,0:31:34.75,Default,,0000,0000,0000,,with their own micro programs. Some counter\Nshift, some are for interacting with Dialogue: 0,0:31:34.75,0:31:40.87,Default,,0000,0000,0000,,debugging hardware, and these two control\Nthe interrupt and reset sequences. Dialogue: 0,0:31:40.87,0:31:46.08,Default,,0000,0000,0000,,The complete schematics are publicly\Navailable and fit on just 49 sheets. Dialogue: 0,0:31:46.08,0:31:51.12,Default,,0000,0000,0000,,The whole implementation only uses a single\Ntype of gate, a three input NAND gate. Dialogue: 0,0:31:51.12,0:31:54.87,Default,,0000,0000,0000,,Two of these are contained in one\Nintegrated circuit, and about a hundred of Dialogue: 0,0:31:54.87,0:31:57.70,Default,,0000,0000,0000,,these ICs form a logic module. Dialogue: 0,0:31:59.58,0:32:03.73,Default,,0000,0000,0000,,24 logic modules and some interface and\Npower supply modules are connected Dialogue: 0,0:32:03.73,0:32:06.100,Default,,0000,0000,0000,,together in tray A, which also contains\Nthe I/O and debug connectors. Dialogue: 0,0:32:06.100,0:32:11.37,Default,,0000,0000,0000,,Tray B contains various driver and amplifier\Nmodules, as well as RAM and ROM. Dialogue: 0,0:32:11.37,0:32:16.06,Default,,0000,0000,0000,,RAM is implemented as magnetic core memory,\Nwhich stores bits in magnetized toroids. Dialogue: 0,0:32:16.06,0:32:19.80,Default,,0000,0000,0000,,Reading a bit clears it, so the memory\Nsequencer makes sure to always write the Dialogue: 0,0:32:19.80,0:32:24.08,Default,,0000,0000,0000,,value again after reading it.\NWithout mass storage, like tape, the AGC Dialogue: 0,0:32:24.08,0:32:29.96,Default,,0000,0000,0000,,has an unusually high amount of ROM.\NCore Rope Memory encodes bits by wires that Dialogue: 0,0:32:29.96,0:32:35.19,Default,,0000,0000,0000,,either go through- or past a ferrite core.\NThe 500,000 bits per computer were woven Dialogue: 0,0:32:35.19,0:32:40.43,Default,,0000,0000,0000,,completely by hand. Trays A and B are put\Ntogether like this and hermetically Dialogue: 0,0:32:40.43,0:32:45.02,Default,,0000,0000,0000,,sealed, making for a rather compact\Ncomputer. This is its orientation when Dialogue: 0,0:32:45.02,0:32:50.44,Default,,0000,0000,0000,,installed on the spacecraft, with the six\NROM modules accessible so they could in Dialogue: 0,0:32:50.44,0:32:54.53,Default,,0000,0000,0000,,theory be replaced during the mission. And\Nthat was the hardware part. Dialogue: 0,0:32:54.53,0:33:00.70,Default,,0000,0000,0000,,{\i1}applause{\i0}\NC: Next let's look at the devices. Dialogue: 0,0:33:00.70,0:33:04.61,Default,,0000,0000,0000,,{\i1}applause{\i0}\N Dialogue: 0,0:33:04.61,0:33:08.09,Default,,0000,0000,0000,,Let's look at the devices connected\Nto the computer. Dialogue: 0,0:33:08.09,0:33:10.92,Default,,0000,0000,0000,,We will look at the core devices\Nthat allow the Apollo guidance computer to Dialogue: 0,0:33:10.92,0:33:14.26,Default,,0000,0000,0000,,maintain the state vector, some quite\Nspecial devices you don't see on many Dialogue: 0,0:33:14.26,0:33:17.76,Default,,0000,0000,0000,,other computers, and the peripherals used\Nfor communication with astronauts and Dialogue: 0,0:33:17.76,0:33:21.80,Default,,0000,0000,0000,,Mission Control. The gyroscope is the core\Nperipheral that the Apollo guidance Dialogue: 0,0:33:21.80,0:33:24.80,Default,,0000,0000,0000,,computer was originally built around. The\NApollo Guidance Computer rotates it into a Dialogue: 0,0:33:24.80,0:33:28.60,Default,,0000,0000,0000,,certain base position with the CDU command\Ncounters, and then the gyro detects Dialogue: 0,0:33:28.60,0:33:31.93,Default,,0000,0000,0000,,rotation around the three axes of the\Nspacecraft that can be read from the CDU Dialogue: 0,0:33:31.93,0:33:35.47,Default,,0000,0000,0000,,counters. Using the gyroscope, the\Nspacecraft always knows it's attitude, Dialogue: 0,0:33:35.47,0:33:39.80,Default,,0000,0000,0000,,that is its orientation in space. The\Naccelerometer adjust acceleration forces Dialogue: 0,0:33:39.80,0:33:45.51,Default,,0000,0000,0000,,on the three axis. The three values can be\Nread from the PIPA counters. The optics on Dialogue: 0,0:33:45.51,0:33:49.42,Default,,0000,0000,0000,,the command module are used to measure the\Nrelative position to the celestial bodies. Dialogue: 0,0:33:49.42,0:33:53.22,Default,,0000,0000,0000,,The computer uses the OPT command counters\Nto move the optics to point towards the Dialogue: 0,0:33:53.22,0:33:56.67,Default,,0000,0000,0000,,general direction of a star, and will read\Nin the astronauts fine-tuning through the Dialogue: 0,0:33:56.67,0:34:00.64,Default,,0000,0000,0000,,OPT counters. The landing radar sits at\Nthe bottom of the lunar module and Dialogue: 0,0:34:00.64,0:34:03.65,Default,,0000,0000,0000,,measures the distance to the ground. The\NRADARUPT interrupt will be triggered Dialogue: 0,0:34:03.65,0:34:07.01,Default,,0000,0000,0000,,whenever a new measurement is available,\Nand the RNRAD counter contains the new Dialogue: 0,0:34:07.01,0:34:11.56,Default,,0000,0000,0000,,value. Lunar module's rendezvous radar\Nmeasures the distance of the command and Dialogue: 0,0:34:11.56,0:34:15.55,Default,,0000,0000,0000,,service module during rendezvous. After\Nsetting the two angles and the CDUT and Dialogue: 0,0:34:15.55,0:34:18.98,Default,,0000,0000,0000,,CDUS counters to point it towards the two\Nother spacecraft, it will automatically Dialogue: 0,0:34:18.98,0:34:22.25,Default,,0000,0000,0000,,track it and cause RADARUPT interrupts\Nwhen new data is available, which can be Dialogue: 0,0:34:22.25,0:34:26.78,Default,,0000,0000,0000,,read from the RNRAD counters. The command\Nmodule, the service module, and the lunar Dialogue: 0,0:34:26.78,0:34:30.96,Default,,0000,0000,0000,,module all contain reaction control\Nsystem, RCS, jets that emit small bursts Dialogue: 0,0:34:30.96,0:34:34.87,Default,,0000,0000,0000,,for holding or charging the attitude. On\Nlunar module, there's one bit for each of Dialogue: 0,0:34:34.87,0:34:38.47,Default,,0000,0000,0000,,the sixteen jets. Setting a bit to one\Nwill make the jet fire.The system software Dialogue: 0,0:34:38.47,0:34:44.19,Default,,0000,0000,0000,,uses a dedicated timer, TIME6, and it's\Ninterrupt T6RUPT for timing the pulses. Dialogue: 0,0:34:44.19,0:34:47.56,Default,,0000,0000,0000,,The user interface is provided by the so\Ncalled DSKY which stands for display and Dialogue: 0,0:34:47.56,0:34:51.86,Default,,0000,0000,0000,,keyboard. It has 19 keys, 15 lamps, and\Nseveral numeric output lines. Dialogue: 0,0:34:51.86,0:34:55.05,Default,,0000,0000,0000,,Keys generate the KEYRUPT interrupts and\Nthe key number can be read Dialogue: 0,0:34:55.05,0:34:59.63,Default,,0000,0000,0000,,from the KEYIN I/O channel. The numeric\Ndisplay is driven by the OUT O channel. Dialogue: 0,0:34:59.63,0:35:02.50,Default,,0000,0000,0000,,There is bidirectional digital radio\Ncommunication and S-band between Dialogue: 0,0:35:02.50,0:35:06.97,Default,,0000,0000,0000,,Mission Control and each spacecraft at a\Nselectable speed of 1.9 or 51 kbit/s Dialogue: 0,0:35:06.97,0:35:10.21,Default,,0000,0000,0000,,Data words from Mission Control show up\Nin the INLINK counter and Dialogue: 0,0:35:10.21,0:35:15.07,Default,,0000,0000,0000,,trigger interrupt UPRUPT. Data words to be\Nsent are stored in the I/O channel DNTM1 Dialogue: 0,0:35:15.07,0:35:17.69,Default,,0000,0000,0000,,and the DOWNRUPT interrupt will signal\Nthe program when it can load Dialogue: 0,0:35:17.69,0:35:23.55,Default,,0000,0000,0000,,the register with the next word. These\Nwere some of the interesting peripherals. Dialogue: 0,0:35:25.07,0:35:29.52,Default,,0000,0000,0000,,M: The AGC system, the AGC system software Dialogue: 0,0:35:29.52,0:35:32.49,Default,,0000,0000,0000,,makes it a priority based cooperative -\Nbut also pre-emptive - real-time Dialogue: 0,0:35:32.49,0:35:37.41,Default,,0000,0000,0000,,interactive fault tolerant computer with\Nvirtual machine support. The topics we'll Dialogue: 0,0:35:37.41,0:35:40.74,Default,,0000,0000,0000,,talk about are multitasking, the\Ninterpreter, device drivers, and the Dialogue: 0,0:35:40.74,0:35:45.54,Default,,0000,0000,0000,,waitlist, as well as the user interface,\Nand mechanisms for fault recovery. The AGC Dialogue: 0,0:35:45.54,0:35:49.02,Default,,0000,0000,0000,,has many things to do. It does\Nmathematical calculations that can take Dialogue: 0,0:35:49.02,0:35:52.90,Default,,0000,0000,0000,,several seconds, and it does I/O with its\Ndevices; it services interrupts when a Dialogue: 0,0:35:52.90,0:35:56.89,Default,,0000,0000,0000,,device wants the computers attention, for\Nexample a key press. It does regular Dialogue: 0,0:35:56.89,0:36:01.11,Default,,0000,0000,0000,,servicing of devices, like updating the\Ndisplay, and it supports real-time Dialogue: 0,0:36:01.11,0:36:05.82,Default,,0000,0000,0000,,control, like flashing a lamp or firing\Nboosters at exactly the right time. Dialogue: 0,0:36:05.82,0:36:09.52,Default,,0000,0000,0000,,There's only a single CPU, so it must\Nswitch between the different tasks. Dialogue: 0,0:36:09.52,0:36:13.68,Default,,0000,0000,0000,,Batch processing multitasking computers\Nwork on long-running jobs one after the Dialogue: 0,0:36:13.68,0:36:17.72,Default,,0000,0000,0000,,other, but if some jobs have higher\Npriorities it makes more sense to run a job Dialogue: 0,0:36:17.72,0:36:21.14,Default,,0000,0000,0000,,for only - say 20 milliseconds - then\Ncheck the job queues and keep running Dialogue: 0,0:36:21.14,0:36:24.83,Default,,0000,0000,0000,,the highest priority job in the queue\Nuntil it terminates and is removed Dialogue: 0,0:36:24.83,0:36:29.30,Default,,0000,0000,0000,,from the queue, then keep picking the\Nhighest priority job. Dialogue: 0,0:36:29.30,0:36:32.56,Default,,0000,0000,0000,,Jobs have to manually check at least\Nevery 20 milliseconds whether Dialogue: 0,0:36:32.56,0:36:36.11,Default,,0000,0000,0000,,there's a higher priority job in the queue\Nby doing doing a so-called 'yield', Dialogue: 0,0:36:36.11,0:36:41.37,Default,,0000,0000,0000,,which makes the AGC a priority scheduled\Ncooperative multitasking computer. Dialogue: 0,0:36:41.37,0:36:44.79,Default,,0000,0000,0000,,A job is described by 12 word data\Nstructure in memory, that contains Dialogue: 0,0:36:44.79,0:36:48.69,Default,,0000,0000,0000,,the PC and both bank's register that point\Nto where the job will start or continue Dialogue: 0,0:36:48.69,0:36:55.17,Default,,0000,0000,0000,,running, as well as a word with a disabled\Nflag in the sign bit and a 5 bit priority. Dialogue: 0,0:36:55.17,0:36:59.12,Default,,0000,0000,0000,,The core set consists of seven\Njob entries. Minus zero in the priority Dialogue: 0,0:36:59.12,0:37:03.10,Default,,0000,0000,0000,,word means that the entry is empty. Job\Nzero is always the currently running one. Dialogue: 0,0:37:03.10,0:37:07.04,Default,,0000,0000,0000,,When a new job gets created with a higher\Npriority, the yield operation will Dialogue: 0,0:37:07.04,0:37:12.07,Default,,0000,0000,0000,,exchange the 12 words so that new job is\Njob zero. Negating the priority will put a Dialogue: 0,0:37:12.07,0:37:16.51,Default,,0000,0000,0000,,job to sleep, so yield won't switch to it\Nagain. Negating it again will wake it up. Dialogue: 0,0:37:16.51,0:37:20.53,Default,,0000,0000,0000,,The first eight words in the job entry can\Nbe used for local storage for the job. Dialogue: 0,0:37:20.53,0:37:23.25,Default,,0000,0000,0000,,Since it's always job zero that is\Nrunning, these words are always Dialogue: 0,0:37:23.25,0:37:27.84,Default,,0000,0000,0000,,conveniently located at the same addresses\Nin memory. The executive has a set of Dialogue: 0,0:37:27.84,0:37:32.79,Default,,0000,0000,0000,,subroutines that control the job data\Nstructures. You can create a new job Dialogue: 0,0:37:32.79,0:37:37.19,Default,,0000,0000,0000,,pointed to by a pair of PC and BB\Nregisters of a given priority, change the Dialogue: 0,0:37:37.19,0:37:41.43,Default,,0000,0000,0000,,priority of the current job, put the\Ncurrent job to sleep, wake up a given job, Dialogue: 0,0:37:41.43,0:37:45.93,Default,,0000,0000,0000,,and terminate the current job.\NYield is not an executive function, but a Dialogue: 0,0:37:45.93,0:37:50.19,Default,,0000,0000,0000,,two instruction sequence that checks the\Nnew job variable in which the executive Dialogue: 0,0:37:50.19,0:37:54.07,Default,,0000,0000,0000,,always holds the idea of the highest\Npriority job. If job zero is the highest Dialogue: 0,0:37:54.07,0:37:57.45,Default,,0000,0000,0000,,priority job there's nothing to do. If\Nthere is a higher priority job, it calls Dialogue: 0,0:37:57.45,0:38:02.12,Default,,0000,0000,0000,,the change job subroutine which switches\Nto that job. NEWJOB isn't just a variable Dialogue: 0,0:38:02.12,0:38:05.99,Default,,0000,0000,0000,,in memory, but also the watchdog word. If\Nit isn't accessed regularly, that is Dialogue: 0,0:38:05.99,0:38:10.28,Default,,0000,0000,0000,,cooperative multitasking is stuck, the\Nhardware will automatically reset itself. Dialogue: 0,0:38:10.28,0:38:14.50,Default,,0000,0000,0000,,A lot of the code in the AGC does\Nscientific calculations, calculating for Dialogue: 0,0:38:14.50,0:38:18.61,Default,,0000,0000,0000,,example just the sum of two products of a\Nscalar and a vector would require hundreds Dialogue: 0,0:38:18.61,0:38:22.97,Default,,0000,0000,0000,,of instructions in AGC machine code. There\Nis library code that provides all kinds of Dialogue: 0,0:38:22.97,0:38:27.37,Default,,0000,0000,0000,,operations on single, double, or triple\Nprecision fixed point values, vectors, and Dialogue: 0,0:38:27.37,0:38:32.57,Default,,0000,0000,0000,,matrices. It also provides a softer multi-\Npurpose accumulator, MPAC, which can hold Dialogue: 0,0:38:32.57,0:38:36.24,Default,,0000,0000,0000,,a double, triple, or a vector, depending\Non the mode flag. In C-like pseudo code we Dialogue: 0,0:38:36.24,0:38:40.61,Default,,0000,0000,0000,,would load the vector into the MPAC,\Nmultiply it with a scalar, save it, do the Dialogue: 0,0:38:40.61,0:38:45.65,Default,,0000,0000,0000,,other multiplication, and add the result\Nto the saved value. Formulas like this one Dialogue: 0,0:38:45.65,0:38:50.93,Default,,0000,0000,0000,,need to store intermediate results, so a\Nthirty-eight word stack is provided. If a Dialogue: 0,0:38:50.93,0:38:54.16,Default,,0000,0000,0000,,job uses math code, the MPAC, the MODE\Nfield, and the stack pointer will be Dialogue: 0,0:38:54.16,0:38:58.04,Default,,0000,0000,0000,,stored in the remaining fields of the Core\NSet Entry. The stack will be part of a Dialogue: 0,0:38:58.04,0:39:02.70,Default,,0000,0000,0000,,data tructure called VAC, which will be\Npointed to by the Core Set Entry. A job Dialogue: 0,0:39:02.70,0:39:06.45,Default,,0000,0000,0000,,can be created with, or without a VAC,\Ndepending on which subroutine it is Dialogue: 0,0:39:06.45,0:39:11.53,Default,,0000,0000,0000,,created with. The machine code version of\Nthe example code would still be very Dialogue: 0,0:39:11.53,0:39:15.10,Default,,0000,0000,0000,,verbose, with many function calls passing\Npointers. The designers of the AGC Dialogue: 0,0:39:15.10,0:39:18.08,Default,,0000,0000,0000,,software decided to create a new and\Ncompact language that will be interpreted Dialogue: 0,0:39:18.08,0:39:22.45,Default,,0000,0000,0000,,at runtime, a virtual machine. The\Ninterpretive language is turing-complete Dialogue: 0,0:39:22.45,0:39:26.71,Default,,0000,0000,0000,,and in addition to the MPAC it has two\Nindex registers, two step registers, and Dialogue: 0,0:39:26.71,0:39:31.03,Default,,0000,0000,0000,,its own link register. The encoding\Nmanages to fit two seven bit op codes in Dialogue: 0,0:39:31.03,0:39:35.29,Default,,0000,0000,0000,,one word, which allows for 128 op codes\Nand explains why there is a 'shift right Dialogue: 0,0:39:35.29,0:39:39.72,Default,,0000,0000,0000,,by seven' function in the CPU. The two\Noperands are stored in the following two Dialogue: 0,0:39:39.72,0:39:44.54,Default,,0000,0000,0000,,words, allowing 14 bit addresses. 14 bit\Naddresses means interpretive code doesn't Dialogue: 0,0:39:44.54,0:39:48.97,Default,,0000,0000,0000,,have to work this complicated memory layer\Nanymore. It allows addressing about half Dialogue: 0,0:39:48.97,0:39:53.08,Default,,0000,0000,0000,,of the ROM at the same time. At the lowest\Nkiloword of each half, RAM is visible, so Dialogue: 0,0:39:53.08,0:39:57.90,Default,,0000,0000,0000,,interpretive code can pick between one of\Nthese two memory layouts. This is the Dialogue: 0,0:39:57.90,0:40:01.58,Default,,0000,0000,0000,,complete instruction set, regular machine\Ncode, interpretive code can be mixed and Dialogue: 0,0:40:01.58,0:40:04.57,Default,,0000,0000,0000,,matched inside the job. The exit\Ninstruction will continue executing Dialogue: 0,0:40:04.57,0:40:08.87,Default,,0000,0000,0000,,regular machine code at the next address,\Nand CALL INTPRET will similarly switch to Dialogue: 0,0:40:08.87,0:40:13.19,Default,,0000,0000,0000,,interpreter mode. In addition to long-\Nrunning math tasks, the system software Dialogue: 0,0:40:13.19,0:40:17.00,Default,,0000,0000,0000,,also supports device drivers. When a\Ndevice needs the computers attention, for Dialogue: 0,0:40:17.00,0:40:21.16,Default,,0000,0000,0000,,example in case of a DSKY key press, it\Ncauses an interrupt. The current job will Dialogue: 0,0:40:21.16,0:40:24.29,Default,,0000,0000,0000,,be interrupted, and the interrupt handler\Nwill read the device data and return as Dialogue: 0,0:40:24.29,0:40:29.40,Default,,0000,0000,0000,,quickly as possible. If there's more to\Ndo, it can schedule a job for later. Some Dialogue: 0,0:40:29.40,0:40:34.39,Default,,0000,0000,0000,,devices need to be serviced regularly. A\N120 microsecond timer causes interrupts Dialogue: 0,0:40:34.39,0:40:38.45,Default,,0000,0000,0000,,that read data and write data... that read\Ndata from and write data to certain Dialogue: 0,0:40:38.45,0:40:42.52,Default,,0000,0000,0000,,devices. The numeric display of the DSKY\Nfor example only allows updating a few Dialogue: 0,0:40:42.52,0:40:48.35,Default,,0000,0000,0000,,digits at a time, so its driver is\Ntriggered by the 120 microsecond timer. Dialogue: 0,0:40:48.35,0:40:51.93,Default,,0000,0000,0000,,The timer interrupt cycles through eight\Nphases, which distributes the device Dialogue: 0,0:40:51.93,0:40:56.94,Default,,0000,0000,0000,,drivers across time to minimize the\Nduration of one interrupt handler. Some Dialogue: 0,0:40:56.94,0:41:00.81,Default,,0000,0000,0000,,devices need to be driven at exact times.\NIf for example a job decides that it needs Dialogue: 0,0:41:00.81,0:41:05.33,Default,,0000,0000,0000,,to flash a lamp twice, it would turn it on\Nimmediately and schedule three weightless Dialogue: 0,0:41:05.33,0:41:10.63,Default,,0000,0000,0000,,tasks in the future at specific times. The\Nfirst one will turn the lamp off, the Dialogue: 0,0:41:10.63,0:41:15.94,Default,,0000,0000,0000,,second one will turn it on again and the\Nthird one will turn it off again. The Dialogue: 0,0:41:15.94,0:41:21.01,Default,,0000,0000,0000,,sorted time deltas of the weightless tasks\Nare stored in the data structure LST1, Dialogue: 0,0:41:21.01,0:41:24.59,Default,,0000,0000,0000,,with the first entry always currently\Ncounting down in a timer register, and Dialogue: 0,0:41:24.59,0:41:29.63,Default,,0000,0000,0000,,LST2 contains a pair of PC and BB for each\Ntask. There are subroutines to create a Dialogue: 0,0:41:29.63,0:41:34.69,Default,,0000,0000,0000,,new task and end the current task. The\Ntimer that controls the wait list has a Dialogue: 0,0:41:34.69,0:41:39.25,Default,,0000,0000,0000,,granularity of 10 milliseconds. Other\Ntimers can fire at the same rate, but are Dialogue: 0,0:41:39.25,0:41:42.95,Default,,0000,0000,0000,,offset, and the work triggered by them is\Ndesigned to be short enough to never Dialogue: 0,0:41:42.95,0:41:47.00,Default,,0000,0000,0000,,overlap with the next potential timer\Ntriggered work. This is complicated by Dialogue: 0,0:41:47.00,0:41:50.82,Default,,0000,0000,0000,,device interrupts, which can come in at\Nany time. The duration of an interrupt Dialogue: 0,0:41:50.82,0:41:55.56,Default,,0000,0000,0000,,handler causes latency and the maximum\Nduration will reduce the allowed time for Dialogue: 0,0:41:55.56,0:41:59.09,Default,,0000,0000,0000,,the timer handlers. The core system\Nsoftware makes no guarantees about the Dialogue: 0,0:41:59.09,0:42:04.12,Default,,0000,0000,0000,,timing, it's all up to components to...\Nit's up to all the components to cooperate Dialogue: 0,0:42:04.12,0:42:10.27,Default,,0000,0000,0000,,so the real time goal can be met. The\NPINBALL program is the shell of the AGC. Dialogue: 0,0:42:10.27,0:42:14.16,Default,,0000,0000,0000,,Key press interrupts schedule a job, that\Ncollects the digits for the command and Dialogue: 0,0:42:14.16,0:42:18.38,Default,,0000,0000,0000,,updates an in-memory representation of\Nwhat should be on the display. The 120 Dialogue: 0,0:42:18.38,0:42:23.15,Default,,0000,0000,0000,,millisecond timer triggers the display\Nupdate code. When the command is complete Dialogue: 0,0:42:23.15,0:42:27.94,Default,,0000,0000,0000,,PINBALL schedules a new job. Mission\NControl has a remote shell in form of a Dialogue: 0,0:42:27.94,0:42:34.07,Default,,0000,0000,0000,,DSKY connected through the s-band radio.\NSystem software that supports human life Dialogue: 0,0:42:34.07,0:42:37.83,Default,,0000,0000,0000,,has to be able to communicate malfunctions\Nand be able to recover from them. Dialogue: 0,0:42:37.83,0:42:40.94,Default,,0000,0000,0000,,The alarm subroutine takes the following\Nword from the instruction stream, Dialogue: 0,0:42:40.94,0:42:44.53,Default,,0000,0000,0000,,displays it, and illuminates the prog\Nlight. This should be interpreted as Dialogue: 0,0:42:44.53,0:42:48.59,Default,,0000,0000,0000,,a warning or an error message.\NThe AGC software is full of validity and Dialogue: 0,0:42:48.59,0:42:51.55,Default,,0000,0000,0000,,plausibility checks that help to find\Nbugs during development and help Dialogue: 0,0:42:51.55,0:42:54.25,Default,,0000,0000,0000,,better understanding potential issues\Nduring the mission. Dialogue: 0,0:42:54.25,0:42:58.08,Default,,0000,0000,0000,,Some kinds of failures triggered by\Nvarious hardware watchdogs or by code Dialogue: 0,0:42:58.08,0:43:01.83,Default,,0000,0000,0000,,make it impossible for normal operations\Nto continue. In addition to showing Dialogue: 0,0:43:01.83,0:43:05.95,Default,,0000,0000,0000,,the error code, they also cause a hardware\Nreset but the system software also offers Dialogue: 0,0:43:05.95,0:43:10.50,Default,,0000,0000,0000,,recovery services. A job can have recovery\Ncode for its different phases. Dialogue: 0,0:43:10.50,0:43:15.08,Default,,0000,0000,0000,,During execution it sets the respective\Nphase and if an abort happens in any Dialogue: 0,0:43:15.08,0:43:20.54,Default,,0000,0000,0000,,job or task, the currently set up recovery\Nroutine gets executed which could Dialogue: 0,0:43:20.54,0:43:25.07,Default,,0000,0000,0000,,for example clean up and try the work\Nagain, or skip to a different phase, or Dialogue: 0,0:43:25.07,0:43:30.07,Default,,0000,0000,0000,,cancel the job altogether. The phase\Nchange call sets the current phase for a Dialogue: 0,0:43:30.07,0:43:34.31,Default,,0000,0000,0000,,job in the recovery table, for example\Nphase 5 for job 4. Each phase is Dialogue: 0,0:43:34.31,0:43:39.90,Default,,0000,0000,0000,,associated with a descriptor of a task or\Na job with or without a VAC. So during Dialogue: 0,0:43:39.90,0:43:44.15,Default,,0000,0000,0000,,normal execution with several jobs and\Ntasks scheduled, if an abort happens, the Dialogue: 0,0:43:44.15,0:43:47.90,Default,,0000,0000,0000,,core set and wait list are cleared, the\Ncontents of the recovery table are Dialogue: 0,0:43:47.90,0:43:52.21,Default,,0000,0000,0000,,activated, scheduling tasks and jobs for\Nall jobs that set up recovery code. Dialogue: 0,0:43:52.21,0:43:56.67,Default,,0000,0000,0000,,Sometimes a failure though, like corrupted\Nmemory, are not recoverable. They cause a Dialogue: 0,0:43:56.67,0:44:00.33,Default,,0000,0000,0000,,fresh start, meaning a full initialization\Nof the system without running any recovery Dialogue: 0,0:44:00.33,0:44:05.03,Default,,0000,0000,0000,,code.\NAnd that was the AGC system software. Dialogue: 0,0:44:07.63,0:44:11.35,Default,,0000,0000,0000,,C: As we now have a good overview on\Narchitecture, hardware, peripherals, and Dialogue: 0,0:44:11.35,0:44:14.55,Default,,0000,0000,0000,,system software of the Apollo Guidance\NComputer, it's time briefly view on it's Dialogue: 0,0:44:14.55,0:44:18.93,Default,,0000,0000,0000,,practical use on a mission to the moon. We\Nwill look at the user interface, the Dialogue: 0,0:44:18.93,0:44:22.58,Default,,0000,0000,0000,,launch sequence, and, once in orbit, the\Nattitude in orbit determination. Further Dialogue: 0,0:44:22.58,0:44:26.13,Default,,0000,0000,0000,,we will understand how the digital\Nautopilot works, and how powered flight is Dialogue: 0,0:44:26.13,0:44:30.28,Default,,0000,0000,0000,,being performed. As soon as we've reached\Nthe moon, we look at the lunar landing and Dialogue: 0,0:44:30.28,0:44:34.38,Default,,0000,0000,0000,,the lunar rendezvous after liftoff and\Nfinally re-entry into Earth's atmosphere. Dialogue: 0,0:44:34.38,0:44:38.00,Default,,0000,0000,0000,,Last but not least contingencies, or as we\Nlike to call them, "fun issues". Dialogue: 0,0:44:38.00,0:44:41.76,Default,,0000,0000,0000,,Let's start with the user interface.\NIt is like any command-line interface but Dialogue: 0,0:44:41.76,0:44:44.92,Default,,0000,0000,0000,,since there are only numbers and no letters,\Nkey words have to be encoded. Dialogue: 0,0:44:44.92,0:44:48.54,Default,,0000,0000,0000,,On a normal system you might say\N'display memory', 'enter'. Dialogue: 0,0:44:48.54,0:44:52.19,Default,,0000,0000,0000,,Display is the verb, memory is the noun.\NOn the Apollo guidance computer you say Dialogue: 0,0:44:52.19,0:44:57.15,Default,,0000,0000,0000,,verb '0 1', which means 'display', noun\N'0 2' - 'memory' - 'enter'. Dialogue: 0,0:44:57.15,0:45:01.32,Default,,0000,0000,0000,,Subroutine asks for an argument. On a\Nnormal system it might display a prompt, Dialogue: 0,0:45:01.32,0:45:03.83,Default,,0000,0000,0000,,you enter the number, press 'enter'.\NOn the Apollo Guidance Computer, flashing\N Dialogue: 0,0:45:03.83,0:45:09.35,Default,,0000,0000,0000,,'verb' and 'noun' indicate that is waiting\Nfor input. So you type '2 5', 'enter'; Dialogue: 0,0:45:09.35,0:45:12.60,Default,,0000,0000,0000,,an octal address, and the Apollo Guidance\NComputer displays the result. Dialogue: 0,0:45:12.60,0:45:16.69,Default,,0000,0000,0000,,The memory contents at the address octal\N'2 5'. The Apollo Guidance Computer uses Dialogue: 0,0:45:16.69,0:45:19.84,Default,,0000,0000,0000,,the same concept of verb and noun when\Nit proactively asks for input. Dialogue: 0,0:45:19.84,0:45:24.10,Default,,0000,0000,0000,,Verb '6', noun '11' asks for the CSI\Nignition time. CSI meaning Dialogue: 0,0:45:24.10,0:45:27.98,Default,,0000,0000,0000,,Coelliptic Sequence Initiation, we will\Ncome to that later. Special case is when Dialogue: 0,0:45:27.98,0:45:31.23,Default,,0000,0000,0000,,the Apollo Guidance Computer asks a\Nyes-or-no question. Verb 99 has the Dialogue: 0,0:45:31.23,0:45:35.01,Default,,0000,0000,0000,,astronaut confirm engine ignition\Nwith a proceed key. Dialogue: 0,0:45:35.01,0:45:37.95,Default,,0000,0000,0000,,The astronauts have a complete reference of\Nall verbs and nouns on paper, Dialogue: 0,0:45:37.95,0:45:41.16,Default,,0000,0000,0000,,as well as cue cards were the most\Nimportant information. Dialogue: 0,0:45:41.16,0:45:45.51,Default,,0000,0000,0000,,Let's now go through each of the phases\Nof the mission, starting with a liftoff. Dialogue: 0,0:45:45.51,0:45:49.53,Default,,0000,0000,0000,,So, we are on our way.\NThe Apollo Guidance Computer is Dialogue: 0,0:45:49.53,0:45:53.50,Default,,0000,0000,0000,,in passive monitoring mode. With the\Ncutting of the umbilical cables, which you Dialogue: 0,0:45:53.50,0:45:58.15,Default,,0000,0000,0000,,see right about ... now, it has started\Nthe mission clock. In case this trigger Dialogue: 0,0:45:58.15,0:46:01.69,Default,,0000,0000,0000,,fails, one DSKY is always prepared with\Nverb 75 and just waiting for 'enter' to Dialogue: 0,0:46:01.69,0:46:04.94,Default,,0000,0000,0000,,manually start the mission timer. We can\Ndisplay the mission elapsed time at any Dialogue: 0,0:46:04.94,0:46:10.57,Default,,0000,0000,0000,,time with verb 16, noun 65. During the\Nflight with the SaturnV, the Apollo Dialogue: 0,0:46:10.57,0:46:13.52,Default,,0000,0000,0000,,Guidance Computer is only performing\Npassive monitoring of the flight. Control Dialogue: 0,0:46:13.52,0:46:16.66,Default,,0000,0000,0000,,of the SaturnV is with its own launch\Nvehicle digital computer, and the Dialogue: 0,0:46:16.66,0:46:20.52,Default,,0000,0000,0000,,instrument unit ring. The DSKY\Nautomatically shows verb 16, noun 62, Dialogue: 0,0:46:20.52,0:46:24.11,Default,,0000,0000,0000,,which is velocity in feet per second.\NAltitude change rate in feet per second, Dialogue: 0,0:46:24.11,0:46:27.96,Default,,0000,0000,0000,,and altitude above pad and nautical miles.\NNote that the units and the position of Dialogue: 0,0:46:27.96,0:46:31.59,Default,,0000,0000,0000,,the decimal point are implicit, and yes\Nthe whole system was working in metric Dialogue: 0,0:46:31.59,0:46:35.30,Default,,0000,0000,0000,,internally but for the benefit of the\NAmerican astronauts the display procedures Dialogue: 0,0:46:35.30,0:46:41.74,Default,,0000,0000,0000,,converted everything to imperial units.\N{\i1}laughter and applause{\i0} Dialogue: 0,0:46:41.74,0:46:45.73,Default,,0000,0000,0000,,In case of problems with the Saturn\Ncomputer, the Apollo Guidance Computer can Dialogue: 0,0:46:45.73,0:46:49.05,Default,,0000,0000,0000,,take over full control of the launch\Nvehicle, in extreme cases astronauts could Dialogue: 0,0:46:49.05,0:46:52.60,Default,,0000,0000,0000,,even steer the whole stack into orbit\Nthemselves with the hand controller. In Dialogue: 0,0:46:52.60,0:46:56.30,Default,,0000,0000,0000,,case you ever wanted to fly... to manualyl\Ncontrol a 110 meter tall rocket with more Dialogue: 0,0:46:56.30,0:46:59.02,Default,,0000,0000,0000,,than 30 million Newton of thrust, this is\Nyour chance. Dialogue: 0,0:46:59.02,0:47:01.54,Default,,0000,0000,0000,,{\i1}laughter{\i0}\NIn less than 12 minutes we've gone through Dialogue: 0,0:47:01.54,0:47:04.82,Default,,0000,0000,0000,,the first and second stage and are using a\Nsmall burn from the third stage to get us Dialogue: 0,0:47:04.82,0:47:09.19,Default,,0000,0000,0000,,into a 185 kilometer orbit which circles\Nthe earth every 88 minutes. Dialogue: 0,0:47:11.05,0:47:13.80,Default,,0000,0000,0000,,But how do we know where ...\Nwe are in the right orbit? Dialogue: 0,0:47:13.80,0:47:16.81,Default,,0000,0000,0000,,Well the Apollo guidance computer, as well\Nas Mission Control, are monitoring Dialogue: 0,0:47:16.81,0:47:20.20,Default,,0000,0000,0000,,position and velocity, because to get\Nwhere we want to be, we first need to know Dialogue: 0,0:47:20.20,0:47:24.21,Default,,0000,0000,0000,,where we are. To be able to navigate in\Nspace, we need to maintain our Dialogue: 0,0:47:24.21,0:47:26.99,Default,,0000,0000,0000,,three-dimensional position, and our\Nthree-dimensional velocity, Dialogue: 0,0:47:26.99,0:47:30.36,Default,,0000,0000,0000,,the so-called state vector. Let's start\Nwith the determination of the position. Dialogue: 0,0:47:30.36,0:47:34.67,Default,,0000,0000,0000,,For this we need a telescope and a space\Nsextant. The space sextant is very similar Dialogue: 0,0:47:34.67,0:47:37.43,Default,,0000,0000,0000,,to an 18th century nautical sextant.\NPosition is determined by measuring Dialogue: 0,0:47:37.43,0:47:41.32,Default,,0000,0000,0000,,the angle between the horizon and a\Ncelestial body. As an horizon we can Dialogue: 0,0:47:41.32,0:47:45.31,Default,,0000,0000,0000,,either take that of Earth or Moon and\Ncelestial bodies - well we are in orbit, Dialogue: 0,0:47:45.31,0:47:48.72,Default,,0000,0000,0000,,we are surrounded by them. So let's just\Npick one. Luckily the Apollo guidance Dialogue: 0,0:47:48.72,0:47:52.72,Default,,0000,0000,0000,,computer already knows the position of 45\Nof them. The whole optics hardware and the Dialogue: 0,0:47:52.72,0:47:55.83,Default,,0000,0000,0000,,command and service module can be moved to\Npoint in the general direction of Earth Dialogue: 0,0:47:55.83,0:47:59.26,Default,,0000,0000,0000,,and moon. With the launch of program 52,\Nwe command the Apollo guidance computer to Dialogue: 0,0:47:59.26,0:48:02.84,Default,,0000,0000,0000,,rotate the spacecraft to point one axis of\Nthe sextant, the so-called landmark line- Dialogue: 0,0:48:02.84,0:48:07.31,Default,,0000,0000,0000,,of-sight, LLOS, to the nearest body, which\Nis earth or moon. The astronaut then used Dialogue: 0,0:48:07.31,0:48:11.59,Default,,0000,0000,0000,,the optics systems to exactly align the\Nhorizon to the LLOS. With the telescope Dialogue: 0,0:48:11.59,0:48:14.49,Default,,0000,0000,0000,,the astronaut looks for one of the known\Nstars, points the star line to it and lets Dialogue: 0,0:48:14.49,0:48:17.80,Default,,0000,0000,0000,,the Apollo guidance computer read the\Ntuning and shaft angle. Repeating this one Dialogue: 0,0:48:17.80,0:48:20.96,Default,,0000,0000,0000,,or more times in a different plane gives a\Nthree-dimensional position of the vehicle Dialogue: 0,0:48:20.96,0:48:25.13,Default,,0000,0000,0000,,in space. In the lunar module on the other\Nhand, the optics hardware was trimmed down Dialogue: 0,0:48:25.13,0:48:28.38,Default,,0000,0000,0000,,for weight reduction. Any alignment\Nrequires rotation of the lunar module. Dialogue: 0,0:48:28.38,0:48:31.61,Default,,0000,0000,0000,,This is mostly used to determine the\Nlanding site and support the rendezvous Dialogue: 0,0:48:31.61,0:48:36.13,Default,,0000,0000,0000,,maneuvre. It even lacks the software to\Nperform positioning in translunar space. Dialogue: 0,0:48:36.13,0:48:40.10,Default,,0000,0000,0000,,As we are moving, our position changes all\Nthe time. But after 2 location fixes, as Dialogue: 0,0:48:40.10,0:48:43.17,Default,,0000,0000,0000,,long as we're coasting, we are able to\Nestablish our speed and can determine Dialogue: 0,0:48:43.17,0:48:47.01,Default,,0000,0000,0000,,future positions by dead reckoning. As\Nposition and velocity are known, future Dialogue: 0,0:48:47.01,0:48:50.72,Default,,0000,0000,0000,,positions can be extrapolated.\NUnfortunately the near extrapolation Dialogue: 0,0:48:50.72,0:48:54.45,Default,,0000,0000,0000,,doesn't work in space as we have\Ngravitational forces which bend our path. Dialogue: 0,0:48:54.45,0:48:57.09,Default,,0000,0000,0000,,Thankfully there are two mathematical\Nmodels implemented in the Apollo Guidance Dialogue: 0,0:48:57.09,0:49:00.40,Default,,0000,0000,0000,,Computer: Conic integration based on the\NKeplerian orbit model on the left, which Dialogue: 0,0:49:00.40,0:49:04.64,Default,,0000,0000,0000,,assumes one perfectly round gravitational\Nbody influencing our flight path, and Dialogue: 0,0:49:04.64,0:49:08.06,Default,,0000,0000,0000,,Encke's integrating method for\Nperturbation considering multiple bodies Dialogue: 0,0:49:08.06,0:49:12.08,Default,,0000,0000,0000,,with gravitational imbalances. I think\Nthis helps to understand why we need a Dialogue: 0,0:49:12.08,0:49:15.61,Default,,0000,0000,0000,,computer on board and can't just fly to\Nthe moon with a hand controller. As we Dialogue: 0,0:49:15.61,0:49:19.02,Default,,0000,0000,0000,,see, the Apollo spacecraft was perfectly\Ncapable to fly on its own, but in the end Dialogue: 0,0:49:19.02,0:49:22.15,Default,,0000,0000,0000,,NASA decided that the primary source for\Nstate vector updates shall be Mission Dialogue: 0,0:49:22.15,0:49:25.58,Default,,0000,0000,0000,,Control in Houston, measured with three\Nground stations. Remote programming is Dialogue: 0,0:49:25.58,0:49:28.62,Default,,0000,0000,0000,,done with the Apollo guidance Computer in\Nidle, and running program 27. Mission Dialogue: 0,0:49:28.62,0:49:32.59,Default,,0000,0000,0000,,Control can use its link via s-band to\Nupdate the state vector. But there's one Dialogue: 0,0:49:32.59,0:49:36.45,Default,,0000,0000,0000,,thing Mission Control doesn't know better\Nthan us, and that's attitude. Attitude is Dialogue: 0,0:49:36.45,0:49:39.88,Default,,0000,0000,0000,,the orientation of the spacecraft in its\Nthree axis. Starting from a known Dialogue: 0,0:49:39.88,0:49:44.04,Default,,0000,0000,0000,,attitude, we have to ensure that we can\Nmeasure any rotation on any axis. Dialogue: 0,0:49:44.04,0:49:48.02,Default,,0000,0000,0000,,That's what gyros are for. They are one of\Nthe major component of the IMU, Dialogue: 0,0:49:48.02,0:49:51.74,Default,,0000,0000,0000,,the inertial measurement unit. Three\Ngyroscopes, one per axis measure any Dialogue: 0,0:49:51.74,0:49:54.81,Default,,0000,0000,0000,,rotation and provide their data to the\NApollo Guidance Computer to keep track of Dialogue: 0,0:49:54.81,0:49:59.35,Default,,0000,0000,0000,,the attitude of the spacecraft. Before we\Nleave Earth orbit, let's quickly discuss Dialogue: 0,0:49:59.35,0:50:02.49,Default,,0000,0000,0000,,the digital autopilot. It is the single\Nbiggest program in the Apollo Guidance Dialogue: 0,0:50:02.49,0:50:05.69,Default,,0000,0000,0000,,Computer, with about 10% of all the source\Ncode both in the command and service Dialogue: 0,0:50:05.69,0:50:09.08,Default,,0000,0000,0000,,module as well as the lunar module. The\Nimplementations for each vehicle are Dialogue: 0,0:50:09.08,0:50:12.14,Default,,0000,0000,0000,,significantly different though, due to\Ndifferent flight modes, thruster sets, Dialogue: 0,0:50:12.14,0:50:16.95,Default,,0000,0000,0000,,and symmetry of vehicle. As there's no\Nfriction in space, the tiniest event would Dialogue: 0,0:50:16.95,0:50:20.58,Default,,0000,0000,0000,,constantly make the spacecraft rotate. The\Ndigital autopilot of the Apollo Guidance Dialogue: 0,0:50:20.58,0:50:24.15,Default,,0000,0000,0000,,Computer uses the jets to maintain the\Nattitude within certain thresholds, Dialogue: 0,0:50:24.15,0:50:28.42,Default,,0000,0000,0000,,so-called dead bands. The autopilot is\Nalso used in case the astronauts ever need Dialogue: 0,0:50:28.42,0:50:31.97,Default,,0000,0000,0000,,to use the hand controllers for thrusters.\NBasically both the command service module Dialogue: 0,0:50:31.97,0:50:35.40,Default,,0000,0000,0000,,and the lunar module have fly-by-wire\Ncontrol. As any thruster could break at Dialogue: 0,0:50:35.40,0:50:39.25,Default,,0000,0000,0000,,any time, the autopilot is capable of\Ncalculating the ideal burn mode even with Dialogue: 0,0:50:39.25,0:50:42.75,Default,,0000,0000,0000,,a reduced number of thrusters. It has some\Nsimple algorithms for center of gravity and Dialogue: 0,0:50:42.75,0:50:45.92,Default,,0000,0000,0000,,weight distribution as well, which are\Ntaken into account when calculating Dialogue: 0,0:50:45.92,0:50:50.36,Default,,0000,0000,0000,,thruster maneuvers. It can do more than\Nthat, though. Give it a new attitude and Dialogue: 0,0:50:50.36,0:50:54.32,Default,,0000,0000,0000,,it will calculate the most efficient\Ntransfer vector to reach the new attitude. Dialogue: 0,0:50:54.32,0:50:58.12,Default,,0000,0000,0000,,In certain flight modes it might be\Nrequired to have a stable rotation, be it Dialogue: 0,0:50:58.12,0:51:01.24,Default,,0000,0000,0000,,for temperature control, monitoring of the\Nlanding site, or other reasons. The Dialogue: 0,0:51:01.24,0:51:05.51,Default,,0000,0000,0000,,autopilot supports stable constant\Nrolling, which can be directly activated. Dialogue: 0,0:51:05.51,0:51:08.38,Default,,0000,0000,0000,,The autopilot does not only control\Nattitude, it also supports the crew in Dialogue: 0,0:51:08.38,0:51:12.03,Default,,0000,0000,0000,,performing powered flight maneuvers. It\Ncalculates a potential solution, which Dialogue: 0,0:51:12.03,0:51:15.60,Default,,0000,0000,0000,,obviously can be overwritten by ground as\Nusual, but still, after confirmation the Dialogue: 0,0:51:15.60,0:51:18.88,Default,,0000,0000,0000,,autopilot automatically fires the engines\Nand keeps a timer for the correct length Dialogue: 0,0:51:18.88,0:51:23.59,Default,,0000,0000,0000,,of time. It does not measure the results\Nof the burn though. For powered flight Dialogue: 0,0:51:23.59,0:51:27.22,Default,,0000,0000,0000,,obviously dead reckoning isn't correct\Nanymore, so the Apollo Guidance Computer Dialogue: 0,0:51:27.22,0:51:30.96,Default,,0000,0000,0000,,contains a subroutine called average G,\Nwhich takes the input from the IMU, Dialogue: 0,0:51:30.96,0:51:35.50,Default,,0000,0000,0000,,meaning gyro and accelerometer, to compute\Nthe change to the state vector. Now that Dialogue: 0,0:51:35.50,0:51:38.77,Default,,0000,0000,0000,,we know how to orient ourselves, and how\Nto control the spaceship, it's time we fly Dialogue: 0,0:51:38.77,0:51:42.30,Default,,0000,0000,0000,,to the moon. Usually the translunar\Ninjection happens in the middle of the Dialogue: 0,0:51:42.30,0:51:46.12,Default,,0000,0000,0000,,second orbit around the earth, so around 2\Nhours 45 minutes into the flight. This is Dialogue: 0,0:51:46.12,0:51:49.68,Default,,0000,0000,0000,,still performed by the third stage of the\NSaturnV so the Apollo Guidance Computer Dialogue: 0,0:51:49.68,0:51:52.28,Default,,0000,0000,0000,,once again should only have a passive role\Nhere by monitoring the translunar Dialogue: 0,0:51:52.28,0:51:56.22,Default,,0000,0000,0000,,injection with the dedicated program P 15.\NAfter separation from the S-IV-B Dialogue: 0,0:51:56.22,0:51:59.35,Default,,0000,0000,0000,,we are on our way. Since the next\Ninteresting phase is the lunar Dialogue: 0,0:51:59.35,0:52:04.21,Default,,0000,0000,0000,,landing, let's skip to that one. Once in\Nlunar orbit, separation between the Dialogue: 0,0:52:04.21,0:52:07.38,Default,,0000,0000,0000,,command and service module and lunar\Nmodule happens four hours and 45 minutes Dialogue: 0,0:52:07.38,0:52:11.45,Default,,0000,0000,0000,,before landing. On the lunar module,\Ndirectly afterwards, rendezvous equipment Dialogue: 0,0:52:11.45,0:52:15.15,Default,,0000,0000,0000,,like radar, strobe and VHF are tested, as\Nwell as the IMU, which is realigned. Dialogue: 0,0:52:15.15,0:52:18.56,Default,,0000,0000,0000,,Additionally there's lots of preparation\Nwork on the lunar module. One of the main Dialogue: 0,0:52:18.56,0:52:22.58,Default,,0000,0000,0000,,tasks is to prepare the abort guidance\Nsystem, AGS, which is another, more Dialogue: 0,0:52:22.58,0:52:25.45,Default,,0000,0000,0000,,simpler computer, that is able to get the\Nlunar module with the astronauts back into Dialogue: 0,0:52:25.45,0:52:29.60,Default,,0000,0000,0000,,orbit and safely docked with the CSM in\Ncase of an emergency. Let's get back to Dialogue: 0,0:52:29.60,0:52:33.22,Default,,0000,0000,0000,,powered descent. The lunar module AGC has\Na special program for that one, P 63, Dialogue: 0,0:52:33.22,0:52:37.60,Default,,0000,0000,0000,,braking phase. The landing radar has\Nswitched on and updates the state vector. Dialogue: 0,0:52:37.60,0:52:40.46,Default,,0000,0000,0000,,The Apollo Guidance Computer controls the\Nburn to reach the correct corridor towards Dialogue: 0,0:52:40.46,0:52:44.51,Default,,0000,0000,0000,,the surface with a minimal amount of fuel.\NThis is fully automatic, the astronauts Dialogue: 0,0:52:44.51,0:52:47.91,Default,,0000,0000,0000,,just sit along for the ride. The lunar\Nmodule is oriented with its descent engine Dialogue: 0,0:52:47.91,0:52:52.04,Default,,0000,0000,0000,,towards the moon, visibility for the\Nastronauts is close to zero. The second Dialogue: 0,0:52:52.04,0:52:55.92,Default,,0000,0000,0000,,program, P 64, starts automatically at\Naround 8,000 feet. Lunar module is pitched Dialogue: 0,0:52:55.92,0:52:58.90,Default,,0000,0000,0000,,so that the astronauts can actually see\Nthe ground and the lunar module commander Dialogue: 0,0:52:58.90,0:53:01.65,Default,,0000,0000,0000,,is getting a better understanding of the\Nlanding site and can search for a suitable Dialogue: 0,0:53:01.65,0:53:06.57,Default,,0000,0000,0000,,spot. The third program, P 68, keeps the\Nlunar module in a stable attitude above Dialogue: 0,0:53:06.57,0:53:10.74,Default,,0000,0000,0000,,the surface and the commander manually\Nadjusts the height in one feet per second Dialogue: 0,0:53:10.74,0:53:13.87,Default,,0000,0000,0000,,increments, to slowly descend to the\Nsurface. Ideally at that point, the Dialogue: 0,0:53:13.87,0:53:17.31,Default,,0000,0000,0000,,horizontal movement of the lunar module\Nshould be zero. After touchdown the crew Dialogue: 0,0:53:17.31,0:53:21.48,Default,,0000,0000,0000,,manually activates program 68, which\Nconfirms to the Apollo guidance computer Dialogue: 0,0:53:21.48,0:53:24.79,Default,,0000,0000,0000,,that yes, we have indeed landed, and\Nensures that the engine is switched off, Dialogue: 0,0:53:24.79,0:53:28.35,Default,,0000,0000,0000,,terminates the average G routine, and sets\Nthe autopilot in a very forgiving setting, Dialogue: 0,0:53:28.35,0:53:32.46,Default,,0000,0000,0000,,to avoid any corrections when it measures\Nthe rotation of the moon. The autopilot is Dialogue: 0,0:53:32.46,0:53:35.70,Default,,0000,0000,0000,,not completely switched off though, as the\Nastronaut might need it in case of an Dialogue: 0,0:53:35.70,0:53:39.34,Default,,0000,0000,0000,,emergency ascent. Well we are on the moon,\Nwe do the usual stuff, small step for man, Dialogue: 0,0:53:39.34,0:53:42.94,Default,,0000,0000,0000,,jump around plant the flag, and we then\Nskip directly to the interesting bits Dialogue: 0,0:53:42.94,0:53:46.95,Default,,0000,0000,0000,,which is liftoff and rendezvous. The\Nrendezvous technique was developed in the Dialogue: 0,0:53:46.95,0:53:50.95,Default,,0000,0000,0000,,Gemini project. Here you can see the Agena\Nrendezvous target in Earth orbit. It Dialogue: 0,0:53:50.95,0:53:54.03,Default,,0000,0000,0000,,follows the principle of an active\Nvehicle, in this case the lunar module, Dialogue: 0,0:53:54.03,0:53:56.87,Default,,0000,0000,0000,,which follows the command and service\Nmodule and approaches it from below at Dialogue: 0,0:53:56.87,0:54:00.98,Default,,0000,0000,0000,,slightly faster orbit. There were actually\Ntwo different ways for rendezvous. A more Dialogue: 0,0:54:00.98,0:54:04.32,Default,,0000,0000,0000,,conservative method called Coelliptic\Nrendezvous which required one and a half Dialogue: 0,0:54:04.32,0:54:07.47,Default,,0000,0000,0000,,orbits for the lunar module to reach the\Ncommand and service module, but gave ample Dialogue: 0,0:54:07.47,0:54:11.61,Default,,0000,0000,0000,,opportunity for monitoring progress, mid-\Ncourse corrections, and orbit scenarios. Dialogue: 0,0:54:11.61,0:54:14.66,Default,,0000,0000,0000,,And a more risky direct rendezvous method\Nwhich directly aimed the lunar module Dialogue: 0,0:54:14.66,0:54:18.78,Default,,0000,0000,0000,,towards the command and service module,\Ntaking less than one orbit until docking. Dialogue: 0,0:54:18.78,0:54:22.43,Default,,0000,0000,0000,,This one was used starting from the Apollo\N14 mission, as Mission Control had more Dialogue: 0,0:54:22.43,0:54:28.14,Default,,0000,0000,0000,,experience and aimed for the shorter, less\Nfuel intensive method. Preparation had to Dialogue: 0,0:54:28.14,0:54:32.29,Default,,0000,0000,0000,,start two hours before liftoff. We have to\Nalign the IMU and we visually monitor the Dialogue: 0,0:54:32.29,0:54:35.72,Default,,0000,0000,0000,,orbit of the CSM and calculate the\Nrendezvous data. The Apollo Guidance Dialogue: 0,0:54:35.72,0:54:40.35,Default,,0000,0000,0000,,Computer has program 22, CSM tracking, for\Nthis purpose. At liftoff minus one hour, Dialogue: 0,0:54:40.35,0:54:44.13,Default,,0000,0000,0000,,we start program 12, powered ascent, and\Nfeed it with the necessary data, liftoff Dialogue: 0,0:54:44.13,0:54:48.64,Default,,0000,0000,0000,,time and velocity target. The Apollo\NGuidance Computer performs the countdown, Dialogue: 0,0:54:48.64,0:54:52.14,Default,,0000,0000,0000,,and ask for confirmation, we proceed and\Nwe have liftoff. Dialogue: 0,0:54:52.14,0:54:55.20,Default,,0000,0000,0000,,The trip into orbit takes only seven and a\Nhalf minutes but depending on which method Dialogue: 0,0:54:55.20,0:54:58.30,Default,,0000,0000,0000,,for reaching the target orbit was used, it\Ntakes us either one and a half, or three Dialogue: 0,0:54:58.30,0:55:01.71,Default,,0000,0000,0000,,and a half hours to come up behind the\Ncommand and service module. During that Dialogue: 0,0:55:01.71,0:55:04.81,Default,,0000,0000,0000,,time, program 20 is running all the time,\Nmeasuring the state vector of the other Dialogue: 0,0:55:04.81,0:55:08.27,Default,,0000,0000,0000,,vehicle, the command and service module,\Nvia various peripherals like rendezvous Dialogue: 0,0:55:08.27,0:55:12.37,Default,,0000,0000,0000,,radar, VHF antenna, and the optic system\Nfor visual alignment. It calculates the Dialogue: 0,0:55:12.37,0:55:15.53,Default,,0000,0000,0000,,necessary corridor and respective\Nmaneuvers required to get the lunar module Dialogue: 0,0:55:15.53,0:55:18.80,Default,,0000,0000,0000,,into an interception course. Multiple\Nother programs run in parallel to perform Dialogue: 0,0:55:18.80,0:55:22.92,Default,,0000,0000,0000,,the necessary mid-course burn maneuvers.\NOn the commander of service module, the Dialogue: 0,0:55:22.92,0:55:25.73,Default,,0000,0000,0000,,pilot is actively tracking the lunar\Nmodule the whole way up to orbit. The Dialogue: 0,0:55:25.73,0:55:28.58,Default,,0000,0000,0000,,command and service module's computer is\Ncalculating the state vector of the lunar Dialogue: 0,0:55:28.58,0:55:31.85,Default,,0000,0000,0000,,module, to take over the role of the\Nactive vehicle, in case anything goes Dialogue: 0,0:55:31.85,0:55:35.29,Default,,0000,0000,0000,,wrong. The approach of the lunar module\Nstops at 50 meter distance, at which point Dialogue: 0,0:55:35.29,0:55:39.05,Default,,0000,0000,0000,,it rotates to point its docking target on\Ntop towards the command and service Dialogue: 0,0:55:39.05,0:55:42.70,Default,,0000,0000,0000,,module. At that point in time the command\Nservice module takes over the active role Dialogue: 0,0:55:42.70,0:55:46.59,Default,,0000,0000,0000,,and activates program 79, final\Nrendezvous, which slows down the command Dialogue: 0,0:55:46.59,0:55:50.24,Default,,0000,0000,0000,,and service module to close the distance\Nuntil docking. Seconds before contact, the Dialogue: 0,0:55:50.24,0:55:54.62,Default,,0000,0000,0000,,autopilot on both spacecraft is switched\Noff to avoid both trying to correct the Dialogue: 0,0:55:54.62,0:55:58.74,Default,,0000,0000,0000,,attitude of the combined spacecraft. So\Nfar so good, time to go home with the Dialogue: 0,0:55:58.74,0:56:02.31,Default,,0000,0000,0000,,trans-earth injection. We feed the Apollo\Nguidance computer with Earth orbit Dialogue: 0,0:56:02.31,0:56:05.91,Default,,0000,0000,0000,,parameters and let it calculate the burn\Nwhich is then activated and controlled. Dialogue: 0,0:56:05.91,0:56:09.08,Default,,0000,0000,0000,,Any kind of potential mid-course\Ncorrections are performed the exact same Dialogue: 0,0:56:09.08,0:56:14.21,Default,,0000,0000,0000,,way. Once in orbit around Earth, re-entry\Nparameters are calculated on ground and Dialogue: 0,0:56:14.21,0:56:17.26,Default,,0000,0000,0000,,transferred to the Apollo guidance\Ncomputer via a S-band uplink. The first Dialogue: 0,0:56:17.26,0:56:21.72,Default,,0000,0000,0000,,entry program, P 61, entry preparation,\Nstarts at entry minus 25 minutes. Various Dialogue: 0,0:56:21.72,0:56:25.28,Default,,0000,0000,0000,,landing parameters are requested, like\Nlatitude and longitude of the splash zone, Dialogue: 0,0:56:25.28,0:56:28.63,Default,,0000,0000,0000,,as well as the velocity and angles to\Nenter the atmosphere. Entering and Dialogue: 0,0:56:28.63,0:56:31.94,Default,,0000,0000,0000,,confirming these values completes program\N61, and starts program 62, which basically Dialogue: 0,0:56:31.94,0:56:35.85,Default,,0000,0000,0000,,asks the astronaut to perform a checklist\Nfor manual command module - service module Dialogue: 0,0:56:35.85,0:56:39.42,Default,,0000,0000,0000,,- separation, which is not controlled by\Nthe Apollo guidance computer. After that Dialogue: 0,0:56:39.42,0:56:42.75,Default,,0000,0000,0000,,has been performed it switches\Nautomatically to program 63, entry Dialogue: 0,0:56:42.75,0:56:47.63,Default,,0000,0000,0000,,initialization. At that point, the\Nautopilot is taking care of thruster Dialogue: 0,0:56:47.63,0:56:51.25,Default,,0000,0000,0000,,control to break the command module out of\Nits orbit into Earth's atmosphere. The Dialogue: 0,0:56:51.25,0:56:57.03,Default,,0000,0000,0000,,main program for re-entry is program 64,\Nentry, which starts automatically. Program Dialogue: 0,0:56:57.03,0:57:00.49,Default,,0000,0000,0000,,64 monitors the trajectory, and splashdown\Nlocation, and determines the best entry Dialogue: 0,0:57:00.49,0:57:04.57,Default,,0000,0000,0000,,solution and potential velocity reduction\Nby invoking two specific programs, either Dialogue: 0,0:57:04.57,0:57:08.63,Default,,0000,0000,0000,,P 65, entry up control, which basically\Nmakes the current module surf on the Dialogue: 0,0:57:08.63,0:57:13.25,Default,,0000,0000,0000,,atmosphere to reduce speed and extend the\Nrange, or program 66, entry ballistic, Dialogue: 0,0:57:13.25,0:57:16.41,Default,,0000,0000,0000,,throwing us through the atmosphere like a\Ncannonball. The right mixture of the two Dialogue: 0,0:57:16.41,0:57:22.02,Default,,0000,0000,0000,,is decided by program 64. The last\Nprogram, program 67, final phase, performs Dialogue: 0,0:57:22.02,0:57:25.19,Default,,0000,0000,0000,,the final maneuvers to the splash down.\NThe following steps, like parachute Dialogue: 0,0:57:25.19,0:57:28.79,Default,,0000,0000,0000,,deployment and so on, are not done by the\NApollo guidance computer but by the ELSC, Dialogue: 0,0:57:28.79,0:57:32.20,Default,,0000,0000,0000,,the Earth Landing Sequence Controller. The\Ndrop of the Apollo guidance computer is Dialogue: 0,0:57:32.20,0:57:36.72,Default,,0000,0000,0000,,done before deploying the parachutes. So\Nthis was a beautiful nominal mission, what Dialogue: 0,0:57:36.72,0:57:42.32,Default,,0000,0000,0000,,can go wrong? Well let's start with Apollo\N11, which had a 12 02 program alarm during Dialogue: 0,0:57:42.32,0:57:46.38,Default,,0000,0000,0000,,powered descent. Normally programs during\Npowered descent use about 85% of the Dialogue: 0,0:57:46.38,0:57:49.95,Default,,0000,0000,0000,,processing power of the computer, but due\Nto an incorrect power supply design, the Dialogue: 0,0:57:49.95,0:57:53.10,Default,,0000,0000,0000,,rendezvous... of the rendezvous radar\Ngenerated an additional twelve thousand Dialogue: 0,0:57:53.10,0:57:57.08,Default,,0000,0000,0000,,eight hundred involuntary instructions per\Nseconds, ironically amounting to the exact Dialogue: 0,0:57:57.08,0:58:01.21,Default,,0000,0000,0000,,additional 15 percent load.\NDue to the co-operative multitasking, a Dialogue: 0,0:58:01.21,0:58:07.70,Default,,0000,0000,0000,,queue of jobs build up, which resulted in\Nexecutive overflow and the 12 02 alarm. Dialogue: 0,0:58:07.70,0:58:11.18,Default,,0000,0000,0000,,The operating system automatically\Nperformed a program abort, all jobs were Dialogue: 0,0:58:11.18,0:58:14.86,Default,,0000,0000,0000,,cancelled and restarted. All of this took\Njust a few seconds, and landing could Dialogue: 0,0:58:14.86,0:58:20.09,Default,,0000,0000,0000,,commence. Next, Apollo 13. They had an\Nexplosion of the oxygen tank in the Dialogue: 0,0:58:20.09,0:58:25.12,Default,,0000,0000,0000,,service module at 55 hours 54 minutes 53\Nseconds and it will ... yep, correct, Dialogue: 0,0:58:25.12,0:58:29.23,Default,,0000,0000,0000,,320,000 kilometers from Earth. Fortunately\Nthey could make use of the free return Dialogue: 0,0:58:29.23,0:58:32.40,Default,,0000,0000,0000,,trajectory to get the astronauts back to\Nearth but they had to move to the lunar Dialogue: 0,0:58:32.40,0:58:35.75,Default,,0000,0000,0000,,module to survive, as the command and\Nservice module was completely shut down, Dialogue: 0,0:58:35.75,0:58:39.03,Default,,0000,0000,0000,,including its Apollo Guidance Computer.\NThe IMU settings needed to be transferred Dialogue: 0,0:58:39.03,0:58:42.20,Default,,0000,0000,0000,,to the lunar module system first, adapted\Nto the different orientations of the Dialogue: 0,0:58:42.20,0:58:45.79,Default,,0000,0000,0000,,spacecraft. The manual burns and the mid-\Ncourse corrections were actually done with Dialogue: 0,0:58:45.79,0:58:48.63,Default,,0000,0000,0000,,the abort guidance system on the lunar\Nmodule, due to power constraints with the Dialogue: 0,0:58:48.63,0:58:52.17,Default,,0000,0000,0000,,Apollo Guidance Computer. Successful\Nreboot of the command and service module Dialogue: 0,0:58:52.17,0:58:57.65,Default,,0000,0000,0000,,computer was luckily done hours before re-\Nentry. And last but not least, Apollo 14, Dialogue: 0,0:58:57.65,0:59:00.63,Default,,0000,0000,0000,,which had a floating solder ball in the\Nabort button, which might lead to an Dialogue: 0,0:59:00.63,0:59:03.45,Default,,0000,0000,0000,,unwanted activation of abort, therefore\Nputting the lunar module back into orbit. Dialogue: 0,0:59:03.45,0:59:06.81,Default,,0000,0000,0000,,This was solved within hours, by\Nreprogramming the Apollo Guidance Dialogue: 0,0:59:06.81,0:59:10.01,Default,,0000,0000,0000,,Computer, to spoof the execution of a\Ndifferent program, which was not listening Dialogue: 0,0:59:10.01,0:59:13.29,Default,,0000,0000,0000,,to the abort button during the powered\Ndescend. Real abort activation though Dialogue: 0,0:59:13.29,0:59:18.83,Default,,0000,0000,0000,,would have to be manually activated via\Nthe DSKY. So this was an overview and how Dialogue: 0,0:59:18.83,0:59:23.27,Default,,0000,0000,0000,,the mission software was used on a flight\Nto the moon and back. Dialogue: 0,0:59:23.27,0:59:32.35,Default,,0000,0000,0000,,{\i1}applause{\i0} Dialogue: 0,0:59:32.35,0:59:36.44,Default,,0000,0000,0000,,M: Now you probably want to run your own\Ncode on a real Apollo Guidance Computer, Dialogue: 0,0:59:36.44,0:59:41.10,Default,,0000,0000,0000,,so you need to know where to find one.\N42 computers were built total. Dialogue: 0,0:59:41.10,0:59:46.41,Default,,0000,0000,0000,,Seven lunar module computers crashed onto\Nthe moon. Three lunar module AGC's burned Dialogue: 0,0:59:46.41,0:59:50.47,Default,,0000,0000,0000,,up in the Earth's atmosphere, 11 command\Nmodule computers returned. Dialogue: 0,0:59:50.47,0:59:55.52,Default,,0000,0000,0000,,They're all presumably parts of museum\Nexhibits. And 21 machines were not flown. Dialogue: 0,0:59:55.52,0:59:59.18,Default,,0000,0000,0000,,Little is known about those. One is on\Ndisplay at the Computer History Museum Dialogue: 0,0:59:59.18,1:00:02.24,Default,,0000,0000,0000,,in Mountain View, California, but it is\Nmissing some components. Dialogue: 0,1:00:02.24,1:00:07.29,Default,,0000,0000,0000,,Luckily several emulation solutions are\Npublicly available, as well as a tool chain. Dialogue: 0,1:00:07.29,1:00:11.74,Default,,0000,0000,0000,,And the complete mission source, originally\Nthe size of a medium-sized suitcase,\N Dialogue: 0,1:00:11.74,1:00:17.08,Default,,0000,0000,0000,,is available on github.\N{\i1}laughter{\i0} Dialogue: 0,1:00:17.08,1:00:25.70,Default,,0000,0000,0000,,{\i1}applause{\i0} Dialogue: 0,1:00:25.70,1:00:29.43,Default,,0000,0000,0000,,It takes a village to create a presentation.\NWe would like to thank everyone who Dialogue: 0,1:00:29.43,1:00:32.99,Default,,0000,0000,0000,,helped and supported us. This includes\Nthe indirect contributors, who wrote Dialogue: 0,1:00:32.99,1:00:35.94,Default,,0000,0000,0000,,the books, the original documentation,\Nthe websites, and the software. Dialogue: 0,1:00:35.94,1:00:39.56,Default,,0000,0000,0000,,Thank you very much for your attention.\NC: Thank you. Dialogue: 0,1:00:39.58,1:00:53.02,Default,,0000,0000,0000,,{\i1}applause and cheering{\i0} Dialogue: 0,1:00:53.02,1:00:58.08,Default,,0000,0000,0000,,Herald: Wow that was a densely packed talk.\N{\i1}laughter{\i0} Dialogue: 0,1:00:58.08,1:01:06.26,Default,,0000,0000,0000,,Thanks Michael, and thanks Christian, for\Nthis amazing information overload. Dialogue: 0,1:01:06.26,1:01:11.41,Default,,0000,0000,0000,,Please give a warm hand of applause,\Nbecause we can't have a Q&A, unfortunately. Dialogue: 0,1:01:11.41,1:01:20.11,Default,,0000,0000,0000,,{\i1}applause{\i0} Dialogue: 0,1:01:20.11,1:01:35.45,Default,,0000,0000,0000,,{\i1}postroll music{\i0} Dialogue: 0,1:01:35.45,1:01:41.30,Default,,0000,0000,0000,,{\i1}subtitles created by c3subtitles.de\Nin the year 2018{\i0}