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.

063765,000002:                                                                                                  ## Copyright:   Public domain.
063766,000003:                                                                                                  ## Filename:    ALARM_AND_ABORT.agc
063767,000004:                                                                                                  ## Purpose:     Part of the source code for Artemis (i.e., Colossus 3),
063768,000005:                                                                                                  ##              build 072.  This is for the Command Module's (CM) 
063769,000006:                                                                                                  ##              Apollo Guidance Computer (AGC), for 
063770,000007:                                                                                                  ##              Apollo 15-17.
063771,000008:                                                                                                  ## Assembler:   yaYUL
063772,000009:                                                                                                  ## Contact:     Jim Lawton <jim DOT lawton AT gmail DOT com>
063773,000010:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
063774,000011:                                                                                                  ## Page Scans:  www.ibiblio.org/apollo/ScansForConversion/Artemis072/
063775,000012:                                                                                                  ## Mod history: 2009-08-18 JL   Adapted from corresponding Comanche 055 file.
063776,000013:                                                                                                  ##              2010-02-10 JL   Fixed error on p1488.
063777,000014:                                                                                                  ##              2010-02-20 RSB  Un-##'d this header.
063778,000015:                                                                                                  ##              2017-01-21 RSB  Proofed comment text by diff'ing vs Comanche 55
063779,000016:                                                                                                  ##                              and corrected errors found.
063780,000017: 

Page 1486

063782,000019: 
063783,000020:                                                                                                  #  THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
063784,000021:                                                                                                  #  EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
063785,000022: 
063786,000023:                                                                                                  #        CALLING SEQUENCE IS AS FOLLOWS:
063787,000024: 
063788,000025:                                                                                                  #        TC      ALARM
063789,000026:                                                                                                  #        OCT     NNNNN
063790,000027:                                                                                                  #                                (RETURNS HERE)
063791,000028: 
063792,000029:    4000                                           SETLOC   FFTAG7                                
063793,000030:    4000                                           BANK                                           
063794,000031: 
063795,000032:    5671     0375                                  EBANK=   FAILREG                               
063796,000033: 
063797,000034:    5671                                           COUNT*   $$/ALARM                              
063798,000035: 
063799,000036:                                                                                                  #  ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
063800,000037: 
063801,000038:    5671           00004        ALARM              INHINT                                         
063802,000039: 
063803,000040:    5672           30002                           CA       Q                                     
063804,000041:    5673           55363        ALARM2             TS       ALMCADR                               
063805,000042:    5674           50002                           INDEX    Q                                     
063806,000043:    5675           30000                           CA       0                                     
063807,000044:    5676           54001        BORTENT            TS       L                                     
063808,000045: 
063809,000046:    5677           30006        PRIOENT            CA       BBANK                                 
063810,000047:    5700           00006                 +1        EXTEND                                         
063811,000048:    5701           04007                           ROR      SUPERBNK                              #  ADD SUPER BITS.
063812,000049:    5702           55364                           TS       ALMCADR    +1                         
063813,000050: 
063814,000051:    5703           30002        LARMENT            CA       Q                                     #  STORE RETURN FOR ALARM
063815,000052:    5704           54061                           TS       ITEMP1                                
063816,000053: 
063817,000054:    5705           10375        CHKFAIL1           CCS      FAILREG                               #  IS ANYTHING IN FAILREG
063818,000055:    5706           15712                           TCF      CHKFAIL2                              #  YES TRY NEXT REG
063819,000056:    5707           30001                           CA       L                                     
063820,000057:    5710           54375                           TS       FAILREG                               
063821,000058:    5711           15716                           TCF      PROGLARM                              #  TURN ALARM LIGHT ON FOR FIRST ALARM
063822,000059: 
063823,000060:    5712           10376        CHKFAIL2           CCS      FAILREG    +1                         
063824,000061:    5713           15716                           TCF      PROGLARM                              
063825,000062:    5714           30001                           CA       L                                     
063826,000063:    5715           54376                           TS       FAILREG    +1                         
063827,000064: 
063828,000065:    5716           22377        PROGLARM           LXCH     FAILREG    +2                         #  STORE AS "MOST RECENT" ALARM CODE
063829,000066: 
063830,000067:    5717           41241                           CS       DSPTAB     +11D                       #  TURN ON PROGRAM ALARM IF OFF
063831,000068:    5720           77716                           MASK     BIT15+9                               
063832,000069:    5721           27241                           ADS      DSPTAB     +11D                       
063833,000070: 
063834,000071:    5722           56061        MULTEXIT           XCH      ITEMP1                                #  OBTAIN RETURN ADDRESS IN A

