Source Code

These source-code files were obtained by digitally photographing an Artemis 72 (Apollo 15-17 Command Module) program listing from a private collection and then modifying pre-existing Comanche 55 (Apollo 11) source files to incorporate changes. Photography was by Ron Burkey, and transcription was performed by a team of volunteers. Note that the page images presented online are of reduced quality, and that additional images may be available. Report any conversion errors or legibility problems in page images to info@sandroid.org. Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 072 OF AGC PROGRAM ARTEMIS 
	BY NASA 2021114-011 11:40 FEB. 26, 1971
Note that the date is the date of the printout, not the date of the program revision.

018865,000002:                                                                                                  ## Copyright:   Public domain.
018866,000003:                                                                                                  ## Filename:    SYSTEM_TEST_STANDARD_LEAD_INS.agc
018867,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
018868,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM) 
018869,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for 
018870,000007:                                                                                                  ##              Apollo 15-17.
018871,000008:                                                                                                  ## Assembler:   yaYUL
018872,000009:                                                                                                  ## Contact:     Sergio Navarro <sergionavarrog@gmail.com>
018873,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
018874,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
018875,000012:                                                                                                  ## Mod history: 2009-08-19 SN   Adapted from corresponding Comanche 055 file.
018876,000013:                                                                                                  ##              2009-09-04 JL   Fix typos.
018877,000014:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
018878,000015:                                                                                                  ##              2017-02-08 RSB  Proofed comment text by diff'ing vs Comanche 55
018879,000016:                                                                                                  ##                              and/or octopus/ProoferComments as most-appropriate.
018880,000017: 

Page 424

018882,000019: 
018883,000020: 22,3172  E5,1671                                  EBANK=   XSM                                   
018884,000021: 
018885,000022: 13,2000                                           SETLOC   E/PROG1                               
018886,000023: 13,2000                                           BANK                                           
018887,000024: 
018888,000025: 13,2036                                           COUNT*   $$/P07                                
018889,000026: 
018890,000027:                                                                                                  #  SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
018891,000028: 
018892,000029:                                                                                                  #  E/BKCALL      FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
018893,000030: 
018894,000031:                                                                                                  #  THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED.  LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
018895,000032:                                                                                                  #  IS NOT POSSIBLE.
018896,000033: 
018897,000034:                                                                                                  #  THE CALLING SEQUENCE IS:
018898,000035: 
018899,000036:                                                                                                  #                TC      BANKCALL
018900,000037:                                                                                                  #                CADR    E/BKCALL
018901,000038:                                                                                                  #                CADR    ROUTINE         WHERE YOU WANT TO GO IN FIXED.
018902,000039:                                                                                                  #                RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
018903,000040:                                                                                                  #                RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
018904,000041:                                                                                                  #                RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
018905,000042: 
018906,000043:                                                                                                  #  THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
018907,000044:                                                                                                  #  OTHER EMEMORY PROGRAMS.
018908,000045: 
018909,000046:                                                                                                  #  A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
018910,000047: 
018911,000048: 13,2036           52134        E/BKCALL           DXCH     BUF2                                  #  SAVE A,L AND GET DP RETURN.
018912,000049: 13,2037           53115                           DXCH     EBUF2                                 #  SAVE DP RETURN.
018913,000050: 13,2040           25114                           INCR     EBUF2                                 #  RETURN +1 BECAUSE DOUBLE CADR.
018914,000051: 13,2041           30006                           CA       BBANK                                 
018915,000052: 13,2042           75041                           MASK     LOW10                                 #  GET CURRENT EBANK.  (SBANK SOMEDAY)
018916,000053: 13,2043           27115                           ADS      EBUF2      +1                         #  FORM BBCON.  (WAS FBANK)
018917,000054: 13,2044           51114                           NDX      EBUF2                                 
018918,000055: 13,2045           27777                           CA       0          -1                         #  GET CADR OF ROUTINE.
018919,000056: 13,2046           04642                           TC       SWCALL                                #  GO TO ROUTINE, SETTING Q TO SWRETURN
018920,000057:                                                                                                  #  AND RESTORING A + L.
018921,000058: 13,2047           02053                           TC       +4                                    #  TX Q, V34, OR BAD STALL RETURN.
018922,000059: 13,2050           02052                           TC       +2                                    #  PROCEED OR GOOD STALL RETURN.
018923,000060: 13,2051           25114                           INCR     EBUF2                                 #  ENTER OR RECYCLE RETURN.
018924,000061: 13,2052           25114                           INCR     EBUF2                                 
018925,000062: 13,2053           53115        E/SWITCH           DXCH     EBUF2                                 
018926,000063: 13,2054           52006                           DTCB                                           
018927,000064: 

