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.

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

Page 1486

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

Page 1487

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

Page 1488

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

Page 1489

063952,000175:    5766           12536                           CADR     MR.KLEAN                              
063953,000176:    5767           07720                           TC       WHIMPER                               
063954,000177: 
063955,000178:    5770     5205               DOALARM            EQUALS   ENDOFJOB                              
063956,000179: 
063957,000180:                                                                                                  #  CALLING SEQUENCE FOR VARALARM
063958,000181:                                                                                                  #                CAF     (ALARM)
063959,000182:                                                                                                  #                TC      VARALARM
063960,000183: 
063961,000184:                                                                                                  #  VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
063962,000185: 
063963,000186:    5770           00004        VARALARM           INHINT                                         
063964,000187: 
063965,000188:    5771           54001                           TS       L                                     #  SAVE USERS ALARM CODE
063966,000189: 
063967,000190:    5772           30002                           CA       Q                                     #  SAVE USERS Q
063968,000191:    5773           55363                           TS       ALMCADR                               
063969,000192: 
063970,000193:    5774           05677                           TC       PRIOENT                               
063971,000194:    5775           00014        OCT14              OCT      14                                    #  DONT MOVE
063972,000195: 
063973,000196:    5776           01363                           TC       ALMCADR                               #  RETURN TO USER
063974,000197: 
063975,000198:    5777     7706               ABORT              EQUALS   BAILOUT                               #  *** TEMPORARY UNTIL ABORT CALLS OUT

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