Page 1487

063836,000073:    5723           00003                           RELINT                                         
063837,000074:    5724           50000                           INDEX    A                                     
063838,000075:    5725           00001                           TC       1                                     
063839,000076: 
063840,000077:                                                                                                  #  PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
063841,000078:                                                                                                  #  AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
063842,000079:                                                                                                  #                CAF     OCTXX           ALARM CODE
063843,000080:                                                                                                  #                TC      BANKCALL
063844,000081:                                                                                                  #                CADR    PRIOLARM
063845,000082: 
063846,000083:                                                                                                  #                ...     ...
063847,000084:                                                                                                  #                ...     ...
063848,000085:                                                                                                  #                ...     ...             ASTRONAUT RETURN
063849,000086:                                                                                                  #                TC      PHASCHNG        IMMEDIATE RETURN TO USER. RESTART
063850,000087:                                                                                                  #                OCT     X.1             PHASE CHANGE FOR PRIO DISPLAY
063851,000088: 
063852,000089: 10,2000                                           SETLOC   DISPLAYS                              
063853,000090: 10,2000                                           BANK                                           
063854,000091: 
063855,000092: 10,3766                                           COUNT*   $$/DSPLA                              
063856,000093: 10,3766           00004        PRIOLARM           INHINT                                         #  * * * KEEP IN DISPLAY ROUTINES BANK
063857,000094: 10,3767           54001                           TS       L                                     #  SAVE ALARM CODE
063858,000095: 
063859,000096: 10,3770           30133                           CA       BUF2                                  #  2 CADR OF PRIOLARM USER
063860,000097: 10,3771           55363                           TS       ALMCADR                               
063861,000098: 10,3772           30134                           CA       BUF2       +1                         
063862,000099: 10,3773           05700                           TC       PRIOENT    +1                         #  * LEAVE L ALONE
063863,000100: 10,3774           77467        -2SEC              DEC      -200       B-14                       #  *** DONT MOVE
063864,000101: 10,3775           35023                           CAF      V05N09                                
063865,000102: 10,3776           12750                           TCF      PRIODSPR                              
063866,000103: 
063867,000104:    6000                                           SETLOC   FFTAG13                               
063868,000105:    6000                                           BANK                                           
063869,000106: 
063870,000107:    7706                                           COUNT*   $$/ALARM                              
063871,000108:    7706           00004        BAILOUT            INHINT                                         
063872,000109:    7707           30002                           CA       Q                                     
063873,000110:    7710           55363                           TS       ALMCADR                               
063874,000111: 
063875,000112:    7711           04636                           TC       BANKCALL                              
063876,000113:    7712           40000                           CADR     VAC5STOR                              
063877,000114: 
063878,000115:    7713           51363                           INDEX    ALMCADR                               
063879,000116:    7714           30000                           CAF      0                                     
063880,000117:    7715           05676                           TC       BORTENT                               
063881,000118:    7716           40400        BIT15+9            OCT      40400                                 
063882,000119: 
063883,000120:    7717           00004                 -1        INHINT                                         
063884,000121:    7720           34767        WHIMPER            CA       TWO                                   
063885,000122:    7721           60005                           AD       Z                                     

Page 1488

