Post · 75 min read· pp. 201–245

Virtual AGC Colossus Page

Contents

What is "Colossus"?

Colossus is the program which was run on the Apollo Guidance Computer (AGC) installed in the Command Module (CM) for Apollo 8 through 17.  In order to be loaded into the AGC—actually, to be converted to the "core ropes" within the AGC — it was orginally necessary to "assemble" Colossus's source code into binary machine language, using a computer program called YUL or its successor program, GAP.  In the context of the Virtual AGC project, of course, the process is somewhat different:  Colossus source code is assembled by the yaYUL program, and then loaded into the yaAGC simulation.

It's Always Sunny in Outer Space

AGC software family treePrograms with names like Sundisk, Solarium, and Sunspot were pre-Colossus versions of the Command Module AGC's software.  They were not forms of Colossus as such, but provided some code for Colossus.  If you click on the image to the right, you can see a simplified family tree for Colossus.

The Colossus program eventually had three major versions, not surprisingly known as Colossus 1 (COLOSSUS), Colossus 2 (COMANCHE), and Colossus 3 (ARTEMIS).  Additionally, there were minor versions such as Colossus 1A, Colossus 2C, and so on.

Finally, SKYLARK was post-Colossus Command-Module software, but it was simply adapted from ARTEMIS.

And that doesn't even begin to cover the varieties of software developed for the AGC installed in the Lunar Module (LM), which you can read about on our Luminary page.

If you'd like to see a more comprehensive but less CM-centric overview of all the available AGC software source code and the manufactured core ropes than presented on this page, you might want to look in the section of our Document Library dedicated to AGC software listings.  The diagram to the right (click to expand) attempts to show the interrelationships between every AGC software version (Luminary, Colossus, or otherwise) and every AGS software version, along with the documentation (Program Change Requests, memos, etc.) documenting the changes.  It covers literally thousands of versions and is therefore very big!

Of course, the command-modules themselves are still in existence, though that doesn't imply they still contain their AGCs ... and most likely none of them do.  Zach Greene has compiled the following partial list:

  • Apollo 7 is located at the Frontiers of Flight Museum in Dallas, Texas
  • Apollo 9 is located in the San Diego Aerospace Museum
  • Apollo 10 is located at the Science Museum in London
  • Apollo 11 is located at the National Air and Space Museum in Washington, D.C.
  • Apollo 12 is located at the Virginia Air and Space Museum in Hampton, Virginia
  • Apollo 13 is located at the Kansas Cosmosphere and Space Center.
  • Apollo 14 is located in the Apollo Saturn V Center at the Kennedy Space Center
  • The Apollo Soyuz CM is located at California Space Center in Los Angeles, California

Available and Particularly-Desired Command Module Software Versions

