Source Code

These source code files are a reconstruction of Sundance, the Apollo 9 LM (Lunar Module) AGC (Apollo Guidance Computer) flight software, created from binary dumps of original core rope program modules, as follows:
  • B1 — Revision 292
  • B2 — Revision 302
  • B3 — Revision 302
  • B4 — Revision 302
  • B5 — Revision 292
  • B6 — Revision 306
This means that source code does not represent a specific historical revision of Sundance, but rather a mixture of the three released versions. Nonetheless, it is capable of flying the whole Apollo 9 mission. This source code matches the binary dumps, as closely as feasible, but 100% match is not possible, due mostly to changes in memory addresses at which code and variables were allocated in different revisions of Sundance. Refer to this list of explanations for each binary mismatch.

Since only binary dumps (rather than listings) of Sundance are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

008891,000002:                                                                                                  ## Copyright:   Public domain.
008892,000003:                                                                                                  ## Filename:    AOTMARK.agc
008893,000004:                                                                                                  ## Purpose:     A section of a reconstructed, mixed version of Sundance
008894,000005:                                                                                                  ##              It is part of the reconstructed source code for the Lunar
008895,000006:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 9.
008896,000007:                                                                                                  ##              No original listings of this program are available;
008897,000008:                                                                                                  ##              instead, this file was created via disassembly of dumps
008898,000009:                                                                                                  ##              of various revisions of Sundance core rope modules.
008899,000010:                                                                                                  ## Assembler:   yaYUL
008900,000011:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
008901,000012:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
008902,000013:                                                                                                  ## Mod history: 2020-06-17 MAS  Created from Luminary 69.
008903,000014: 
008904,000015:                                                                                                  ## Sundance 302
008905,000016: 
008906,000017: 12,2000                                           BANK     12                                    
008907,000018: 07,2000                                           SETLOC   AOTMARK1                              
008908,000019: 07,2000                                           BANK                                           
008909,000020: 
008910,000021: 07,2000  E7,1536                                  EBANK=   XYMARK                                
008911,000022: 07,2000                                           COUNT*   $$/MARK                               
008912,000023: 
008913,000024: 07,2000           00004        AOTMARK            INHINT                                         
008914,000025: 07,2001           11314                           CCS      MARKSTAT                              #  SEE IF AOTMARK BUSY
008915,000026: 07,2002           02004                           TC       +2                                    #  MARK SYSTEM BUSY-DO ALARM
008916,000027: 07,2003           02007                           TC       EXTVBCHK                              
008917,000028: 07,2004           05646                           TC       ALARM                                 
008918,000029: 07,2005           00105                           OCT      00105                                 
008919,000030: 07,2006           05225                           TC       ENDOFJOB                              
008920,000031: 
008921,000032: 07,2007           36216        EXTVBCHK           CAF      SIX                                   #  SEE IF EXT. VERB WORKING
008922,000033: 07,2010           71045                           MASK     EXTVBACT                              
008923,000034: 07,2011           10000                           CCS      A                                     
008924,000035: 07,2012           12044                           TCF      MKABORT                               #  YES-ABORT
008925,000036: 
008926,000037: 07,2013           35025                           CAF      BIT2                                  #  NO-DISALLOW SOME EXTENDED VERB ACTION
008927,000038: 07,2014           27045                           ADS      EXTVBACT                              #  BIT2 RESET IN ENDMARK
008928,000039: 07,2015           10400        MKVAC              CCS      VAC1USE                               #  LOOK FOR A VAC AREA-DO ABORT IF
008929,000040: 07,2016           12031                           TCF      MKVACFND                              #  NONE AVAILABLE
008930,000041: 07,2017           10454                           CCS      VAC2USE                               
008931,000042: 07,2020           12031                           TCF      MKVACFND                              
008932,000043: 07,2021           10530                           CCS      VAC3USE                               
008933,000044: 07,2022           12031                           TCF      MKVACFND                              
008934,000045: 07,2023           10604                           CCS      VAC4USE                               
008935,000046: 07,2024           12031                           TCF      MKVACFND                              
008936,000047: 07,2025           10660                           CCS      VAC5USE                               
008937,000048: 07,2026           12031                           TCF      MKVACFND                              
008938,000049: 07,2027           05713                           TC       ABORT                                 #  ALL VAC AREAS OCCUPIED - ABORT.
008939,000050: 07,2030           01207                           OCT      01207                                 
008940,000051: 
008941,000052: 07,2031           65025        MKVACFND           AD       TWO                                   
008942,000053: 07,2032           55314                           TS       MARKSTAT                              #  STORE VAC ADR IN LOW 9 OF MARKSTAT
008943,000054: 
008944,000055: 07,2033           35030                           CAF      ZERO                                  
008945,000056: 07,2034           51314                           INDEX    MARKSTAT                              
008946,000057: 07,2035           53777                           TS       0          -1                         #  ZERO IN VACUSE REG TO SHOW VAC OCCUPIED
008947,000058: 
008948,000059: 07,2036           37672                           CAF      PRIO32                                
008949,000060: 07,2037           05155                           TC       FINDVAC                               #  SET UP JOB FOR GETDAT
008950,000061: 07,2040  E7,1536                                  EBANK=   XYMARK                                
008951,000062: 07,2040           02057 16067                     2CADR    GETDAT                                
008952,000063: 
008953,000064: 07,2042           00003                           RELINT                                         
008954,000065: 07,2043           14670                           TCF      SWRETURN                              
008955,000066: 
008956,000067: 07,2044           05713        MKABORT            TC       ABORT                                 #  CONFLICT WITH EXTENDED VERB
008957,000068: 07,2045           01211                           OCT      01211                                 
008958,000069: 
008959,000070: 07,2046           35030        MKRELEAS           CAF      ZERO                                  
008960,000071: 07,2047           57314                           XCH      MARKSTAT                              #  SET MARKSTAT TO ZERO
008961,000072: 07,2050           75054                           MASK     LOW9                                  #  PICK UP VAC AREA ADR
008962,000073: 07,2051           10000                           CCS      A                                     
008963,000074: 07,2052           50000                           INDEX    A                                     
008964,000075: 07,2053           54000                           TS       0                                     #  SHOW MKVAC AREA AVAILABLE
008965,000076: 07,2054           35026                           CAF      ONE                                   
008966,000077: 07,2055           04737                           TC       IBNKCALL                              
008967,000078: 07,2056           17576                           CADR     GOODEND                               #  GO WAKE UP CALLING JOB
008968,000079: 
008969,000080: 07,2057           32355        GETDAT             CAF      V01N71                                #  DISPLAY DETENT AND STAR CODE
008970,000081: 07,2060           04655                           TC       BANKCALL                              
008971,000082: 07,2061           20406                           CADR     GOFLASH                               
008972,000083: 
008973,000084: 07,2062           04106                           TC       GOTOPOOH                              #  V34-TERMINATE
008974,000085: 07,2063           12065                           TCF      DODAT                                 #  V33-PROCEED-USE THIS STAR FOR MARKS
008975,000086: 07,2064           12057        ENTERDAT           TCF      GETDAT                                #  ENTER-REDISPLAY STAR CODE
008976,000087: 
008977,000088: 07,2065           41314        DODAT              CS       MARKSTAT                              #  SET BIT12 TO DISCOURAGE MARKRUPT
008978,000089: 07,2066           75013                           MASK     BIT12                                 #    BIT12 RESET AT GETMARK
008979,000090: 07,2067           27314                           ADS      MARKSTAT                              
008980,000091: 
008981,000092: 07,2070           37715                           CAF      HIGH9                                 #  PICK DETENT CODE FROM BITS7-9 OF AOTCODE
008982,000093: 07,2071           70735                           MASK     AOTCODE                               #  AND SEE IF CODE IS 1,2 OR 3
008983,000094: 07,2072           00006                           EXTEND                                         
008984,000095: 07,2073           75016                           MP       BIT9                                  
008985,000096: 07,2074           55536                           TS       XYMARK                                #  STORE DETENT
008986,000097: 
008987,000098: 07,2075           00006                           EXTEND                                         
008988,000099: 07,2076           62057                           BZMF     GETDAT                                #  NO GOOD-MAKE REQUEST AGAIN
008989,000100: 
008990,000101: 07,2077           75024                           MASK     BIT3                                  #  SEE IF DETENT CODE 4 OR 5
008991,000102: 07,2100           00006                           EXTEND                                         
008992,000103: 07,2101           12122                           BZF      CODE123                               #  NOT 4 OR 5, MUST BE 1,2 OR 3
008993,000104: 
008994,000105: 07,2102                                           COUNT*   $$/COAS                               
008995,000106: 
008996,000107: 07,2102           32356        CODE4OR5           CAF      V06N87*                               #  CODE 4 OR 5, GET OPTIC AXIS CALIBRATIONS
008997,000108: 07,2103           04655                           TC       BANKCALL                              #  AZ AND EL OF SIGHTING DEVICE FROM ASTRO
008998,000109: 07,2104           20406                           CADR     GOFLASH                               
008999,000110: 
009000,000111: 07,2105           04106                           TC       GOTOPOOH                              #  V34-TERMINATE
009001,000112: 07,2106           12110                           TCF      +2                                    #  PROCEED
009002,000113: 07,2107           12102                           TCF      CODE4OR5                              #  ON ENTER, RECYCLE
009003,000114: 07,2110           00006                           EXTEND                                         
009004,000115: 07,2111           31350                           DCA      AZ                                    #  PICK UP AZ AND EL IN SP 2S COMP
009005,000116: 07,2112           50120                           INDEX    FIXLOC                                
009006,000117: 07,2113           52011                           DXCH     8D                                    #  STORE IN 8D AND 9D OF LOCAL VAC
009007,000118: 07,2114           35026                           CAF      BIT1                                  #  IF CODE 4, REAR AOT POSITIONS USED
009008,000119: 07,2115           71536                           MASK     XYMARK                                #  SO CALC APPARENT ROTATION
009009,000120: 07,2116           00006                           EXTEND                                         #  IF CODE 5, BACKUP, ZERO ROTATION
009010,000121: 07,2117           12132                           BZF      CODE4                                 #  REAR AOT DETENTS TO BE USED
009011,000122: 07,2120           35030                           CAF      ZERO                                  #  BACKUP SYSTEM TO BE USED
009012,000123: 07,2121           12136                           TCF      CODE5                                 
009013,000124: 
009014,000125: 07,2122                                           COUNT*   $$/MARK                               
009015,000126: 
009016,000127: 07,2122           51536        CODE123            INDEX    XYMARK                                #  INDEX DET CODE 1,2 OR 3
009017,000128: 07,2123           31406                           CA       AOTEL      -1                         
009018,000129: 07,2124           50120                           INDEX    FIXLOC                                
009019,000130: 
009020,000131: 07,2125           54011                           TS       9D                                    #  STORE ELEVATION IN VAC+9D
009021,000132: 
009022,000133: 07,2126           51536                           INDEX    XYMARK                                #  INDEX DET CODE 1,2 OR 3
009023,000134: 07,2127           31403                           CA       AOTAZ      -1                         
009024,000135: 07,2130           50120                           INDEX    FIXLOC                                
009025,000136: 07,2131           54010                           TS       8D                                    #  STORE AZIMUTH IN VAC+8D
009026,000137: 
009027,000138: 07,2132           31405        CODE4              CA       AOTAZ      +1                         #  COMPENSATION FOR APPARENT RATATION OF
009028,000139: 07,2133           00006                           EXTEND                                         #  AOT FIELD OF VIEW IN LEFT AND RIGTHT
009029,000140: 07,2134           50120                           INDEX    FIXLOC                                #  DETENTS IS STORED IN VAC +10D IN SP
009030,000141: 07,2135           20010                           MSU      8D                                    #  PRECISION ONES COMPLEMENT
009031,000142: 07,2136           50120        CODE5              INDEX    FIXLOC                                
009032,000143: 07,2137           54012                           TS       10D                                   #  ROT ANGLE
009033,000144: 
009034,000145: 07,2140           06014                           TC       INTPRET                               #  COMPUTE X AND Y PLANE VECTORS
009035,000146: 
009036,000147:                                                                                                  #  THE OPTAXIS SUBROUTINE COMPUTES THE X AND Y MARK PLANE VECS AND
009037,000148:                                                                                                  #  AND ROTATES THEM THRU THE APPARENT FIELD OF VIEW ROTATION UNIQUE TO AOT
009038,000149:                                                                                                  #  OPTAXIS USES OANB TO COMPUTE THE OPTIC AXIS
009039,000150:                                                                                                  #   INPUT-AZIMUTH ANGLE IN SINGLE PREC AT CDU SCALE IN 8D OF JOB VAC
009040,000151:                                                                                                  #         ELEVATION ANGLE IN SINGLE PREC AT CDU SCALE IN 9D OF JOB VAC
009041,000152:                                                                                                  #         ROTATION ANGLE IN SINGLE PREC 1S COMP SCALED BY PI IN 10D OF VAC
009042,000153:                                                                                                  #   OUTPUT-OPTIC AXIS VEC IN NB COORDS IN SCAXIS
009043,000154:                                                                                                  #          X-MARK PLANE 1/4VEC IN NB COORDS AT 18D OF JOB VAC
009044,000155:                                                                                                  #          Y-MARK PLANE 1/4VEC IN NB COORDS AT 12D OF JOB VAC
009045,000156: 
009046,000157: 07,2141           77624        OPTAXIS            CALL                                           #  GO COMPUTE OA AND X AND Y PLANE VECS
009047,000158: 07,2142           16170                                    OANB                                  
009048,000159: 07,2143           70535                           SLOAD    SR1                                   #  LOAD APP ROTATION IN ONES COMP
009049,000160: 07,2144           00013                                    10D                                   #  RESCALE BY 2PI
009050,000161: 07,2145           73406                           PUSH     SIN                                   #  1/2SIN(ROT)  0-1
009051,000162: 07,2146           71525                           PDDL     COS                                   
009052,000163: 07,2147           74206                           PUSH     VXSC                                  #  1/2COS(ROT)  2-3
009053,000164: 07,2150           00023                                    18D                                   
009054,000165: 07,2151           74325                           PDDL     VXSC                                  #  1/4COS(ROT)UYP   4-9
009055,000166: 07,2152           00001                                    0                                     
009056,000167: 07,2153           00031                                    24D                                   #  1/4SIN(ROT)UXP
009057,000168: 07,2154           45445                           BVSU     STADR                                 #  UP 4-9
009058,000169: 07,2155           63762                           STODL    12D                                   #  YPNB=1/4(COS(ROT)UYP-SIN(ROT)UXP)
009059,000170: 07,2156           65361                           VXSC     PDDL                                  #  UP 2-3  UP 0-1  FOR EXCHANGE
009060,000171: 07,2157           00031                                    24D                                   #  1/4COS(ROT)UXP  PUSH 0-5
009061,000172: 07,2160           53361                           VXSC     VAD                                   #  1/4SIN(ROT)UYP
009062,000173: 07,2161           00023                                    18D                                   #  UP 0-5
009063,000174: 07,2162           77626                           STADR                                          
009064,000175: 07,2163           53754                           STOVL    18D                                   #  XPNB=1/4(COS(ROT)UXP+SIN(ROT)UYP)
009065,000176: 07,2164           22276                                    LO6ZEROS                              #  INITIALIZE AVE STAR VEC ACCUMULATOR
009066,000177: 07,2165           02715                           STORE    STARAD     +6                         
009067,000178: 07,2166           77776                           EXIT                                           
009068,000179: 07,2167           12230                           TCF      GETMKS                                
009069,000180: 
009070,000181:                                                                                                  #  THE OANB SUBROUTINE COMPUTES THE OPTIC AXIS OF THE SIGHTING INSTRUMENT
009071,000182:                                                                                                  #  FROM AZIMUTH AND ELEVATION INPUT FROM THE ASTRONAUT.
009072,000183:                                                                                                  #     INPUT- AZIMUTH ANGLE IN SINGLE PREC 2S COMP IN 8D OF JOB VAC
009073,000184:                                                                                                  #            ELEVATION ANGLE IN SINGLE PREC 2S COMP IN 9D OF VAC
009074,000185:                                                                                                  #     OUTPUT-OPTIC AXIS IN NB COORDS. IN SCAXIS
009075,000186:                                                                                                  #            X-PLANE 1/2VEC IN NB COORDS AT 24D OF VAC
009076,000187:                                                                                                  #            Y-PLANE 1/2VEC IN NB COORDS AT 18D OF VAC
009077,000188: 
009078,000189: 07,2170           44001        OANB               SETPD    STQ                                   
009079,000190: 07,2171           00001                                    0                                     
009080,000191: 07,2172           02736                                    GCTR                                  #  STORE RETURN
009081,000192: 07,2173           47135                           SLOAD    RTB                                   
009082,000193: 07,2174           00012                                    9D                                    #  PICK UP SP ELV
009083,000194: 07,2175           21457                                    CDULOGIC                              
009084,000195: 07,2176           71406                           PUSH     COS                                   
009085,000196: 07,2177           73525                           PDDL     SIN                                   #  1/2COS(ELV)  PD 0-1
009086,000197: 07,2200           77626                           STADR                                          
009087,000198: 07,2201           62527                           STODL    SCAXIS                                #  OAX=1/2SIN(ELV)
009088,000199: 07,2202           00011                                    8D                                    #  PICK UP AZ SP
009089,000200: 07,2203           77634                           RTB                                            
009090,000201: 07,2204           21457                                    CDULOGIC                              
009091,000202: 07,2205           71406                           PUSH     COS                                   
009092,000203: 07,2206           00025                           STORE    20D                                   #  STORE UYP(Y) 20-21
009093,000204: 07,2207           73525                           PDDL     SIN                                   #  1/2COS(AZ) PD 2-3
009094,000205: 07,2210           57406                           PUSH     DCOMP                                 #  PUSH 1/2SIN(AZ) 4-5
009095,000206: 07,2211           14027                           STODL    22D                                   #  STORE UYP(Z) 22-23
009096,000207: 07,2212           22276                                    LO6ZEROS                              
009097,000208: 07,2213           14023                           STODL    18D                                   #  STORE UYP(X) 18-19   UP 4-5
009098,000209: 07,2214           72405                           DMP      SL1                                   
009099,000210: 07,2215           00001                                    0                                     
009100,000211: 07,2216           15252                           STODL    SCAXIS     +2                         #  OAY=1/2COS(ELV)SIN(AZ)
009101,000212: 07,2217           72405                           DMP      SL1                                   #  UP 2-3
009102,000213: 07,2220           77626                           STADR                                          #  UP 0-1
009103,000214: 07,2221           52523                           STOVL    SCAXIS     +4                         #  OAZ=1/2COS(ELV)COS(AZ)
009104,000215: 07,2222           00023                                    18D                                   #  LOAD UYP VEC
009105,000216: 07,2223           76435                           VXV      VSL1                                  
009106,000217: 07,2224           01250                                    SCAXIS                                #  UXP VEC=UYP X OA
009107,000218: 07,2225           00031                           STORE    24D                                   #  STORE UXP
009108,000219: 07,2226           77650                           GOTO                                           
009109,000220: 07,2227           02736                                    GCTR                                  
009110,000221: 
009111,000222:                                                                                                  #  THE GETMKS ROUTINE INITIALIZES THE SIGHTING MARK PROCEDURE
009112,000223: 
009113,000224: 07,2230           35030        GETMKS             CAF      ZERO                                  #  INITIALIZE MARK ID REGISTER AND MARK CNT
009114,000225: 07,2231           55536                           TS       XYMARK                                
009115,000226: 07,2232           55535                           TS       MARKCNTR                              
009116,000227: 07,2233           35054                           CAF      LOW9                                  #  ZERO BITS10 TO 15 RETAINING MKVAC ADR
009117,000228: 07,2234           71314                           MASK     MARKSTAT                              
009118,000229: 07,2235           55314                           TS       MARKSTAT                              
009119,000230: 07,2236           32615                           CAF      MKVB54*                               #  DISPLAY VB54 INITIALLY
009120,000231: 07,2237           04655        PASTIT             TC       BANKCALL                              
009121,000232: 07,2240           20237                           CADR     GOMARK4                               
009122,000233: 
009123,000234: 07,2241           04106                           TC       GOTOPOOH                              #  VB34 TERMINATE-THIS RELEASES MKVAC AREA
009124,000235: 07,2242           12244                           TCF      MARKCHEX                              #  VB33-PROCEED, GOT MARKS, COMPUTE LOS
009125,000236: 07,2243           12057                           TCF      GETDAT                                #  ENTER- RECYCLE TO V01N71
009126,000237: 
009127,000238: 07,2244           41314        MARKCHEX           CS       MARKSTAT                              #  SET BIT12 TO DISCOURAGE MARKRUPT
009128,000239: 07,2245           75013                           MASK     BIT12                                 
009129,000240: 07,2246           27314                           ADS      MARKSTAT                              
009130,000241: 07,2247           75054                           MASK     LOW9                                  
009131,000242: 07,2250           55536                           TS       XYMARK                                #  JAM MARK VAC ADR IN XYMARK FOR AVESTAR
009132,000243: 07,2251           35030                           CAF      ZERO                                  
009133,000244: 07,2252           55537                           TS       MKDEX                                 #  SET MKDEX ZERO FOR LOS VEC CNTR
009134,000245: 07,2253           31314                           CA       MARKSTAT                              
009135,000246: 07,2254           75065                           MASK     PRIO3                                 #  SEE IF LAST MK PARI COMPLETE
009136,000247: 07,2255           54001                           TS       L                                     
009137,000248: 07,2256           35065                           CAF      PRIO3                                 #  BITS10 AND 11
009138,000249: 07,2257           00006                           EXTEND                                         
009139,000250: 07,2260           06001                           RXOR     LCHAN                                 
009140,000251: 07,2261           00006                           EXTEND                                         
009141,000252: 07,2262           12267                           BZF      AVESTAR                               #  LAST PAIR COMPLETE-GO COMPUTE LOS
009142,000253: 07,2263           11535        CNTCHK             CCS      MARKCNTR                              #  NO PAIR SHOWING-SEE IF PAIR IN HOLD
009143,000254: 07,2264           12266                           TCF      +2                                    #  PAIR BURIED-DECREMENT COUNTER
009144,000255: 07,2265           12352                           TCF      MKALARM                               #  NO PAIR-ALARM
009145,000256: 07,2266           55535                           TS       MARKCNTR                              #  STORE DECREMENTED COUNTER
009146,000257: 
009147,000258: 07,2267           31535        AVESTAR            CA       MARKCNTR                              
009148,000259: 07,2270           00006                           EXTEND                                         
009149,000260: 07,2271           76216                           MP       SIX                                   #  GET C(L) = - 6 MARKCNTR
009150,000261: 07,2272           56001                           XCH      L                                     
009151,000262: 07,2273           61536                           AD       XYMARK                                #  ADD - MARK VAC ADR SET IN MARKCHEX
009152,000263: 07,2274           50120                           INDEX    FIXLOC                                
009153,000264: 07,2275           54050                           TS       S1                                    #  JAM - CDU ADR OF X-MARK IN S1
009154,000265: 
009155,000266: 07,2276           35013                           CAF      BIT12                                 #  INITIALIZE MKDEX FOR STAR LOS COUNTER
009156,000267: 07,2277           27537                           ADS      MKDEX                                 #  MKDEX WAS INITIALIZED ZERO IN MARKCHEX
009157,000268: 
009158,000269: 07,2300           06014                           TC       INTPRET                               
009159,000270: 
009160,000271: 07,2301           77201                           SETPD    VLOAD                                 
009161,000272: 07,2302           00001                                    0                                     #  SET PD POINTER TO ZERO
009162,000273: 07,2303           00023                                    18D                                   #  LOAD STAR VECTOR IN NB
009163,000274: 07,2304           34041                           STCALL   32D                                   
009164,000275: 07,2305           47355                                    NBSM                                  #  CONVERT IT TO STABLE MEMBER
009165,000276: 07,2306           24031                           STOVL    24D                                   
009166,000277: 07,2307           00015                                    12D                                   
009167,000278: 07,2310           62120                           XCHX,1   INCR,1                                
009168,000279: 07,2311           00050                                    S1                                    
009169,000280: 07,2312           00001                                    1                                     
009170,000281: 07,2313           77720                           XCHX,1                                         
009171,000282: 07,2314           00050                                    S1                                    
009172,000283: 07,2315           34041                           STCALL   32D                                   
009173,000284: 07,2316           47355                                    NBSM                                  
009174,000285: 07,2317           77635                           VXV                                            
009175,000286: 07,2320           00031                                    24D                                   
009176,000287: 07,2321           53476                           VCOMP    UNIT                                  
009177,000288: 07,2322           00031                           STORE    24D                                   
009178,000289: 
009179,000290: 07,2323           63335        AVEIT              SLOAD    PDVL                                  #  N(NUMBER OF VECS) IN 0-1
009180,000291: 07,2324           03540                                    MKDEX                                 
009181,000292: 07,2325           00031                                    24D                                   #  LOAD CURRENT VECTOR
009182,000293: 07,2326           70322                           VSR3     V/SC                                  
009183,000294: 07,2327           00001                                    0                                     
009184,000295: 07,2330           14031                           STODL    24D                                   #  VEC/N
009185,000296: 07,2331           00001                                    0                                     
009186,000297: 07,2332           56225                           DSU      DDV                                   
009187,000298: 07,2333           16617                                    DP1/8                                 #  (N-1)/N
009188,000299: 07,2334           53361                           VXSC     VAD                                   
009189,000300: 07,2335           02715                                    STARAD     +6                         #  ADD VEC TO PREVIOUSLY AVERAGED VECTOR
009190,000301: 07,2336           00031                                    24D                                   #  (N-1)/N AVESTVEC + VEC/N
009191,000302: 07,2337           02715                           STORE    STARAD     +6                         #  AVERAGE STAR VECTOR
009192,000303: 07,2340           02767                           STORE    STARSAV2                              
009193,000304: 07,2341           77776                           EXIT                                           
009194,000305: 07,2342           11535                           CCS      MARKCNTR                              #  SEE IF ANOTHER MARK PAIR IN MKVAC
009195,000306: 07,2343           12266                           TCF      AVESTAR    -1                         #  THERE IS-GO GET IT-DECREMENT COUNTER
009196,000307: 07,2344           35031        ENDMARKS           CAF      FIVE                                  #  NO MORE MARKS-TERMINATE AOTMARK
009197,000308: 07,2345           00004                           INHINT                                         
009198,000309: 07,2346           05252                           TC       WAITLIST                              
009199,000310: 07,2347  E7,1536                                  EBANK=   XYMARK                                
009200,000311: 07,2347           02046 16067                     2CADR    MKRELEAS                              
009201,000312: 
009202,000313: 07,2351           05561                           TC       ENDMARK                               
009203,000314: 
009204,000315: 07,2352           05646        MKALARM            TC       ALARM                                 #  NOT A PAIR TO PROCESS-DO GETMKS
009205,000316: 07,2353           00111                           OCT      111                                   
009206,000317: 07,2354           12230                           TCF      GETMKS                                
009207,000318: 
009208,000319: 07,2355           00307        V01N71             VN       171                                   
009209,000320: 07,2356           01527        V06N87*            VN       687                                   
009210,000321: 
009211,000322:                                                                                                  #  MARKRUPT IS ENTERED FROM INTERUPT LEAD-INS AND PROCESSES CHANNEL 16
009212,000323:                                                                                                  #  CAUSED BY X,Y MARK OR MARK REJECT OR BY THE RATE OF DESCENT SWITCH
009213,000324: 
009214,000325: 07,2357           54016        MARKRUPT           TS       BANKRUPT                              
009215,000326: 07,2360           30033                           CA       CDUY                                  #  STORE CDUS AND TIME NOW-THEN SEE IF
009216,000327: 07,2361           54063                           TS       ITEMP3                                #  WE NEED THEM
009217,000328: 07,2362           30034                           CA       CDUZ                                  
009218,000329: 07,2363           54064                           TS       ITEMP4                                
009219,000330: 07,2364           30032                           CA       CDUX                                  
009220,000331: 07,2365           54065                           TS       ITEMP5                                
009221,000332: 07,2366           00006                           EXTEND                                         
009222,000333: 07,2367           30025                           DCA      TIME2                                 
009223,000334: 07,2370           52062                           DXCH     ITEMP1                                
009224,000335: 07,2371           56002                           XCH      Q                                     
009225,000336: 07,2372           54012                           TS       QRUPT                                 
009226,000337: 
009227,000338: 07,2373           32620                           CAF      OCT34                                 #  SEE IF X OR Y MARK OR MKREJECT
009228,000339: 07,2374           00006                           EXTEND                                         
009229,000340: 07,2375           02016                           RAND     NAVKEYIN                              
009230,000341: 07,2376           10000                           CCS      A                                     
009231,000342: 07,2377           12401                           TCF      +2                                    #  ITS A LIVE ONE-SEE IF ITS WANTED
009232,000343: 07,2400           12431                           TCF      SOMEKEY                               #  ITS SOME OTHER KEY
009233,000344: 
009234,000345: 07,2401           35013                           CAF      BIT12                                 #  ARE WE ASKING FOR A MARK
009235,000346: 07,2402           71314                           MASK     MARKSTAT                              
009236,000347: 07,2403           10000                           CCS      A                                     
009237,000348: 07,2404           05330                           TC       RESUME                                #  DONT WANT MARK OR MKREJECT-DO NOTHING
009238,000349: 
009239,000350: 07,2405           11314                           CCS      MARKSTAT                              #  ARE MARKS BEING ACCEPTED
009240,000351: 07,2406           12412                           TCF      FINDKEY                               #  THEY ARE-WHICH ONE IS IT
009241,000352: 07,2407           05646                           TC       ALARM                                 #  MARKS NOT BEING ACCEPTED-DO ALARM
009242,000353: 07,2410           00112                           OCT      112                                   
009243,000354: 07,2411           05330                           TC       RESUME                                
009244,000355: 
009245,000356: 07,2412           35022        FINDKEY            CAF      BIT5                                  #  SEE IF MARK REJECT
009246,000357: 07,2413           00006                           EXTEND                                         
009247,000358: 07,2414           02016                           RAND     NAVKEYIN                              
009248,000359: 07,2415           10000                           CCS      A                                     
009249,000360: 07,2416           12502                           TCF      MKREJ                                 #  ITS A MARK REJECT
009250,000361: 
009251,000362: 07,2417           35023                           CAF      BIT4                                  #  SEE IF Y MARK
009252,000363: 07,2420           00006                           EXTEND                                         
009253,000364: 07,2421           02016                           RAND     NAVKEYIN                              
009254,000365: 07,2422           10000                           CCS      A                                     
009255,000366: 
009256,000367: 07,2423           12447                           TCF      YMKRUPT                               #  ITS A Y MARK
009257,000368: 
009258,000369: 07,2424           35024                           CAF      BIT3                                  #  SEE IF X MARK
009259,000370: 07,2425           00006                           EXTEND                                         
009260,000371: 07,2426           02016                           RAND     NAVKEYIN                              
009261,000372: 
009262,000373: 07,2427           10000                           CCS      A                                     
009263,000374: 07,2430           12443                           TCF      XMKRUPT                               #  ITS A X MARK
009264,000375: 
009265,000376: 07,2431           35046        SOMEKEY            CAF      OCT140                                #  NOT MARK OR MKREJECT-SEE IF DESCENT BITS
009266,000377: 07,2432           00006                           EXTEND                                         
009267,000378: 07,2433           02016                           RAND     NAVKEYIN                              
009268,000379: 07,2434           00006                           EXTEND                                         
009269,000380: 07,2435           12440                           BZF      +3                                    #  IF NO BITS
009270,000381: 
009271,000382: 07,2436           04674                           TC       POSTJUMP                              #  IF DESCENT BITS
009272,000383: 07,2437           42074                           CADR     DESCBITS                              
009273,000384: 
009274,000385: 07,2440           05646                           TC       ALARM                                 #  NO INBITS IN CHANNEL 16
009275,000386: 07,2441           00113                           OCT      113                                   
009276,000387: 
009277,000388: 07,2442           05330                           TC       RESUME                                
009278,000389: 
009279,000390: 07,2443           35030        XMKRUPT            CAF      ZERO                                  
009280,000391: 07,2444           54070                           TS       RUPTREG1                              #  SET X MARK STORE INDEX TO ZERO
009281,000392: 07,2445           35015                           CAF      BIT10                                 
009282,000393: 07,2446           12452                           TCF      +4                                    
009283,000394: 07,2447           35026        YMKRUPT            CAF      ONE                                   
009284,000395: 07,2450           54070                           TS       RUPTREG1                              #  SET Y MARK STORE INDEX TO ONE
009285,000396: 07,2451           35014                           CAF      BIT11                                 
009286,000397: 07,2452           55536                           TS       XYMARK                                #  SET MARK IDENTIFIATION
009287,000398: 
009288,000399: 07,2453           35011                           CAF      BIT14                                 #  GOT A MARK-SEE IF MARK PAIR MADE
009289,000400: 07,2454           71314                           MASK     MARKSTAT                              
009290,000401: 07,2455           00006                           EXTEND                                         
009291,000402: 07,2456           12467                           BZF      VERIFYMK                              #  NOT A PAIR, NORMAL PROCEDURE
009292,000403: 07,2457           41535                           CS       MARKCNTR                              #  GOT A PAIR, SEE IF ANOTHER CAN BE MADE
009293,000404: 07,2460           65024                           AD       FOUR                                  #  IF SO, INCREMENT POINTER,CLEAR BITS10,11
009294,000405: 07,2461           00006                           EXTEND                                         
009295,000406: 07,2462           62477                           BZMF     5MKALARM                              #  HAVE FIVE MARK PAIRS-DONT ALLOW MARK
009296,000407: 07,2463           25535                           INCR     MARKCNTR                              #  OK FOR ANOTHER PAIR, INCR POINTER
009297,000408: 07,2464           47663                           CS       PRIO23                                #  CLEAR BITS10,11,14 FOR NEXT PAIR
009298,000409: 07,2465           71314                           MASK     MARKSTAT                              
009299,000410: 07,2466           55314                           TS       MARKSTAT                              
009300,000411: 
009301,000412: 07,2467           31536        VERIFYMK           CA       XYMARK                                
009302,000413: 07,2470           71314                           MASK     MARKSTAT                              
009303,000414: 07,2471           10000                           CCS      A                                     
009304,000415: 07,2472           12474                           TCF      +2                                    #  THIS MARK NOT DESIRED
009305,000416: 07,2473           12526                           TCF      VACSTOR                               #  MARK DESIRED - STORE CDUS
009306,000417: 07,2474           05646                           TC       ALARM                                 
009307,000418: 07,2475           00114                           OCT      114                                   
009308,000419: 07,2476           05330                           TC       RESUME                                #  RESUME-DISPLAY UNCHANGED-WAIT FOR ACTION
009309,000420: 
009310,000421: 07,2477           05646        5MKALARM           TC       ALARM                                 #  ATTEMPTING TO MAKE MORE THAN 5 MK PAIRS
009311,000422: 07,2500           00107                           OCT      107                                   
009312,000423: 07,2501           05330                           TC       RESUME                                #  DONT CHANGE DISPLAY-DO NOTHING
009313,000424: 
009314,000425: 07,2502           35065        MKREJ              CAF      PRIO3                                 #  INFLIGHT-SEE IF MARKS MADE
009315,000426: 07,2503           71314                           MASK     MARKSTAT                              
009316,000427: 07,2504           10000                           CCS      A                                     
009317,000428: 07,2505           12511                           TCF      REJECT                                #  MARKS MADE-REJECT ONE
009318,000429: 07,2506           05646                           TC       ALARM                                 #  NO MARK TO REJECT-BAD PROCEDURE-ALARM
009319,000430: 07,2507           00115                           OCT      115                                   
009320,000431: 07,2510           05330                           TC       RESUME                                #  DESIRED ACTION DISPLAYED
009321,000432: 
009322,000433: 07,2511           44367        REJECT             CS       PRIO30                                #  ZERO BIT14,SHOW REJ.,SEE IF MARK SINCE
009323,000434: 07,2512           71314                           MASK     MARKSTAT                              #  LAST REJECT
009324,000435: 07,2513           65012                           AD       BIT13                                 
009325,000436: 07,2514           57314                           XCH      MARKSTAT                              
009326,000437: 07,2515           75012                           MASK     BIT13                                 
009327,000438: 07,2516           10000                           CCS      A                                     
009328,000439: 07,2517           12524                           TCF      REJECT2                               #  ANOTHER REJECT SET BIT 10+11 TO ZERO
009329,000440: 
009330,000441: 07,2520           41536                           CS       XYMARK                                #  MARK MADE SINCE REJECT-REJECT MARK IN 1D
009331,000442: 07,2521           71314        RENEWMK            MASK     MARKSTAT                              
009332,000443: 07,2522           55314                           TS       MARKSTAT                              
009333,000444: 07,2523           12574                           TCF      REMARK                                #  GO REQUEST NEW MARK ACTION
009334,000445: 
009335,000446: 07,2524           45065        REJECT2            CS       PRIO3                                 #  ON SECOND REJECT-DISPLAY VB53 AGAIN
009336,000447: 07,2525           12521                           TCF      RENEWMK                               
009337,000448: 
009338,000449: 07,2526           35054        VACSTOR            CAF      LOW9                                  
009339,000450: 07,2527           71314                           MASK     MARKSTAT                              #  STORE MARK VAC ADR IN RUPTREG2
009340,000451: 07,2530           54071                           TS       RUPTREG2                              
009341,000452: 07,2531           00006                           EXTEND                                         
009342,000453: 07,2532           30062                           DCA      ITEMP1                                #  PICK UP MARKTIME
009343,000454: 07,2533           53547                           DXCH     TSIGHT                                #  STORE LAST MARK TIME
009344,000455: 07,2534           31535                           CA       MARKCNTR                              #  6 X MARKCNTR FOR STORE INDEX
009345,000456: 07,2535           00006                           EXTEND                                         
009346,000457: 07,2536           76216                           MP       SIX                                   
009347,000458: 07,2537           56001                           XCH      L                                     #  GET INDEX FROM LOW ORDER PART
009348,000459: 07,2540           60071                           AD       RUPTREG2                              #  SET CDU STORE INDEX TO MARKVAC
009349,000460: 07,2541           26070                           ADS      RUPTREG1                              #  INCREMENT VAC PICKUP BY MARK FOR FLIGHT
009350,000461: 07,2542           30063                           CA       ITEMP3                                
009351,000462: 07,2543           50070                           INDEX    RUPTREG1                              
009352,000463: 07,2544           54000                           TS       0                                     #  STORE CDUY
009353,000464: 07,2545           30064                           CA       ITEMP4                                
009354,000465: 07,2546           50070                           INDEX    RUPTREG1                              
009355,000466: 07,2547           54002                           TS       2                                     #  STORE CDUZ
009356,000467: 07,2550           30065                           CA       ITEMP5                                
009357,000468: 07,2551           50070                           INDEX    RUPTREG1                              
009358,000469: 07,2552           54004                           TS       4                                     #  STORE CDUX
009359,000470: 
009360,000471: 07,2553           35012                           CAF      BIT13                                 #  CLEAR BIT13 TO SHOW MARK MADE
009361,000472: 07,2554           61536                           AD       XYMARK                                #  SET MARK ID IN MARKSTAT
009362,000473: 07,2555           40000                           COM                                            
009363,000474: 07,2556           71314                           MASK     MARKSTAT                              
009364,000475: 07,2557           61536                           AD       XYMARK                                
009365,000476: 07,2560           55314                           TS       MARKSTAT                              
009366,000477: 07,2561           75065                           MASK     PRIO3                                 #  SEE IF X, Y MARK MADE
009367,000478: 07,2562           54001                           TS       L                                     
009368,000479: 
009369,000480: 07,2563           35065                           CA       PRIO3                                 
009370,000481: 07,2564           00006                           EXTEND                                         
009371,000482: 07,2565           06001                           RXOR     LCHAN                                 
009372,000483: 07,2566           10000                           CCS      A                                     
009373,000484: 07,2567           12574                           TCF      REMARK                                #  NOT PAIR YET, DISPLAY MARK ACTION
009374,000485: 07,2570           41314                           CS       MARKSTAT                              #  MARK PAIR COMPLETE-SET BIT14
009375,000486: 07,2571           75011                           MASK     BIT14                                 
009376,000487: 07,2572           27314                           ADS      MARKSTAT                              
009377,000488: 07,2573           12574                           TCF      REMARK                                #  GO DISPLAY V54
009378,000489: 
009379,000490: 07,2574           35065        REMARK             CAF      PRIO3                                 #  BITS 10 AND 11
009380,000491: 07,2575           71314                           MASK     MARKSTAT                              
009381,000492: 07,2576           00006                           EXTEND                                         
009382,000493: 07,2577           75021                           MP       BIT6                                  #  SHIFT MARK IDS TO BE 0 TO 3 FOR INDEX
009383,000494: 07,2600           55537                           TS       MKDEX                                 #  STORE VERB INDEX
009384,000495: 07,2601           37672                           CAF      PRIO32                                
009385,000496: 07,2602           05142                           TC       NOVAC                                 #  ENTER JOB TO CHANGE DISPLAY TO
009386,000497: 07,2603  E7,1536                                  EBANK=   XYMARK                                #  REQUEST NEXT ACTION
009387,000498: 07,2603           02606 16067                     2CADR    CHANGEVB                              
009388,000499: 
009389,000500: 07,2605           05330                           TC       RESUME                                
009390,000501: 
009391,000502: 07,2606           51537        CHANGEVB           INDEX    MKDEX                                 #  INFLIGHT-PICK UP MARK VB INDEX
009392,000503: 07,2607           32612                           CAF      MKVB54                                
009393,000504: 07,2610           04655                           TC       BANKCALL                              #  PASTE UP NEXT MK VERB DISPLAY
009394,000505: 07,2611           16237                           CADR     PASTIT                                
009395,000506: 
009396,000507:                                                                                                  #  THE FOUR MKVBS ARE INDEXED-THEIR ORDER CANNOT BE CHANGED
009397,000508: 
009398,000509: 07,2612           15507        MKVB54             VN       5471                                  #  MAKE X OR Y MARK
009399,000510: 07,2613           15307        MKVB53             VN       5371                                  #  MAKE Y MARK
009400,000511: 07,2614           15107        MKVB52             VN       5271                                  #  MAKE X MARK
009401,000512: 07,2615           15507        MKVB54*            VN       5471                                  #  MAKE X OR Y MARK
009402,000513: 07,2616           04000 00000  DP1/8              2DEC     .125                                  
009403,000514: 07,2620           00034        OCT34              OCT      34                                    
009404,000515: 07,2621           01507        V06N71             VN       671                                   

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