063887,000124:    7722           54017                           TS       BRUPT                                 
063888,000125:    7723           50017                           RESUME                                         
063889,000126:    7724           04655                           TC       POSTJUMP                              #  RESUME SENDS CONTROL HERE
063890,000127:    7725           12712                           CADR     ENEMA                                 
063891,000128: 
063892,000129:    4000                                           SETLOC   FFTAG7                                
063893,000130:    4000                                           COUNT*   $$/ALARM                              
063894,000131:    4000                                           BANK                                           
063895,000132: 
063896,000133:    5726           00004        POODOO             INHINT                                         
063897,000134:    5727           30002                           CA       Q                                     
063898,000135:    5730           55363                           TS       ALMCADR                               
063899,000136: 
063900,000137:    5731           04636                           TC       BANKCALL                              
063901,000138:    5732           40000                           CADR     VAC5STOR                              #  STORE ERASABLES FOR DEBUGGING PURPOSES.
063902,000139: 
063903,000140:    5733           51363                           INDEX    ALMCADR                               
063904,000141:    5734           30000                           CAF      0                                     
063905,000142:    5735           05676        ABORT2             TC       BORTENT                               
063906,000143: 
063907,000144:    5736           77770        OCT77770           OCT      77770                                 #  DONT MOVE
063908,000145:    5737           34763                           CA       V37FLBIT                              #  IS AVERAGE G ON
063909,000146:    5740           70103                           MASK     FLAGWRD7                              
063910,000147:    5741           10000                           CCS      A                                     
063911,000148:    5742           07717                           TC       WHIMPER    -1                         #  YES.  DONT DO POODOO.  DO BAILOUT.
063912,000149: 
063913,000150:    5743           44753                           CS       BIT14                                 #  DISREGARD ENTRY SETTING
063914,000151:    5744           71247                           MASK     EXTVBACT                              #  EXTENDED VBS ACTIVE?
063915,000152:    5745           10000                           CCS      A                                     
063916,000153:    5746           17717                           TCF      WHIMPER    -1                         #  YES  DONT DO POODOO  DO BAILOUT
063917,000154: 
063918,000155:    5747           05561                           TC       DOWNFLAG                              
063919,000156:    5750           00067                           ADRES    STATEFLG                              
063920,000157: 
063921,000158:    5751           05561                           TC       DOWNFLAG                              
063922,000159:    5752           00236                           ADRES    AUTOSEQ                               
063923,000160: 
063924,000161:    5753           05561                           TC       DOWNFLAG                              
063925,000162:    5754           00230                           ADRES    REINTFLG                              
063926,000163: 
063927,000164:    5755           05561                           TC       DOWNFLAG                              
063928,000165:    5756           00176                           ADRES    UTFLAG                                
063929,000166:    5757           05561                           TC       DOWNFLAG                              
063930,000167:    5760           00010                           ADRES    RNDVZFLG                              
063931,000168:    5761           05561                           TC       DOWNFLAG                              
063932,000169:    5762           00031                           ADRES    TRACKFLG                              #  FORCE STOPRATE
063933,000170:    5763           05561                           TC       DOWNFLAG                              
063934,000171:    5764           00054                           ADRES    NODOFLAG                              
063935,000172: 
063936,000173:    5765           04636                           TC       BANKCALL                              

Page 1489

063938,000175:    5766           12536                           CADR     MR.KLEAN                              
063939,000176:    5767           07720                           TC       WHIMPER                               
063940,000177: 
063941,000178:    5770     5205               DOALARM            EQUALS   ENDOFJOB                              
063942,000179: 
063943,000180:                                                                                                  #  CALLING SEQUENCE FOR VARALARM
063944,000181:                                                                                                  #                CAF     (ALARM)
063945,000182:                                                                                                  #                TC      VARALARM
063946,000183: 
063947,000184:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
063948,000185: 
063949,000186:    5770           00004        VARALARM           INHINT                                         
063950,000187: 
063951,000188:    5771           54001                           TS       L                                     #  SAVE USERS ALARM CODE
063952,000189: 
063953,000190:    5772           30002                           CA       Q                                     #  SAVE USERS Q
063954,000191:    5773           55363                           TS       ALMCADR                               
063955,000192: 
063956,000193:    5774           05677                           TC       PRIOENT                               
063957,000194:    5775           00014        OCT14              OCT      14                                    #  DONT MOVE
063958,000195: 
063959,000196:    5776           01363                           TC       ALMCADR                               #  RETURN TO USER
063960,000197: 
063961,000198:    5777     7706               ABORT              EQUALS   BAILOUT                               #  *** TEMPORARY UNTIL ABORT CALLS OUT

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