Page 425

018929,000066:                                                                                                  #  E/CALL        FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
018930,000067: 
018931,000068:                                                                                                  #  THE CALLING SEQUENCE IS...
018932,000069: 
018933,000070:                                                                                                  #                RTB
018934,000071:                                                                                                  #                        E/CALL
018935,000072:                                                                                                  #                CADR    ROUTINE         THE INTERPRETIVE SUBROUTINE YOU WANT.
018936,000073:                                                                                                  #                                        RETURNS HERE IN INTERPRETIVE.
018937,000074: 
018938,000075: 13,2055           22164        E/CALL             LXCH     LOC                                   #  ADRES -1 OF CADR.
018939,000076: 13,2056           50001                           INDEX    L                                     
018940,000077: 13,2057           30001                           CA       L                                     #  CADR IN A.
018941,000078: 13,2060           24001                           INCR     L                                     
018942,000079: 13,2061           24001                           INCR     L                                     #  RETURN ADRES IN L.
018943,000080: 13,2062           53115                           DXCH     EBUF2                                 #  STORE CADR AND RETURN.
018944,000081: 13,2063           06006                           TC       INTPRET                               
018945,000082: 13,2064           77624                           CALL                                           
018946,000083: 13,2065           01114                                    EBUF2                                 #  INDIRECTLY EXECUTE ROUTINE.  IT MUST
018947,000084: 13,2066           77776                           EXIT                                           #  LEAVE VIA RVQ OR EQUIVALENT.
018948,000085: 13,2067           23115                           LXCH     EBUF2      +1                         #  PICK UP RETURN.
018949,000086: 13,2070           16010                           TCF      INTPRET    +2                         #  SET LOC AND RETURB TO CALLER
018950,000087: 

Page 426

018952,000089:                                                                                                  #  E/JOBWAK      FOR WAKING UP ERASABLE MEMORY JOBS.
018953,000090: 
018954,000091:                                                                                                  #  THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
018955,000092: 
018956,000093:                                                                                                  #  THE CALLING SEQUENCE IS:
018957,000094: 
018958,000095:                                                                                                  #                INHINT
018959,000096:                                                                                                  #                  .
018960,000097:                                                                                                  #                  .
018961,000098:                                                                                                  #                CA      WAKEADR         ADDRESS OF SLEEPING JOB
018962,000099:                                                                                                  #                TC      IBNKCALL
018963,000100:                                                                                                  #                CADR    E/JOBWAK
018964,000101:                                                                                                  #                  .                     RETURNS HERE
018965,000102:                                                                                                  #                  .
018966,000103:                                                                                                  #                  .
018967,000104:                                                                                                  #                RELINT                  IF YOU DID AN INHINT.
018968,000105: 
018969,000106: 12,2000                                           SETLOC   E/PROG                                
018970,000107: 12,2000                                           BANK                                           
018971,000108: 
018972,000109: 12,2000                                           COUNT*   $$/P07                                
018973,000110: 
018974,000111: 12,2000           05167        E/JOBWAK           TC       JOBWAKE                               #  ARRIVE IWTH ADRES IN A.
018975,000112: 12,2001           44756                           CS       BIT11                                 
018976,000113: 12,2002           50064                           NDX      LOCCTR                                
018977,000114: 12,2003           26164                           ADS      LOC                                   #  KNOCK FIXED MEMORY BIT OUT OF ADRES.
018978,000115: 12,2004           00072                           TC       RUPTREG3                              #  RETURN
018979,000116: 
018980,000117: 
018981,000118:                                                                                                  #  THESE PROGRAMS ARE PROVIDED TO ALLOW OVERLAY OF BANKS 30 THRU 33 OF THE 205 VERSIONS OF SYSTEM TESTS AND
018982,000119:                                                                                                  #  PRELAUNCH ALIGN.  THE INTENT IS TO ALLOW THE STG AND HYBRID LABS TO RUN ALL THE TESTS WITH COLOSSUS.
018983,000120: 
018984,000121: 
018985,000122: 33,2000                                           SETLOC   TESTLEAD                              
018986,000123: 33,2000                                           BANK                                           
018987,000124: 
018988,000125: 33,2000                                           COUNT*   $$/COMST                              
018989,000126: 33,2000  E5,1425                                  EBANK=   QPLACE                                
018990,000127: 
018991,000128: 33,2000           03212        COMPVER            TC       GCOMPVER                              #  MUST BE 33,2000.
018992,000129: 
018993,000130: 33,2001           02703        GTSCPSS1           TC       GTSCPSS                               #  MUST BE AT 33,2001

End of include-file SYSTEM_TEST_STANDARD_LEAD_INS.agc.  Parent file is MAIN.agc