MissionCSM numberMission TypeCM ProgramRevisionSource CodeOther Mission-Specific DocumentationNotes
N/AN/AN/ATRIVIUM12/1963Syntax-highlighted, hyperlinked HTML Scanned page imagesN/AThis is an unusual program, in that its sole purpose was to demonstrate usage of the original AGC assembler, YUL.  In fact, its very short program listing (only one page of source code!) that was attached to a 1963 manual for YUL.  The document itself was obtained from the personal papers of the late Russel Larson. The program is for a Block I AGC, and thus is not only one of the very few Block I AGC programs that has survived, but is probably the earliest such program that will ever be found. The program itself contains a pedagogically deliberate error — one of the variables it references is not defined within the program — and thus YUL could not fully assemble it.  Besides that error, there are three also-deliberate items in the program that are not aligned at the proper punch-card columns:  one program label, one operator, and one operand.  YUL was apparently fine with those misalignments, though our modern assembler, yaYUL, is not, and it treats two of them as errors.  In spite of all that, however, yaYUL's assembly of the code is remarkably like YUL's. Because TRIVIUM contained these deliberate errors and oddities, we're actually providing it for you in two forms:  TRIVIUM (as hyperlinked at the left) corresponds exactly to the original program, errors and all, while TRIVIUM-repaired fixes those errors, and thus assembles as a syntactically-correct program. However ... you may notice that the program identifies itself as being by "IMA NIT-PICKER".  I surmised that IMA may really have been Hugh Blair-Smith, and Hugh tells me that that is indeed true.  The name IMA NIT-PICKER is actually a tongue-and-cheek reference to Richard Volpi, the principal author of the AGC Information Series document (hyperlinked at the left) in which the program appears.  Richard apparently tended to pay an enormous amount of attention to detail, and hence (Hugh says) was the true nit-picker.  (See also the comments about Volpi in Hugh's book, Left Brains for the Right Stuff.)  Amusingly, though, in reviewing the program after all these years (about 55 of them!), Hugh was surprised to notice that even with the assembly-time error fixed, the program does not actually work.  Given that the program is less than 20 lines long altogether, that may hint at some of the difficulties involved in writing AGC software.  As to exactly what's wrong with the program, I leave that as an exercise for the reader!
N/AN/AN/ASUNRISE45Syntax-highlighted, hyperlinked HTMLApollo Mission 204 Reference Cards Keyboard and Display System Program for AGC (Program SUNRISE) The Compleat SUNRISE AGCIS #12A: Job Control and Task Control AGCIS #15: Block I Apollo Guidance Computer Subsystem AGCIS #16: Progress Control and Fresh Start and Restart AGCIS #17: KEYRUPT, UPRUPT, MARK and DSKY Functions AGCIS #22: Prelaunch Alignment SUNRISE 69 and Erasable Memory Test ProgramSUNRISE is a program used for Block I system tests, providing a similar service, I guess, to what the SUNDIAL program later provided for Block II, and which AURORA provided for the LM.  We acquired SUNRISE 45 by dumping the contents of three physical rope-memory modules to which an anonymous collector gave us access. Now, it often happens that physical rope-memory modules are physically defective in one way or another, either as a result of sitting around for 50-60 years unused, or perhaps due to defective modules being more likely to have been discarded and thus more likely to have found their way into collectors' collections in the first place.  Usually, due to fact that these memory modules have a 16th (parity) bit in addition to the 15 data bits at each memory location, these flaws are relatively easy to correct.  The SUNRISE 45 rope is notable in that one of the three memory modules was rather more severely damaged than usual, but that Mike Stewart was able to deduce corrections for it anyway.  We had a high degree of confidence in those corrections ... but still, they were unusually difficult to make, and we'd have even more confidence in the dumped data if those corrections hadn't needed to be made in the first place. Fortunately, we were later able to obtain a dump from a different physical memory module containing those very same memory banks of SUNRISE 45.  While this module also had flaws, they were all easy to correct, and in any case did not overlap the flaws in the originally-dumped module.  We were thus able to verify that all of Mike's original corrections were indeed correct! By this roundabout route, we can now have complete confidence in our dump of SUNRISE 45. Many thanks to the module's owner, Larry McGlynn! If you're interested in the sordid details, there's a full description in the README for our "Rope Module Dump Library" that contains all of our dumps of physical rope-memory modules and any of the corrections that had to be made.  Just find the entries describing 1003133-20 (the anonymous collector's module) and 1003733-021 (Larry McGlynn's module). Ultimately, given the octal listing of the software provided by these dumps of the physical memory modules — and a few months of effort with "lots of help from" Nik Beug — Mike was able to reconstruct the original AGC source code.  I won't elaborate here on that process, except to say that with all such reconstructions you have to realize that things like program comments and symbolic labels for variables, constant, subroutines, and so forth may not be 100% exact.  But the source code does assemble to give an identical core rope to what was contained in the physical modules, and is certainly a lot easier to understand than an octal listing!  So while we can't expect perfection, this is likely as close to it as you're going to get. Here are some things Mike tells me you can do with Sunrise 45: AGC Self-Check Sunrise 45 has a very early version of self-check that doesn't include erasable tests, fixed memory checks, etc. It essentially only has the control pulse tests. To kick it off: - VERB 21 NOUN 27 ENTER XXXXX ENTER where XXXXX is the number of times you want it to execute. If XXXXX is negative, it will instead loop forever until a new N27 is entered or an error is encountered. The high-level results can be monitored with: - VERB 15 NOUN 01 ENTER 1570 ENTER The first register will contain the address (within bank 5) of the first failure encountered. The next two registers are a double-precision count of successful test completions. When all is working, this will count up very quickly. Orbital Integration The orbital integration section of Sunrise is essentially a test program that propagates a very low-altitude Earth orbit for just a bit more than one orbit. It can be started with verb 37 as follows: - VERB 37 ENTER 11 ENTER - KEY RLSE The program will change to 02, and it will put up a V07N01 display of address 1315. In this display, registers 1 and 2 are a double-precision fractional simulation time in weeks. It will slowly count up until it reaches 0.009 weeks, i.e. 90 minutes, at which point the program will exit. While it's running, the double-precision vectors RDISP (position in kilometers scaled 2-14, address 1431) and VDISP (velocity in meters per second, scaled 26 10-3 √μ  address 1437) can be examined one element at a time with a manual V07N01. I don't think there's a good way to display the whole vector. Other Tests The other tests available in Sunrise are Prelaunch Alignment, Gryo Drift Test, and PIPA Scale Factor Test. All three share two common traits: they're not terribly useful/interesting in a standalone emulator without a simulated inertial subsystem, and they're all very well-documented in the AGC Information Series, unlike self-test and orbital integration. Prelaunch Alignment - Documented in AGCIS Issue 22, Prelaunch Alignment - Started with VERB 37 ENTER 01 ENTER Gyro Drift Test - Documented in AGCIS Issue 21, System Test - Started with VERB 70 ENTER PIPA Scale Factor Test - Documented in AGCIS Issue 21, System Test - Started with VERB 71 ENTER
69Syntax-highlighted, hyperlinked HTMLThe same comments I made for SUNRISE 45 above basically hold equally well for SUNRISE 69, with the difference that the that SUNRISE 69 spans four rope-memory modules rather than just three.  What's really interesting, however, is that the four memory modules are the same three from SUNRISE 45, plus one extra. If you think about it, that's pretty remarkable.  After all, if the three SUNRISE 45 modules never access a 4th rope module, then how would the code in the 4th rope module ever be reached when you're running SUNRISE 69?  The answer is apparently (and obviously, I admit) that there are verb/noun combinations that you can use in SUNRISE 45 to transfer control to an address in the extra rope-memory module, which is designated B22.  (The first three modules are B28, B29, and B21.)  For example, the SUNRISE 69 DSKY electroluminescent test is kind of fun, and it's started by the rather cumbersome command sequence, VERB 21 NOUN 25 ENTER 30000 ENTER VERB 20 NOUN 01 ENTER 15233 ENTER Whereas if you were to attempt the same thing in SUNRISE 45, it doesn't initiate the test.  Rather, control is lost and all further key entries on the DSKY seem to be ignored.  I'd expect that memory-parity errors would be encountered if this happened on a physical AGC, and that it would cause a system reset; since that doesn't happen virtually, I must not support parity checking in the CPU emulator.  It sounds like the kind of thing I'd do. It seems to be the latter command, V20N01E XXXXXE which is used to enter the address of the code to be executed in the 4th memory module ... or I suppose, any other memory module.  It's apparently the CADR of the address (if you're up on your AGC assembly-language pseudo-ops). Speaking of the electroluminescent test, Mike tells me that the only additions to Sunrise 69 (vs Sunrise 45) were tests of various kinds, and that he was indeed able to run all of those tests (with the guidance provided by this memo).  Actually, here are the instructions for how to activate all of those tests: Self-check number two: V36E V21N01E 1762E 77777E V21N26E 02000E V15N01E 1764E V20N01E 14042E C-relay test: V21N26E 04000E V20N01E 15120E DSKY test: V21N26E 04000E V20N01E 15233E Gyro drift test: V21N26E 04000E V20N01E 55675E PIPA scale factor determination test: V21N26E 04000E V20N01E 55703E IMU check: V21N26E 04000E V20N01E 55711E IMU alignment test: V21N26E 04000E V20N01E 55717E Gyro torquing test: V21N26E 04000E V20N01E 55725E
Apollo 3 (AS-202)CSM-011N/ACorona261Syntax-highlighted, hyperlinked HTMLDocument LibraryCorona 261 is the Block I AGC software for mission AS-202.  Quoting from the wikipedia article: "AS-202 (also referred to as SA-202) was the second unmanned, suborbital test flight of a production Block I Apollo Command/Service Module launched with the Saturn IB launch vehicle. It was launched on August 25, 1966 and was the first flight which included the spacecraft Guidance and Navigation Control system and fuel cells. The success of this flight enabled the Apollo program to judge the Block I spacecraft and Saturn IB ready to carry men into orbit on the next mission, AS-204." In other words, this is the first AGC software actually flown, and we can "fly" it too, at least in the sense of using it in the Orbiter spaceflight simulation system with the NASSP add-on. The "next mission" referred to by the wikipedia quote, AS-204, is what's more-commonly known as Apollo 1 ... which of course did not take place.  The spacecraft turned out not to be as ready as the AS-202 mission concluded that it was.  Not AS-202's fault! Speaking of more-commonly-known designations, perhaps you're wondering why I hint that this mission was called "Apollo 3" ... which is not mentioned specifically in the wikipedia article. That's how the mission is referenced in the Instrumentation Lab's report R-700, MIT's Role in Project Apollo, from which a lot of the software-versioning information here comes, and frankly, it's just catchier than "AS-202". While we don't have a contemporary software listing for Corona 261, it turns out that collector Jimmie Loocke had the physical core-rope memory modules, and our Mike Stewart has managed to dump the contents of these modules.  Many thanks to both!  While I'm on the topic, we owe Francois Rautenbach a lot of gratitude, in that his was the original idea for dumping the contents of any of the AGC memory modules, and of Corona 261 in particular, I believe; besides which, he was instrumental in bringing Mike and Jimmie together, so it's unlikely we'd have any of the module dumps you'll find described on this page if it weren't for his intervention. Thanks, Francois! While I won't clutter up this description with the details of that module-dump effort (refer to the README for our Rope-Module Dump Library), I'll note that one problem with the AGC core-rope memory modules is that each "strand" of such a module depends on a matched pair of diodes, and that the diodes degrade over time; therefore, one factor in how successful you are at reading the modules is how well the diodes have remained matched over the decades.  Mike tells me that two of the six memory modules were perfect, dumps of three others required some minor reconstruction, but that the sixth required many, many retries and fixups.  Rest assured, though, that we're convinced the dump is 100% correct. And even if you're not the trusting sort (or perhaps think that we aren't trustworthy sorts!), you can at least verify for yourself that the memory-bank checksums are 100% correct. Besides which, the dumped-and-repaired program can be run in the Orbiter/NASSP spaceflight simulator, and thanks to Nik Beug, here's a video the 35 juiciest minutes of an entire 90-minute simulated AS-202 mission.  Note that the simulation is using a Block II control panel for the command module, so you'll be seeing a Block II DSKY rather than a Block I DSKY, but that doesn't impact the functionality of the Corona 261 program running on the embedded Block I CPU emulator.  (Incidentally, I've cut down the resolution considerably to fit the video into the space below, so once you get the video started you'll probably want to tell it to head on over to YouTube to view it directly in full resolution there!) > ▶ YouTube video: Project Apollo NASSP - AS-202: First Flight of the Apollo Guidance Computer > > Project Apollo NASSP - AS-202: First Flight of the Apollo Guidance Computer As you'll find often throughout these notes, Mike was eventually able to use the dumped core to mostly reconstruct the corresponding source code, via a combination of disassembly of the core-rope dump and comparison to other related software versions. Like all such reconstructions, it's almost necessarily imperfect. But it does assemble identically to the core dump, and you can view our souped-up colorized version of it, as hyperlinked to the left. If you're interested in the evolution of the software, note the document "Programming Changes from AS-202 to AS-501", which is a fairly-detailed explanation of the differences between the Coronal 261 software for the AS-202 mission and the Solarium 55 software for the AS-501 mission (see below).  The document was contributed by AGC developer Jay Sampson, an A/C Electronics contractor back in the day, who was deeply involved in the changes.
Apollo 1 (AS-204A)CSM-012N/ASunspot≥247On our wish listDocument LibraryYes, Apollo 1 never flew, but it certainly deserves a place of honor out of respect for its crew.  I'd sure like to know where this program can be found! This was a Block I spacecraft. The exact version of SUNSPOT that would have flown isn't presently known to me. The only GSOP volume we have references SUNSPOT 238, while SUNSPOT 247 is the revision TRW evaluated in their independent validation testing.  The report mentions that problems were found and had since been fixed, prior to the date of the report (12/13/1966).  Further, the testing apparently involved digital simulation rather than a physical AGC, so it was not limited to SUNSPOT revisions for which memory modules had been manufactured.  Therefore, the version that would have been in the AGC at mission time must be at least 247, but most likely a later version.  On the other hand, the TRW report also refers to SUNSPOT 247 as being an "A-release", which implies two things: firstly, that it was released, and secondly that it was intended for flight hardware (as opposed to being just some random engineering revision, which would have been a B-release). A factoid of some slight interest is that in spite of the general lack of information about the SUNSPOT program, we do know some internal details of the actual SUNSPOT revision that would have flown.  The monthly MIT/IL "Weight and Balance Report", document E-1142, lists SUNSPOT's allocations of fixed memory in its July, August, and September 1966 reports, but only references SUNSPOT development (without listing its allocations) in the June 1966 report.  The allocations are precisely the same from July through September, and the reports clearly state as well that the software is for AS-204 (Apollo 1) and AS-205 (Apollo 2).  There were no reports in October through December, and the January 1967 report, produced just before the fire, does not mention SUNSPOT at all. From which it would be reasonable to conclude that work on the Apollo 1 had finished up sometime between the June and July reports, and development had proceeded to other software.  Recall that the Apollo 1 fire was on January 27, 1967, and that the planned launch date was February 21, 1967. Coming at it from a different angle, Table 4-I from volume 3 of report R-700 (which actually appears at the top of this page) mentions only one SUNSPOT revision, 1021107-031, "released to manufacture" in July 1966.  This appears to completely agree with the reasoning above, except that the table also refers to it as used in "APOLLO 3 Manned Earth Orbital (not flown) BL I."  "Apollo 3" could be a reference to the canceled AS-207/208 mission, except that that would have been a Block II spacecraft, not Block I; beyond that, I'm not aware of any then-planned Block I mission to which "Apollo 3" could refer, so it's a mystery. Another mystery is that AS-204A and AS-205A (Apollo 1 and 2) would have seemingly used different revisions of SUNSPOT.  The TRW independent software evaluation refers to these as the A-release and B-release, but mentions that their own evaluation used only the A-release.  It would be odd if the A- and B-releases used identical fixed-memory allocations, unless the differences were something that used the same amounts of memory, such as changes to the ephemeris.  The 1969 specification for the K-START tape numbering system — that being the tape system that stored the core-rope images — does reference both "Sunspot" and "Sunspot B Revision".  So it seems likely that A was for Apollo 1 and B was for Apollo 2, but with identical fixed-memory allocations for some reason. At any rate, if we assume that the fixed-memory allocation for the revision of SUNSPOT listed in these Weight and Balance Reports is indeed that targeted for Apollo 1, and was indeed being manufactured for it, then those allocations looked like the accompanying figure (click to enlarge).
Apollo 4 (AS-501) Apollo 6 (AS-502)CSM-017 CM-020 SM-014A-1 A-2Solarium55Syntax-highlighted, hyperlinked HTML Scanned page imagesDocument Library (Apollo 4) Document Library (Apollo 6)Apollo 4 and Apollo 6 were unmanned missions, but it they did have working CSMs and working AGCs in the CMs.  Eldon C. Hall's copy of the AGC program listing is in the American Computer Museum, which has graciously allowed us to digitize the program listing for use in Virtual AGC.  These were Block I spacecraft. The "Programer"—yes, that's the real spelling, though some sources do refer to it as the "programmer"—was a gadget that was the stand-in for the crew. Regarding the software versioning, longtime readers may recall that for many years there was some confusion here regarding that subject.   We believed, on the basis of a brief note in volume I of the MIT/IL report R-700, ```text
code
                  November 1966     SOLARIUM 54 mission program released for APOLLO 4 (CM).
                                    SOLARIUM 55 mission program released for APOLLO 6 (CM).
that
| 2TV-1 | CSM-098 | N/A | **Sundial** | E | [Core rope dump](https://github.com/virtualagc/virtualagc/tree/master/SundialE)    [Syntax-highlighted, hyperlinked HTML](https://www.ibiblio.org/apollo/listings/SundialE/MAIN.agc.html) | [Document Library](https://www.ibiblio.org/apollo/links2.html#2TV-1) | ![](https://cdn.archive.preserve.ng/img/88fd90602d306215440f8e1b0525d9b9adb6bac30eda044c7570d357cd7ae7dc.webp)There's a nice online writeup of [the 2TV-1 mission](http://www.angelfire.com/ma3/spacepatch/2TV1.html) that I won't paraphrase here, except to say that it comprised four substantial (177 hours), crewed missions that occurred entirely on the ground in June 1968.    "2TV-1" stands for Block II Thermal Vacuum no. 1, and more-or-less describes the missions, which were to subject the spacecraft to vacuum and to thermal shock whilst the astronauts did astronauty things.     While we don't have a contemporary assembly listing of Sundial E, Mike Stewart was able to dump the contents of physical core-rope modules in the AGC owned by the MIT Museum, using [a restored, operational AGC](https://www.ibiblio.org/apollo/Restoration.html) to do so. Mike went on to reconstruct (to the extent possible) the software source code that must have been used originally to create the physical memory modules. That's the source code you'll see hyperlinked in one of the columns to the left. As in all such restorations, while the code does assemble correctly, *some* of the symbolic labels and program comments remain unknown; the former have been replaced by mostly-plausible substitutes until such time as the original labels are discovered.      As for the Sundial program itself, I do not have a good written description of it.  It seems to me that it was used primarily for Command Module system tests, similar to the way the Aurora software (see our [LUMINARY page](/u/1cd83cda814a81b1)) was used for the Lunar Modules.  Sundial E in particular was in the test ropes used for the majority of Command Modules. |
| Apollo 7 | CSM-101 | C | Sundisk | 282 | On our wish list | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo7) | Unfortunately, we do not presently have this software, which flew on Apollo 7.    For further insights, note [document E-2150](https://www.ibiblio.org/apollo/Documents/HSI-208476.pdf), "Guidance, Navigation, and Control Block II Command and Service Module Functional Description and Operation Using Flight Program SUNDISK (Rev. 282)", whose preface reads: "The purpose of this document is twofold.  The first is to provide a functional description (operationally oriented) of the CSM GNCS hardware and software and the interfaces with other SC systems.  The level of detail is that required to identify and define telemetry outputs. Also included are functional flow diagrams of the Sundisk 282 programs and routines together with lists of verbs, nouns, option codes, and checklist codes for this flow. The second purpose is to provide the operational procedures for this hardware and software including malfunction procedures, and program notes.  The nominal airborne expanded and condensed checklist for Sundisk appear in the Guidance System Operation Plan, R547." |
| Apollo 8 | CSM-103 | C' | Colossus 1 | 237 | [Syntax-highlighted,  hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Colossus237/MAIN.agc.html)    [Scanned page images](https://archive.org/details/Colossus237J2k60) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo8) | Colossus 237 flew on Apollo 8.     The Colossus 237 program listing was made available by original AGC developer Fred Martin.  (Thanks, Fred!)  The listing cuts off abruptly after page 1557—whereas you'd normally anticipate that there are 1700+ pages—so some of the assembler-generated tables at the end of the listing are missing.  Of particular inconvenience, because it presents special problems for verifying the correctness of the simulation, is the absence of the octal listing and of the memory-bank checksums.  However, all of the source code is present, and that's enough to work with.    Note that we have [a contemporary digital simulation of Colossus 237](https://archive.org/details/Colossus237DigitalSimulationAnomaly45Images), though it only covers a bailout during burn (Colossus Software Anomaly Report #45, of which we unfortunately don't presently have a copy).  By "contemporary", I mean that it's an Apollo-era simulation, and not one produced by the Virtual AGC Project.  It is the only Colossus digital simulation available so far, although there are a number of [Luminary](/u/1cd83cda814a81b1) digital simulations in our library, and as such it has a unique value.  Specifically, it has pad-loads, though those pad-loads are for March 1969 rather than for December 1968. |
| Apollo 9 | CSM-104 | D | Colossus 1A | 249 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Colossus249/MAIN.agc.html)    [The original raw scans, unprocessed](https://archive.org/details/Colossus249MartinPp15651719) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo9) | Two separate sets of scanned images of the Colossus 249 program, which was the CM software that flew on Apollo 9, are available.  They are from different reproductions of the *same* original 1968 printout, as owned by different AGC developers.  Scanned image set #1 is in far better condition than set #2 and is more legible, and is the only one linked here.  But only the less-legible set #2 was actually available to me when I originally implemented Colossus 249.  Any hand-written notes on the listings are from the original developers (as far as I know), and so those notes differ on the two image sets.     Scanned image set #1 is from a copy in the collection of original AGC developer Fred Martin.  (Thanks, Fred!)  Fred provided it to us temporarily for the purpose of scanning it.     As for scanned image set #2, the marking on the front of the document implies that it was original AGC developer Norm Brodeur's copy.  I originally obtained the scan from MIT's Dibner Institute's now-discontinued website titled "History of Recent Science and Technology."  Here at Virtual AGC, I choose to present the listing as a set of individual page images instead of a giant PDF.  This listing has been improved by the replacement of 52 garbled pages (supplied by Mr. Gary Neff).    I have been told that the assembly listings, originally, could be printed either on "very noisy" line-printers with a restricted character set that happened to correspond to the character set allowed for the AGC programs themselves, or else on a page-printer that had a 256-character set, but in which the character set could be swapped out to allow different characters to be printed from the same numerical codes.  All of the AGC printouts that are available to us are from the line printers, *except* this Colossus 249 printout, which was made on the page printer.  Unfortunately, the wrong character-set was set up on the printer when the printout was made, so that while all of the upper-case alphanumeric characters were printed correctly, many of the non-alphanumeric characters were systematically printed as different characters, in a kind of substitution cipher.  The complete set of character-substitutions, in so far as I have been able to discern them, is as follows:  | Desired Character | Printed As | | --- | --- | | < | ± | | ' | α | | " | β | | | | γ | | > | δ | | ? | π | | % | Σ | | & | d | | # | ∫∫∫ ∫ | | : | ' | | @ | : | | \_ | *discarded* |   Naturally, in transcribing the scanned assembly-listing as source code, we have made these substitutions already, so a '<' looks like a '<', a '?' looks like a '?', etc. |
| Apollo 10 | CSM-106 | F | **Colossus 2  (Comanche)** | 44 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Comanche044/MAIN.agc.html) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo10)  Reconstruction  roadmap:  [![](https://cdn.archive.preserve.ng/img/f37e28cdc9c0de9911a1732b8b87aa27571f4df75abb60dd5041a8f682d657d5.png)](https://www.ibiblio.org/apollo/Apollo%2010%20Software%20Reconstruction.png) | This is the first software release of Comanche targeted for Apollo 10 whose rope-memory modules were manufactured.  It is *not* the version that was eventually flown in the mission.     We know that Margaret Hamilton has a copy of this software version, and hope to get it from her some day.  But that hasn't happened so far, and thus we do not have access to an original program listing.  Why, then, have I provided a hyperlink to purported Colossus 44 source code?    The source code we provide has been *reconstructed* from existing source code for other versions of Colossus, with close consultation to contemporary documentation describing the changes between different versions of Colossus.  Even though it's "merely" a reconstruction, we think the reconstructed source code is either exact, or else very, *very* close to the original.  We can say that because there exists a contemporary document, [engineering drawing 2021153](https://archive.org/stream/apertureCardBox467Part2NARASW_images#page/n88/mode/1up), that lists the correct memory-bank checksums for Colossus 44.  Since the reconstructed program's memory-bank checksums match the listed ones, we thus have a pretty good feeling about the correctness of the reconstruction.  It should still be noted that the contemporary change documentation consulted was neither 100% perfect nor complete, and thus there are still some questionable points in the reconstruction, particularly in log section P20-P25.  Nevertheless, even if these minor details turn out later not to have been reconstructed 100% perfectly, we don't believe that they would adversely affect program execution.      The reconstruction was carried out — brilliantly, in my (RSB) opinion — by Mike Stewart.  He started from Comanche 51 — which he had *previously* reconstructed ([see below](#COMANCHE51)) — and Colossus 249, while pulling snippets of code from various other versions of Colossus as well.  If you want to learn how it was done, Mike's running commentary on how he did it can be found in [problem report #1134](https://github.com/virtualagc/virtualagc/issues/1134) of our GitHub repository.    AGC-software reconstructions of this kind would *normally* be subjected to the additional test of being flown in a simulated Apollo mission using the Orbiter/NASSP spacecraft simulator.  (By the way, thanks to Nik Beug, who has flown these simulated missions a lot of times!)  In the case of Comanche 44, however, Nik points out a problem:  The software has a bug — relating to a broken interface between sub-programs P30 and P40 — which would prevent it from operating properly using final Apollo 10 flight procedures as-is.  Indeed, the presence of this bug is the very reason that Comanche 44 was originally obsoleted in favor of Comanche 45 (see below).  The broken interface was fixed in Comanche 45.  Since the official flight procedure can't be used, Nik has expressed an understandable reduction of enthusiasm in flying Comanche 44. ![](https://cdn.archive.preserve.ng/img/99e6bf519edb27de72bd40bc454d35920e0abe9f32ff149c22e96be19a52a27e.png)  But all is not lost!  The plan is to next reconstruct Comanche 45 using Comanche 44 as a starting point ... and then presumably to test fly an Apollo 10 mission using Comanche 45, which would then indirectly serve as an additional validation of the Comanche 44 reconstruction.  So stay tuned for that.      If, however, *you* would nevertheless like to fly a simulated Apollo 10 mission with Comanche 44 anyway, it should be possible to do so.  That's because there is a workaround for the broken P30/40 interface, described in the original MIT/IL Software Anomaly Report ([see here](https://github.com/virtualagc/virtualagc/issues/1136)) written in 1969 by AGC developer Fred Martin.  In other words, you have to use the correct Apollo 10 procedures *plus* the workaround.  The workaround reads as follows:  Avoidance Procedure:    Work around procedure for COMANCHE 44 at FL V37 in P30:   V4N1E  3771E  V21E  3653E then enter quantity display in R<sub>2</sub> into R<sub>1</sub>; i.e.,    XXXXXE If you are able to successfully fly a simulated Apollo 10 mission with Comanche 44 and this workaround, do let me know and I'll give you a shout out for posterity here!  Make a video of the relevant portion of the simulated mission, and I'll include it here as well! |
| 45 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Comanche045/MAIN.agc.html) | This is the second revision of Comanche targeted for Apollo 10 with rope-memory modules actually manufactured.  It ended up not being flown in the mission.     As with Comanche 44, we have no program listing for this revision of the code.  But Mike Stewart has reconstructed the code, starting from Comanche 44 (see above) and Comanche 51 (see below) as baselines.  Fortunately, we actually had a certain amount of contemporary documentation, including a crucial Colossus memo (#140) and MIT Software Anomaly Reports, all included in [a nice little cache of phone snapshots](https://www.ibiblio.org/apollo/Documents/Colossus%202%28A%29%20Software%20Changes.pdf#view=FitH) given to us by Debbie Douglas of the MIT Museum.  There were actually only a couple of changes (literally 2 small blocks of code) from Comanche 44, but it turned out to be incredibly hard figuring out how to integrate them into Comanche 45.  I can say that of my own [RSB] knowledge, since I spent around a week messing around with it full time.  It's the first AGC software reconstruction effort I participated in directly, in a very minor way, as opposed to just providing commentary about it at the end of the process.  It's a very impressive process, documented in detail [here](https://github.com/virtualagc/virtualagc/issues/1136), and I think you can feel highly confident of the fidelity of the reconstruction to the original Comanche 45 code.  At least, *I* do.  And of course, as is always the case with these reconstructions, the assembled core-rope module has checksums exactly matching the known-correct checksums for Comanche 45, and has been subjected to other cross-checks for consistency as well.    Unlike the Comanche 44 code, the Comanche 45 code should be eminently flyable in a simulated Apollo 10 mission, without any need for workarounds that depart from the official procedures.  However, why do that when you can fly Comanche 45/2 (see below)!  Of course, if you do test fly a simulated Apollo 10 mission with Comanche 45, do let us know. |
| 45/2 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Manche45R2/MAIN.agc.html) | This is the third and final revision of Comanche for Apollo 10, and is the one actually flown in the mission.  I should clarify that strictly speaking this is not a revision of "COMANCHE".  Instead, it is a side development branch that split off from COMANCHE at COMANCHE 45, and is actually called "MANCHE45", thus if we had the printout of the original assembly listing (which we do not), at the tops of the pages it would say "REVISION 002 OF PROGRAM MANCHE45".  The reason for this is that it allowed Apollo 10 development to continue with MANCHE45 rev 1 and rev 2 while Apollo 11 development was independently going on with COMANCHE 46, COMANCHE 47, etc.     Like Comanche 44 and 45, we do not have a contemporary program listing for 45/2, so [the source code has instead been accurately reconstructed](https://github.com/virtualagc/virtualagc/issues/1138).  As usual, all memory-bank checksums of the assembled code match the known-good checksums listed in [engineering drawing 2021153](https://archive.org/stream/apertureCardBox467Part2NARASW_images#page/n88/mode/1up).    **Subsequent note**: About 9 months after the reconstruction mentioned above was completed, a user's manual for the GAP program was discovered.  Recall that "GAP" stands for "General Assembler Program", and that it was the assembler (having superseded YUL) that was being used at the time of Apollo 10.  Tucked away in an Appendix at the back of the user's manual is an example of how to use GAP's feature for listing octal differences between two core ropes.  The numerical example happens to be a complete octal comparison of Comanche 45 vs 45/2.  In other words, if you happened to have a complete octal listing for Comanche 45, you could use this list of differences to immediately construct a complete octal listing for Comanche 45/2.  Or vice versa.  It turns out that the octal differences listed in that Appendix are precisely those differences between our reconstructions of Comanche 45 and 45/2.  So if you need additional confidence in the accuracy of the reconstructions, beyond whatever confidence you feel due to the correct checksums, hopefully this will give it to you!  Fortunately,  the reconstruction of Comanche 45/2 from Comanche 45 seems to have been accomplished with very little time and effort ... at least compared to the vast amounts of time an heartache some of them need.  So I'm happy — not having had to do the work myself! — that the reconstruction was performed before we found the list of octal differences.  It makes you feel good that the reconstruction techniques proved to be so powerful.    By the way, section 5 of the GSOP, presented here, was provided by original AGC developer Fred Martin. |
| Apollo 11 | CSM-107 | G | **Colossus 2A****(Comanche)** | 51 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Comanche051/MAIN.agc.html) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo11) | <a id="COMANCHE51"></a>Comanche 51 was the software release *initially* intended to be used in the Apollo 11 Command Module.  Its rope-memory modules were manufactured.  However, there were subsequent revisions to the software before the mission occurred, so Comanche 51 never flew, and Comanche 55 (see below) did instead.     We do not have a copy of one of the original Comanche 51 program listings, but it turns out to be possible to reconstruct its source code with confidence.  Mike Stewart (thanks, Mike!) has done so, and written up [an explanation](https://github.com/virtualagc/virtualagc/pull/1080).    In brief, the explanation is this:  We already had the source code for Comanche 55 (see below), and we knew that the difference between Comanche 51 and 55 was the addition of the so-called R-2 lunar potential model.  Therefore, if the code for the R-2 lunar potential model were removed from the source code for Comanche 55, we should have the source code for Comanche 51.  Fortunately, we have other AGC programs (Luminary) in which the R-2 change was made, so that example made the removal task much easier than it might have been otherwise.    All of is great, but it sounds like pure speculation!  There's no way to verify it,  right?    Fortunately, not right!  We *do* have a way to verify the correctness of the reconstructed program, perhaps not with 100% certainty, but nevertheless fairly convincingly, with greater than 99.99% confidence.  Because what I failed to mention is one additional resource, namely [engineering drawing 2021153](https://archive.org/stream/apertureCardBox467Part2NARASW_images#page/n88/mode/1up).  Drawing 2021153 is a list of the manufactured Comanche rope-memory modules, including Comanche 51.  In addition to listing the software releases, it also lists all of the memory-bank checksums of the rope-memory as well.  For example, it immediately tells us things, such as that of the 36 memory banks, only three of them have changed between Comanche 51 and 55.    More importantly, the reconstructed Comanche 51 source code, when assembled using the yaYUL assembler, does indeed produce a rope with all memory banks having the correct checksums as given by drawing 2021153.  We conclude, therefore, that it is very likely correct source code! |
| 55 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Comanche055/MAIN.agc.html)    [Scanned page images](https://archive.org/details/Comanche55J2k60) | This is the 2nd and final revision of Colossus for Apollo 11, and is the one actually flown in the mission.     Page images have been taken from a hardcopy from the Charles Stark Draper Historical Collection, MIT Museum, and then converted to source code by a team of volunteers.      |  |  |  | | --- | --- | --- | | Honor Roll   Organizational honors   |  |  | | --- | --- | | Massachusetts Institute of Technology / MIT Museum  Building N51, 265 Massachusetts Avenue  Cambridge, MA  02139  [web.mit.edu/museum/](http://web.mit.edu/museum/) | [![](https://cdn.archive.preserve.ng/img/49bb24e356a93be61abed4e50ad9440f7c540ad6534b955ef397ea1befbdfffc.gif)](http://web.mit.edu/museum/) |     Individual honors   - Deborah Douglas, the Museum's Curator of   Science and Technology, who conceived the idea   of making this material available to us, and   without whom we had literally no chance of   obtaining it. - Paul Fjeld, for digitizing the hardcopy. - (In alphabetical order) Fabrizio Bernardini,   Hartmuth Gutshe, Onno Hommes, Jim Lawton, and   Sergio Navarro, for converting the page images   to source code. - ... and those whose names I do not know at   the Charles Stark Draper Laboratory and NASA   who allowed us to do this. | |
| Apollo 12 | CSM-108 | H-1 | Colossus 2C  (Comanche) | 67 | [Syntax-highlighted, hyperlinked HTML](https://www.ibiblio.org/apollo/listings/Comanche067/MAIN.agc.html) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo12) | This is the CM AGC software flown on Apollo 12.    While we have no contemporary source-code listing, we've obtained an accurate core-rope image of Comanche 67, dumped from physical core-rope modules of an anonymous collector.  I'm told that from the serial numbers of the modules, they appeared to comprise a spare flight set.  (Thanks, Anonymous!)  Mike was able to quickly regenerate Comanche 67's source code — albeit, as always, with a proviso that program comments and other features of the source code that aren't reflected in the core rope may inaccurate.  **Aside:**  Before we had much hope of getting either source code *or* binary for Comanche 67, I spent a lot of time and effort on my one-and-only attempt at AGC software reconstruction.  Mike Stewart, who has created all of the *other* AGC software reconstructions we've made available, had already concluded that reconstructing Comanche 67 would be too hard, or more-likely impossible.  And you know what?  He was right!  Still, it was an interesting exercise, even if doomed to ultimate failure, and you can still read [the endlessly-detailed description of how I went about it](https://github.com/virtualagc/virtualagc/issues/1140), as well as the hypothetical source code that resulted.  I'll keep that stuff around as an object lesson in hubris.  On the other hand, the whole Virtual AGC Project is an object lesson in hubris, even if most of it has been far more successful than reconstruction of Comanche 67!  But jokes aside, the effort was instructive ... at least for me. Ultimately, exactly 80% of the source-code files in my reconstruction were correct, but 20% had differences I hadn't identified or active errors on my part. See also document E-2442, "[Guidance, Navigation, and Control Command Module Functional Description and Operation Using Flight Program COLOSSUS 2C (COMANCHE 67)](https://www.ibiblio.org/apollo/Documents/HSI-208615.pdf)", whose preface reads: "The purpose of this document is twofold.  The first is to provide a functional description (operationally oriented) of the CSM GNCS hardware and software and the interfaces with other spacecraft systems.  The level of detail is that required to identify and define telemetry outputs. Also included are function flow diagrams of the COLOSSUS programs and routines together with lists of verbs, nouns, option codes, and checklist codes for this flow. The second purpose is to provide the operational procedures for this hardware and software including nominal airborne condensed checklists, malfunction procedures, and program notes." |
| Apollo 13 | CSM-109 | H-2 | Colossus 2D  (Comanche) | 72 | [Syntax-highlighted, hyperlinked HTML](https://www.ibiblio.org/apollo/listings/Comanche072/MAIN.agc.html) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo13) | Comanche 72 was the first revision of the CM AGC software targeted for Apollo 13 that was actually manufactured into core ropes.  It wasn't flown, however, with that honor instead going to revision 72/3 (see next entry).    While we have neither the contemporary software listing nor a dump from the contents of physical core-rope memory modules, Mike Stewart has fortunately been able to reconstruct the source code for it, using as source material the original program-change notices (from Comanche 67 to Comanche 72), the physical dumps of Comanche 67, the source code from related versions, and other materials.  [The very-detailed notes of this process are here](https://github.com/virtualagc/virtualagc/issues/1179).  There are two significant things to know:   1. The assembled core-rope image created from this source code has the known-good memory-bank checksums for Comanche 72. 2. This reconstruction has a bit more uncertainty in one sense than    the reconstructions Mike has made of software from other missions:     There are, I believe, two places in the reconstruction where a pair of    instructions can be interchanged while preserving both the functionality    and the memory-bank checksums.  Resolving this Cosmic    Spoonerism™might be possible at some point if additional resources    become available, but for now we'll just have to live with it. |
| 72/3 | [Syntax-highlighted, hyperlinked HTML](https://www.ibiblio.org/apollo/listings/Manche72R3/MAIN.agc.html) | This is the CM AGC software flown on Apollo 13.  Strictly speaking, it's not actually COMANCHE at all, but rather is a development branch called MANCHE72 that split off from COMANCHE at COMANCHE 72.  The idea is that bug fixes or other changes strictly for Apollo 13 could be made in MANCHE72 rev 1, rev 2, and rev 3 while changes strictly for Apollo 14 could continue to be made independently in COMANCHE 73, COMANCHE 74, COMANCHE 75, and so on.  This is a technique you use in strictly-controlled software to avoid unintentionally mixing in changes for one mission with those from another.  You see, all changes have to be approved by a so-called "control board", and changes are typically approved for specific missions rather than willy-nilly blanket approvals that affect lots of missions at the same time.  Thus if we were lucky enough to have a printout of the assembly listing (which we do not), at the tops of the pages it would say that this is "REVISION 003 OF PROGRAM MANCHE72", and would not mention COMANCHE at all.   We currently lack a contemporary assembly listing or physical memory modules of MANCHE72R3, but since there was only a single approved change vs Comanche 72, reconstruction of the source code was relatively easy.  (I'm told!)  And the *documentation* of the reconstruction process ([see here](https://github.com/virtualagc/virtualagc/issues/1180)) is certainly much smaller than that of Comanche 72.  The reconstruction does inherit the "Cosmic Spoonerism" problem of the Comanche 72 reconstruction, but I don't think that that detracts from the confidence we should have it.  I'm told also that some tests have been performed on the reconstructed MANCHE72R3 in Orbiter/NASSP, but there are no fully-flown missions or videos from simulated missions to report to you as of yet. |
| Apollo 14 | CSM-110 | H-3 | Colossus 2E  (Comanche) | 108 | On our wish list | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo14) | This is the CM AGC software flown on Apollo 14.    Although we don't presently have the Apollo 14 CM software, Niklas Beug, a developer and user of [NASSP, the Apollo-mission add-on for the Orbiter spaceflight simulator](https://github.com/dseagrav/NASSP), tells us that it's actually possible to use a modified form of Artemis (the Apollo 15-17 software) to fly satisfactory Apollo 14 missions.  Let me simply quote Nik:  We currently don't have any AGC version available that was flown on Apollo 14, which causes a few, mostly procedural issues for NASSP. Apollo 14 was the only mission flown in the time period from July 1st, 1970 to July 1st 1971 and as such used a slightly different coordinate system than the AGC versions before and after that. And using a different coordinate system means that a few hardcoded constants had to be changed every year: star unit vectors, solar and lunar ephemeris in the LGC and a few other numbers. These numbers for the yearly coordinate system used by Apollo 14 are available or can be calculated. So we did just that and created our own AGC versions for Apollo 14. Both CMC and LGC are derived from the AGC versions flown on Apollo 15, Luminary 1E and Artemis (Colossus 3). We determined that these most closely match the programs and capabilities of the AGC versions actually flown on Apollo 14. One regular NASSP user (Alex Bart, ...) tested Apollo 14 with these modified AGC versions and flew the complete simulated mission with them. We are very confident now that these AGC versions are working as they should. As I said, they are essentially still the AGC versions flown on Apollo 15, only slightly modified to properly work with Apollo 14. ... [They are available here](https://github.com/dseagrav/NASSP/tree/Orbiter2016/Config/ProjectApollo), as Artemis072NBY71.bin and Luminary210NBY71.bin, [i.e.] Artemis072 and Luminary210 modified to work for the Nearest Besselian Year (NBY) coordinate system of 1971. Unfortunately, "reconstruction" of the source code for Comanche 108 in a similar fashion to some of the other software versions you see in this table isn't very likely.  The reason is that unlike the software versions which have been (or may yet be) reconstructed, we do *not* know the memory-bank checksums for Comanche 108; thus even if by some chance the code were to be reconstructed perfectly, we still would not have any assurance whatever that the reconstruction was correct.  And without that assurance, why would anyone use it rather than using Artemis?  So there's little point even attempting a reconstruction other than as a pure intellectual puzzle.    On the other hand, for all I know, a software listing or core-memory-module dump for Comanche 108 could suddenly appear, thus changing everything.  That would be lovely.  In lieu of that, with apologies to the Baroness Orczy,  *We seek it here, w**e seek it there,**We seek Comanche everywhere.**Is it in Heaven?* *—* *Is it in Hell?**It's a damned elusive ne'er-do-well!* |
| Apollo 15 | CSM-112 | J-1 | **Colossus 3  (Artemis)** | 71 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Artemis071/MAIN.agc.html) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo15) | Artemis 71 was the first revision of Colossus targeted for Apollo 15.  Its rope-memory modules were manufactured, but the program was subsequently revised and Artemis 72 instead flew in Apollo 15 through 17.    We do not have a copy of one of the original Artemis 71 program listings, but it turns out to be possible to reconstruct its source code with confidence from the source code for Artemis 72.  Mike Stewart (thanks, Mike!) has done so, and has provided [an instructive full writeup](https://github.com/virtualagc/virtualagc/issues/1087) of how he figured it out.       It turns out that in Artemis 71, there is a potential problem in program P15 (trans-lunar injection initiate/cutoff).  That's the program that burns the S-IVB stage to put the CSM onto a trajectory to the moon.  In P15, a double-precision variable used to track the remaining time of the S-IVB burn could exhibit a problem called sign disagreement.  What's that?  Well, it's a quirk of how AGC double-precision and triple-precision arithmetic works that can't occur in the modern computers you're familiar with.  Sign disagreement is when the more-significant and less-significant halves of a double-precision value have opposite arithmetical signs.  For example, the top half might be -12345 and bottom half might be +67890 ... whereas it would normally be expected that they would be -12345 and -67890.  Thus in Artemis 72, the potential problem was fixed by inserting an extra subroutine call that could detect the problem and fix the sign of the bottom word.    Unfortunately, we have no COLOSSUS memo or other documentation that independently describes this problem or that lists the differences between Artemis 71 and 72, so everything that was said above can only be inferred from the clues in the Artemis 72 assembly listing described by Mike in his writeup.  Fortunately, we *do* have an independent way to verify the correctness of the reconstructed Artemis 71 program, with greater than 99.99% confidence.  That's because we have [engineering drawing 2021154](https://archive.org/stream/apertureCardBox467Part2NARASW_images#page/n93/mode/1up).  Drawing 2021154 is a list of the manufactured Artemis rope-memory modules.  While we don't have the final revision of drawing 2021154, the revision we have does include Artemis 71, and lists the memory-bank checksums for its rope memory.  3 memory banks (out of 36 total) in Artemis 71 have checksums differing from Artemis 72.    The reconstructed Artemis 71 source code, when assembled using the yaYUL assembler, does indeed produce a rope with all memory banks having the correct checksums as given by drawing 2021154.  We can feel confident that it is very likely correct source code! |
| 72 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Artemis072/MAIN.agc.html)    [Scanned page images](https://archive.org/details/Artemis072J2k60) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo15) | This is the 2nd and final revision of Colossus, flown in Apollo 15, Apollo 16, and Apollo 17.    Also known as Artemis build 072, released (Fabrizio Bernardini tells me) January 31, 1971.  A private collector has graciously allowed us to digitize this program listing for use in Virtual AGC.     Thanks also to:   - Henry Wesso, for constructing the special copy stand   used for the digitization. - Gil Guerrero, for providing advice and camera   equipment. - (In alphabetical order) Steve Case, Hartmuth Gutshe,   Onno Hommes, Jim Lawton, and Sergio Navarro, for   converting the page images to source code. - To Jim Lawton, for debugging the converted   source-code files.  See also the Programmed Guidance Equations document ([part 1](https://www.ibiblio.org/apollo/Documents/programmed-guidance-equations-colossus-3-001_text.pdf), [part 2](https://www.ibiblio.org/apollo/Documents/programmed-guidance-equations-colossus-3-002_text.pdf), [part 3](https://www.ibiblio.org/apollo/Documents/programmed-guidance-equations-colossus-3-003_text.pdf)), which is basically a pseudo-code description of the Artemis 72 program.  Unfortunately, pages ORBI-9 and ORBI-10 are missing. |
| Apollo 16 | CSM-113 | J-2 | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo16) |
| Apollo 17 | CSM-114 | J-3 | [Document Library](https://www.ibiblio.org/apollo/links2.html#Apollo17) |
| Skylab 2 | CSM-116 | N/A | Skylark | 48 | [Syntax-highlighted, hyperlinked  HTML](https://www.ibiblio.org/apollo/listings/Skylark048/MAIN.agc.html) | [Document Library](https://www.ibiblio.org/apollo/links2.html#Skylab2) | [![Click to enlarge](https://cdn.archive.preserve.ng/img/6b8ec3dedd6c059c53ab66a835a2438dbdf91eff1f747c449c2c206e2b4395e3.webp)](https://www.ibiblio.org/apollo/Skylark48-Dump-A-20.jpg)The Skylab 2, Skylab 3, Skylab 4, and ASTP missions all used the same Skylark 48 software for the Command Module's AGC.  While we do not have a contemporary listing of Skylark 48's source code, we do have dumps of the physical core-rope memory modules actually flown on the Skylab 2 mission from the [New Mexico Museum of Space History](https://www.nmspacemuseum.org/); many thanks to the museum and Executive Director Chris Orwoll for allowing Mike to dump these modules, and to Larry McGlynn who facilitated!  You can see a photo (click to enlarge) of Mike's setup for dumping the contents of the modules at the right.    For some reason — I guess you use what you have! — the museum stores and/or exhibits the core-rope memory modules as housed within the actually-flown AGC from the Apollo 15 mission:  [![Click to enlarge](https://cdn.archive.preserve.ng/img/fef044ab4d69abe96977977df556934aae444106c7839c63ce3d946ffd0af234.webp)](https://www.ibiblio.org/apollo/Skylark48-Dump-B-50.jpg)   Mike Stewart has reconstructed the Skylark 48 source code via the usual process of adapting source code from elsewhere (such as Artemis 72) until reaching a point where the recovered source code assembles identically to the module dumps.  Which makes it all sound very easy and straightforward ... though you have to know that it's not!  Of course, the dumps of each module individually are also available in our [Rope Module Dump Library](https://github.com/virtualagc/virtualagc/tree/master/Rope-Module%20Dump%20Library), so you can try your own hand at reconstructing the source code if you're feeling particularly cocky.    And as usual, you can run Skylark in our AGC emulator; in the VirtualAGC GUI wrapper of the AGC emulator, for instance, just select the Skylab 2, 3, or 4 mission, or the Apollo-Soyuz mission.    See also the Programmed Guidance Equations document ([part 1](https://www.ibiblio.org/apollo/Documents/programmed-guidance-equations-skylark-001.pdf), [part 2](https://www.ibiblio.org/apollo/Documents/programmed-guidance-equations-skylark-002.pdf), [part 3](https://www.ibiblio.org/apollo/Documents/programmed-guidance-equations-skylark-003.pdf)). |
| Skylab 3 | CSM-117 | [Document Library](https://www.ibiblio.org/apollo/links2.html#Skylab3) |
| Skylab 4 | CSM-118 | [Document Library](https://www.ibiblio.org/apollo/links2.html#Skylab4) |
| Apollo-Soyuz Test Project | CSM-111 | [Document Library](https://www.ibiblio.org/apollo/links2.html#ASTP) |

## <a id="Source_Code_and_Binary"></a>Source Code and Binary

You can obtain all of the software mentioned above as being in our
collection by installing Virtual AGC on your computer.  The
files are contained within a subdirectory named after the software
version (such as "Colossus249" or "Artemis072").  The more
important files supplied are these:

|  |  |
| --- | --- |
| Filename.agc | Source code for major subdivisions of the Colossus program. |
| MAIN.agc | Organizer which treats all of the other assembly-language files (\*.agc) as include-files, to form the complete program. |
| Filename.binsource | Human-readable form of the binary executable as an octal listing. |
| Filename.bin | Binary executable created from binsource (octal listing) file. |

In other words, to create a Colossus
binary executable rather than using the one provided with yaAGC
(such as Colossus249.bin), one simply needs to assemble the file
MAIN.agc.  Typically, if all files remain organized the way
they are in the yaAGC distribution tarball, the sequence of steps
for doing so (from a command-line prompt) would be something like
this:

cd Colossus249
../yaYUL/yaYUL MAIN.agc
>Colossus249.lst

The binary so produced, MAIN.agc.bin, should be byte-for-byte
identical to the binary (Colossus249.bin) provided with the yaAGC
distribution.  Therefore, the following Linux command should
reveal no differences between the two

diff MAIN.agc.bin Colossus249.bin

(Replace "diff" with "fc /b" in Windows.) 

|  |
| --- |
| Technically speaking....A point which may not be completely appreciated is that Colossus249.bin was not created from the assembly-language source files.  Therefore, the byte-for-byte equivalence mentioned above actually has some significance.  In fact, both the assembly-language source code and Colossus249.bin (or Colossus249.binsource) come from separate readings of the original Colossus assembly listing scan, so their equivalence provides an important check on validity.  (See below.)  The file Colossus249.bin was created from the human-readable/editable ASCII file Colossus249.binsource by means of the program Oct2Bin, with the following steps:    cd Colossus249  ../Luminary131/Oct2Bin <Colossus249.binsource  mv Oct2Bin.bin Colossus249.bin   Admittedly, few people are likely to perform any processing of this kind unless contributing a new version of the Colossus code to the Virtual AGC project. |

## <a id="Validity"></a>Validation

I generally put a lot of effort into insuring that the executable
binaries being run in the simulated AGC are byte-for-byte (or in
the case of the AGC, word-for-word) identical to the original
binaries used in the spacecraft.  Most people won't be
interested in this validation effort at all—just as we're not
usually interested in how food gets from plants and animals onto
the plates in front of us as long as we get our dinners on time;
we're happy to trust others to do the work for us—but for those
few of you who wonder if the simulated AGC really is running the
correct code, the following sections provide explanations. 
The different program versions are presented in the order in which
they were worked on.

### <a id="ValidityApollo9"></a>Validity of the Colossus 249 Code (Apollo 9)

The following description of validation was written prior to
having the Colossus249
software source code in machine-readable form, and therefore prior
to being able to the core-rope image against the source code as
described above.  Not only that, but there were seven errors
in the core-rope not detected by the procedure described below!

So the description is now obsolete.  But I like it, and it's
my website, so it stays.  (Actually, it continues to have
value, since we don't yet have all versions of the AGC source, and
since it describes how to proceed in the case of recovering
poor-quality assembly listings.)

#### <a id="A_Tour_of_the_Source_Materials"></a>A Tour of the Source Materials

Let's look at a pages from the  [source materials](https://www.ibiblio.org/apollo/ScansForConversion/Colossus249/0200.pdf)
(actually, a greatly improved version) I've used in reconstructing
Colossus 1A (build
249).  In appearance, what we have is a scan of a photocopy of an assembly listing of the
program.  Significant portions of the assembly listing have
been corrupted (or even destroyed) after scanning, seemingly by
processing with the optical-character-recognition capabilities of
Adobe Acrobat.  (The  [source materials](https://www.ibiblio.org/apollo/ScansForConversion/Luminary131/0202.jpg)
used for Luminary 1C,
build 131, are generally similar, except that the original
photocopy seems to be of better quality, the scans seem to have
been performed with much more care, and no destructive
post-processing has been performed.  On the other hand, the
original Luminary
printout seems to have been on computer paper with green and white
color bars, and the remnants of the green bars make portions of
the listing very difficult to read with certainty.  Most of
what I have to say will apply to Luminary
as well as to Colossus.) 
With
some luck, I'll be able to find (or will be given) better source
materials at some point in the future, but I've had no luck so far
in obtaining such materials and therefore have had to make do with
what's available.

An assembly listing is a
type of report created when a program's source code is processed
("assembled"), in this case by the assembler program called YUL.  (Actually, by GAP, the successor to YUL, but when I say "YUL" I
really mean "either YUL or GAP".)  Such an assembly listing
contains not only a listing of the source code, but also other
helpful information such as the octal values which the source code
assembles to.  The octal codes are what is needed to run the program, while the
source code is what is needed to modify the program.  The general layout of
the Colossus (or Luminary) assembly listing has
a series of sections, of which some of the more interesting are:

- A listing of the source code, side by side with the octal
  codes created from the source code, side by side with the
  addresses at which the octal values are placed.  [Click here](https://www.ibiblio.org/apollo/853.pdf) to see a typical page (without
  OCR).  The source code is on the right-hand side of the
  page, whereas the octal values, addresses, and other
  miscellaneous notations are on the left-hand side of the
  page.  This section occupies about 1500 pages of the
  assembly listing.
- A symbol table, giving the addresses at which all of the
  symbols created by the program are defined.
- An octal listing, which is the same as the octal values
  shown earlier side by side with the source code, but now
  rearranged so that the values are arranged by memory
  address.  [Click here](https://www.ibiblio.org/apollo/1714.pdf) to see a
  typical page (without OCR).  This section occupies about
  150 pages of the source listing.
- An octal-to-page cross reference, in which you can find the
  page of the assembly listing at which the octal value for any
  given address is defined.

#### <a id="Proofing_in_the_Usual_Case"></a>Proofing in the Usual Case

From the description above, you will have noted that source code
is listed once within the assembly listing, but that octal values
created from the source code are listed twice, and are therefore redundant. 
Furthermore, knowing the source code, one can recreate the octal
values from it.  (The reverse is not as easy.)  Finally,
the octal listing is much shorter than the source-code
listing.  Therefore, it shouldn't be surprising that it is
much easier to create a file containing a valid octal listing of
the program than it is to create a file containing a valid
source-code listing.

It is also much easier to know
that an octal listing is valid than it is to know that a
source-code listing is valid.  This is true because the YUL assembler has added
"checksums" to the octal values, which can be used to verify (or
at least give a high degree of confidence) that the octal values
are correct.  The way this works is that the so-called "fixed
memory" of the AGC has been divided into 36 banks, numbered 0-43
in octal notation, each of which has a 15-bit checksum created by
adding up all of the 15-bit words within the bank. 
(Actually, the rule for computing the checksum is more
complicated, but that's the basic idea.)  Therefore, if we
compute the checksum of a bank and see that it is the same as the
checksum provided by YUL,
we can be fairly confident that the contents of the bank are
correct.  (I should mention that I've provided a utility
called Oct2Bin which is
helpful in this connection.  Octal codes can be placed in a
simple ASCII file, and then processed with Oct2Bin to create a file
containing the actual octal/binary codes and to verify all bank
checksums.)

Another helpful touch added by YUL
is that each octal value is accompanied by a parity bit, contrived to make
the number of 1-bits within the octal value (including the parity
bit) an odd number.  This is useful in detecting single digit
errors of some kinds.  (The digits 0, 3, 5, and 6 have even parity, while the digits
1, 2, 4, and 7 have odd parity. 
Therefore,
examination of the parity bit could detect substitution of a '2'
for a '3', for example, but not substitution of a '5' for a '6'.)

In almost all cases, the following simple procedure suffices to
produce a valid octal listing:

1. Manually proof-read a memory bank of the octal listing
   against the original assembly listing, using the redundancy of
   the octal values or manually assembling source code as
   necessary to account for corrupted areas of the assembly
   listing.
2. Compute and verify the checksum.
3. On failure, go back to step 1.  On success do the next
   memory bank.

Given a valid octal listing, determining the validity of a source-code listing is rather
trivial:  simply run the source code through the yaYUL assembler, and verify
that the same octal listing is produced.

This procedure in fact suffices for the entire Luminary octal listing, and
for all memory banks of Colossus
except banks 35 and 36 (octal).  If you want to learn more
about proofing Colossus
memory banks 35 and 36, read onward.  Otherwise, quit now!

Postscript:  After
writing all of the material below, I was fortunate enough to
receive some much-improved page scans of relevant portions of bank
36 from Mr. Gary Neff.  Therefore, bank 36 is now capable of
being proofed by the simple method explained above.  However,
it was previously proofed using the much more complex methods
explained below, and therefore I haven't bothered to change the
explanation that follows.

#### <a id="Proofing_in_Extraordinary_Cases_"></a>Proofing in Extraordinary Cases

The simple proofing method outlined above fails when the scan of
the assembly listing for some memory bank is so corrupted that the bank
checksum or some value(s) within the memory bank are completely
unknown.  Sadly, this condition occurs within Colossus 1C (build 249) banks
35 and 36.  [Click here](https://www.ibiblio.org/apollo/1713.pdf) to see the
culprit page of the octal listing.  This corrupted page from
the octal listing actually wads together the end of bank 35 and
the beginning of bank 36 in such a way that there is no chance of
figuring out any but a small part of them.  In this case, one
has no choice but to use the redundant listing of the octal values
that appears side by side with the source code.

Unfortunately, though, the redundant octal values in the source
code listing fail us here, though in different ways for bank 35
and bank 36.  For bank 35, we encounter the problem that the
bank checksum appears only
within the octal listing and is not redundant.  Therefore, we
can theoretically know all of the octal values in the memory
bank—if our proofing is 100% accurate—but cannot use the bank
checksum to give us the degree of confidence we would like. 
For bank 36, the checksum is intact but some of the octal values
cannot be directly determined because of corruption within the
source-code listing.  (In other words, both the octal listing and
the source-code listing are corrupted in the corresponding place.) 
As far as proofing is concerned, however, the conclusion is the
same:  We need some method of proofing which gives us a high
level of confidence in the result, in the absence of a checksum.

Here is the alternate method of proofing used in this cases, which
seems to offer a fairly high level of confidence:

1. Note first that each memory bank actually occupies 4 pages
   within the octal listing.  For this method, we proof each
   memory page separately from the others.
2. Manually proof-read the memory page, using either the octal
   listing or the source-code listing as desired or
   appropriate.  While doing so, record the number of digits
   which have been corrected.
3. Repeat step 2 until zero corrections have been made in two
   successive proofings.
4. To the extent feasible, one of the 0-error proofings should
   use the octal listing, and the other should use the
   source-code listing.

The theory behind this procedure is that in any given proofing a
certain percentage of errors is corrected, and that by monitoring
the number of errors that have been corrected we can get a good
sense of the number of errors remaining.  To take a "typical"
case, suppose that on the first proofing 100 errors are detected
and corrected, on the second proofing 1 error is detected and
corrected, and on the third and fourth proofings 0 errors are
detected.  It would be reasonable to suppose that each
proofing pass detects 99% of errors, so the expected number of
errors remaining after the 4th pass is 100\*0.01\*0.01\*0.01\*0.01, or
about a millionth of an error.  Of course, this reasoning
assumes that our ability to detect and correct different errors
has some quality of statistical independence, and that errors are
not remaining undetected through some systematic problem.  We
try to overcome that objection by making sure that we use both the
octal listing and the source-code listing in the proofing process,
but how successful we have been is always debatable.

As far as proofing is concerned, this technique suffices for Colossus banks 35 and 36, but
does not actually give us a 100% knowledge of the octal values
within the banks.  For bank 35, we can simply construct a
checksum and be done with it.  But for bank 36, we need to do
a little more work.  If you want to know more about that,
read onward!

#### <a id="When_All_Else_Fails"></a>When All Else Fails—Digital Archaeology

In a case like bank 36, the technique above may give us confidence
that all octal values that are legible in the page images are
keyed accurately, but the proofing technique can't give us any
insight into the octal values that are simply missing from both
the source-code listing and the octal listing.  One trick we
can try is to compare the Colossus
and Luminary source-code,
which actually have a high degree of overlap in general. 
Unfortunately, this is not a case in which there is any such
overlap, so the comparison is of no help.

Click [here (p. 846)](https://www.ibiblio.org/apollo/850.pdf) and [here
(p.
847)](https://www.ibiblio.org/apollo/851.pdf) to see the pages of the source-code listing that are
relevant to the problems in bank 36, namely:

1. Address 36,2634:  This source-code line is simply
   missing.  We have no clue as to what may have been in it,
   except that it is seemingly the first part of a double-precision constant
   whose second part is
   the word 00000 octal.
2. Address 36,2734:  Appears to be interpretive code
   reading "something1
   something2", but only a couple of pixel rows are
   present, and so neither the octal code nor the
   assembly-language code can be read.
3. Address 36,2742:  Highly corrupted, but may have the octal code
   00021 and may have
   interpretive source code reading "16D".
4. Address 36,2747:  Pretty corrupted, but seems likely to
   be the interpretive source code "CALL" with octal code 77624.

As far as points 3 and 4 are concerned, I think it's pretty easy
to convince ourselves that the proposed interpretations are
probably correct.  If you want a challenge, you may like to
try solving problems 1 and 2 for yourself, before continuing to
read my proposed solution below.

Point 2 is somewhat trickier than problems 3 and 4, because the
corruption of the page-image is so much greater.  But with
some effort, we can still figure it out.  Within the [offending page](https://www.ibiblio.org/apollo/851.pdf) of the source-code listing,
notice the notations "REF" and "LAST".  These notations
appear only on source-code lines referencing variables. 
"REF" gives the number of times the variable has been referred to
so far in the assembly listing, which "LAST" gives the page number
on which the preceeding reference occurred.  The problematic
source line clearly contains REF and LAST notations (even though
we cannot read them), and so it is clear that something2 is the name of a
variable.  You should be able to convince yourself fairly
easily that the variable in question is RCON.  In other words, something2="RCON".  (In case
it's still not obvious how
you would convince yourself of this, note that "REF 6" to RCON is below the missing
source line, while "REF 4" is on the preceding page, but that "REF
5" is nowhere to be found.)  Next, because this section of
code is AGC interpreter language (rather than assembly language),
we can narrow down the choices for something1; theoretically, the only
possibilities are STORE,
STODL, or STOVL.  Simply in
terms of appearances, it seems likely that something1=STODL. 
Unfortunately, the interpreter documentation ([Users
Guide
to the Block II AGC/LGC Interpreter](https://www.ibiblio.org/apollo/hrst/archive/1687.pdf), by Charles A.
Muntz) was last updated in early 1965, and contains an incorrect
numerical opcode for STODL. 
Not to be deterred, though, if we look at the other source-code
lines near the missing line, we see intact lines like "STODL RPRE," (the comma
after "RPRE", by the
way, is actually part of the variable name), from which we can
deduce that the octal code for STODL is 16000.  Noting that RCON has the address
1635, therefore, "STODL RCON"
must assemble to the octal code 16000+1635+1=17636.  But—and
why, I'd like to know, does there always seem to be another "but"?—the missing
line of code is preceded by a line of source code reading simply "STADR".  The STADR opcode has the odd
effect of complementing the code that follows it. 
Therefore—finally!—the missing octal code for address 36,2734 is
probably 60141.  This closely matches the remaining pixel
fragments (and expected parity bit) of the missing line, and so we
can feel good about it.

Having now determined all of the octal values within the bank
except at address 36,2634, and noting the checksum for bank 36 is
known, we can consider the possibility of recreating the octal
value at 36,2634 simply by putting a value there that correctly
reproduces the bank's checksum.  This is actually trickier
than you may suppose, since the checksum is unique only up to a
sign.  (In other words, we don't know whether to insert a
value that produces the positive checksum or one that produces the
negative checksum.)  Often, either the positive or the
negative checksum will be impossible to produce, thus removing the
uncertainty.  Where it is possible to produce both the
positive and the negative checksum, we note that 90% of the memory
banks have positive checksums, so we have a much better chance of
being correct if we choose the positive checksum.   All
of this turns out to be an anti-climax, however:  Prior to
any of the reasoning listed above, our inclination was simply to
put 00000 at address 36,2634.  Remarkably, this produces the
correct bank checksum without any additional work on our
part!  Perhaps this is the first time in history that a gut
reaction has been confirmed by checksum.

#### <a id="Happy_Epilogue"></a>Happy Epilogue!

After the all of the intricate reasoning above was worked out—and
the description above written—Mr. Gary Neff was able to send me
some terrific replacement scans of the problematic
assembly-listing pages from bank 36, namely pp. 846-847.  If
you examine locations 36,2634, 36, 2734, 36,2742, and 36,2747 on
the new scan, you'll see that they indeed contain exactly the
values deduced above!  I still think the exploration I went
through before receiving the new scans is a valuable illustration
of technique, not to mention being soothing to my ego, so I'll
leave it in place for future generations to enjoy.  :-)

### <a id="ValidityApollo11"></a>Validity of the Comanche 055 Code (Apollo 11)

The Comanche 055 page images became available after the Colossus
249 and Luminary 131page images had already been converted to
source-code files, and prior to any other missions becoming
available.  The conversion technique was very abbreviated
compared to that of Colossus 249, as follows:

- A small corps of volunteers—thanks (in alphabetical order)
  Fabrizio Bernardini, Hartmuth Gutshe, Onno Hommes, Jim Lawton,
  and Sergio Navarro!—took the existing Colossus 249 source-code
  files, or on occasion the Luminary 131 source-code files, and
  laboriously compared them line-by-line to the Comanche 055
  assembly-listing page images, porting the differences they
  found.
- The resulting Comanche 055 source code was assembled using yaYUL to produce a binary
  executable, which was horribly wrong at this point (with
  dozens of conversion errors), but was used to create a
  "binsource" file (which is an octal listing of the entire
  program).
- The binsource file was laboriously proofed against the octal
  listing in the page images (this time by me), and
  corrected.  As a double-check, the bank checksums are all
  correct.
- Finally, at every point where the binary created from the
  source code by yaYUL
  differed from the binsource file, the source code was compared
  to the page images and corrected.  After all corrections
  were made, the binary created by yaYUL was identical to the binary created from
  the binsource file.

The binary thus produced by yaYUL
is supplied in the source tree and used for regression testing.

### <a id="ValiditySource15"></a>Validity of Artemis 072 Code (Apollo 15-17)

The Artemis 072 executable (Artemis072.bin) was created by
manually entering binary data from scans of an Artemis 072
assembly listing.  The data was proofed and reproofed until
the bank checksums, as described above, were correct, and the
binary was made available to the public on 2006-01-10.  On
2010-02-20 (more than 4 years later), source code was finally
available and assembled.  A single error which did not affect the
memory-bank checksum was found and corrected in the binary. 
So we are now confident
that what is being provided is both complete and correct.

This is an interesting object lesson.  My previous notes in
this section, prior to the availability of source code, made it
clear that I wouldn't be surprised if additional pairs or even
triplets of errors were found in the binary ... but the notion
that an unpaired error might still exist which did not affect the
checksum never occurred to me.  The problem is a weakness in
the checksumming algorithm used in the AGC.

If the AGC had used a "normal" checksumming algorithm (from the
modern point of view) with 2's-complement arithmetic, any single error in data would
have caused the checksum to change, and the error to be detected.

But in the 1's-complement arithmetic of the AGC, simple
checksumming does not have the same desirable property.  For
example, since there is both a +0 and a -0, which produce the same
result in an addition, a memory error in which +0 is replaced by
-0 (or vice versa) produces the same checksum and would be
undetectable.  But algorithmically the problem is more
complicated than that, since a simple checksum algorithm was not
used.  The actual algorithm used on a data-word by data-word
basis was this:

- The next data word is added to the running checksum.
- If there is positive
  overflow, the result is reduced by 040000 (considered as a
  positive number, thus preserving the sign of the result) and
  then incremented.
- if there is negative
  overflow, the result is incremented by 040000 (again,
  considered as a positive number, thus preserving the sign of
  the result), and then decremented.

For example, if the running checksum was 030000 (a positive
number), and the next data word was 020000 (another positive
number), then adding them would give 050000 (arithmetic
overflow!), which would be decremented (due to the overflow) by
040000 to give 010000, and then incremented by 1 to give a running
checksum of 010001.

If you are amused by such stuff, I invite you to consider the ways
in which such an algorithm might fail to detect error.  In
the case of the Artemis 72 binary, the now-corrected error was a single bit (the most
significant bit) of a single memory location.

### <a id="ValidityApollo8"></a>Validity of Colossus 237 (Apollo 8)

The Colossus 237 program listing presented a special challenge,
because the only physical copy we've had access to is
truncated.  It contains all of the source code, as well as
the binary words associated with the source code on a line-by-line
basis.  But it is missing the octal listing that condenses
all of the binaries into an easily accessible form.  Because
the octal listing is missing, the "bugger words" that are used to
make the memory-bank checksums compute correctly are also
missing.  Thus, important redundancies and checksums that
normally would be used to provide confidence of correctness are
missing.

Therefore, the following unique validation procedure was applied
instead:

- A "binsource" file was created by laboriously stepping
  through the page images of the program listing, line-by-line,
  and observing the listed binary words.  The "bugger
  words" are not available in this fashion, and are therefore
  left at zero.
- Since Colossus 237 and Colossus 249 are separated in time by
  only a few months, the binsource files of Colossus 237 and
  Colossus 249 — i.e., the binary files we create manually,
  independently of the source listings, as part of the
  data-entry process — were compared using automated tools
  ('diff' or similar).  Where differences existed, the page
  images of the Colossus 237 program listing were referenced to
  verify (to the extent possible) that the differences were real
  rather than being transcription errors.
- Where complete memory banks were found to be identical by
  the automated comparison, the bugger words were copied from
  Colossus 249 to Colossus 237.
- Source-code files were created from the page images of the
  program listing.
- The binary of the assembled source-code files was compared
  in an automated fashion against the binary created from the
  binsource file, and either the binsource file or the source
  code (or both) were corrected when any discrepancies were
  found.  At this stage of the process, validation process,
  it is very typical for "superbank" errors to show up; these
  are errors not in the source code *per se*, but are due
  to discrepancies between **yaYUL**'s assumptions about the
  superbank memory settings in comparison to the assumptions of
  the original YUL or GAP assemblers; thus, those superbank
  problems were corrected as well.
- For any banks remaining without bugger words in the
  binsource file, the bugger words created by yaYUL were added.

Thus while we can't have as much confidence in the validity of
the Colossus 237 transcription, in comparison to almost all of
the other Colossus and Luminary transcriptions, the code has
nevertheless been double-checked both manually (visually) and in
an automated fashion as well.

### <a id="Validity_of_Solarium_055_Apollo_4"></a>Validity of Solarium 055 (Apollo 6)

Solarium 055 presented a big challenge because it is the first
Block I code processed, and no Block I support was previously
provided by the yaYUL
assembler.  However, support for Block 1 was in fact added to
**yaYUL**, and after that validation of Solarium 055 differed
little from any other AGC program.  Unfortunately there is no
way as of yet to run Solarium in yaAGC, so we have not had the
additional pleasure (and assurance!) of witnessing it run.

---

 This page is available under the [Creative
Commons
No Rights Reserved License](https://creativecommons.org/publicdomain/zero/1.0/)
*Last modified by [Ronald Burkey](mailto:info@sandroid.org) on
2024-07-12.

[![Virtual AGC is hosted
              by ibiblio.org](https://cdn.archive.preserve.ng/img/3e4e274c3329ed205895858d6f22c108995ba3d8b442029f04a7c6ebb88012f4.png)](http://www.ibiblio.org)*