Source Code

These source-code files are part of a reconstructed copy of Corona 261, the final, flown release of the Block I Command Module (CM) Apollo Guidance Computer (AGC) software for the AS-202 mission.

They have been created via disassembly of binary dumps of the original core rope memory modules actually flown on the mission, part numbers 1003733-171, 1003733-241, 1003733-191, 1003733-211, 1003733-221, and 1003733-241. The source code for the Apollo 4 and 6 software, Solarium 55, was used as a starting point, since it was directly derived from Corona and (at least in theory) only minimally modified.

Since only binary dumps (rather than listings) of Corona 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.

016494,000002:                                                                                                  ## Copyright:   Public domain.
016495,000003:                                                                                                  ## Filename:    RTB_OP_CODES.agc
016496,000004:                                                                                                  ## Purpose:     A section of Corona revision 261.
016497,000005:                                                                                                  ##              It is part of the source code for the Apollo Guidance Computer
016498,000006:                                                                                                  ##              (AGC) for AS-202. No original listings of this software are
016499,000007:                                                                                                  ##              available; instead, this file was created via disassembly of
016500,000008:                                                                                                  ##              the core rope modules actually flown on the mission.
016501,000009:                                                                                                  ## Assembler:   yaYUL
016502,000010:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
016503,000011:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
016504,000012:                                                                                                  ## Mod history: 2023-05-27 MAS  Created from Solarium 55.
016505,000013:                                                                                                  ##              2023-06-17 MAS  Updated for Corona.
016506,000014: 
016507,000015: 
016508,000016: 30,6251                                           BANK     30                                    
016509,000017:                                                                                                  #  ROUTINE TO LOAD TIME OF DAY INTO MPAC
016510,000018: 
016511,000019: 30,6251           02677        LOADTIME           TC       READTIME                              
016512,000020: 30,6252           40572                           CS       RUPTSTOR                              
016513,000021: 30,6253           50115                           TS       MPAC                                  
016514,000022: 30,6254           40573                           CS       RUPTSTOR   +1                         
016515,000023: 30,6255           50116                           TS       MPAC       +1                         
016516,000024: 30,6256           20016                           RELINT                                         
016517,000025: 30,6257           35501                           CAF      ZERO                                  
016518,000026: 30,6260           50066                           TS       NEWEQIND                              
016519,000027: 30,6261           50117                           TS       MPAC       +2                         
016520,000028: 30,6262           05237                           TC       DPEXIT                                
016521,000029: 
016522,000030: 
016523,000031:                                                                                                  #  ROUTINE TO RESET THE PUSHDOWN POUNTER
016524,000032: 
016525,000033: 30,6263           40067        FRESHPD            CS       FIXLOC                                
016526,000034: 30,6264           40000                           COM                                            
016527,000035: 30,6265           50123                           TS       PUSHLOC                               
016528,000036: 30,6266           04703                           TC       RE-ENTER                              
016529,000037: 
016530,000038: 
016531,000039:                                                                                                  #  ROUTINE TO ZERO OUT THE FIRST 38 LOCS OF A VAC AREA
016532,000040: 
016533,000041: 30,6267           36301        ZEROVAC            CAF      37DEC                                 
016534,000042: 30,6270           50102        ZVLOOP             TS       TEM2                                  
016535,000043: 30,6271           60067                           AD       FIXLOC                                
016536,000044: 30,6272           50001                           TS       Q                                     
016537,000045: 30,6273           35501                           CAF      ZERO                                  
016538,000046: 30,6274           20001                           INDEX    Q                                     
016539,000047: 30,6275           50000                           TS       0                                     
016540,000048: 30,6276           10102                           CCS      TEM2                                  
016541,000049: 30,6277           06270                           TC       ZVLOOP                                
016542,000050: 30,6300           04703                           TC       RE-ENTER                              
016543,000051: 
016544,000052: 30,6301           00045        37DEC              DEC      37         B-14                       
016545,000053: 
016546,000054: 
016547,000055:                                                                                                  #  ROUTINE TO CONVERT IS COMP. NOS. TO 1S COMP.
016548,000056: 
016549,000057: 30,6302           10115        CDULOGIC           CCS      MPAC                                  #  THIS BASIC ROUTINE TESTS CDU ANGLES FOR
016550,000058: 30,6303           06310                           TC       CDULOG1                               #  +OR-SIGN INCLUDING ZERO AND FORMS A DP
016551,000059: 30,6304           06310                           TC       CDULOG1                               #  NUMBER CORRESPONDING TO ANGLE
016552,000060: 30,6305           06306                           TC       +1                                    
016553,000061: 30,6306           44522                           CS       HALF                                  #  USE           SMOVE   1
016554,000062: 30,6307           06311                           TC       +2                                    #                RTB
016555,000063: 30,6310           45501        CDULOG1            CS       ZERO                                  #                        CDUXYZ
016556,000064: 30,6311           30034                           XCH      OVCTR                                 #                        CDULOGIC
016557,000065: 30,6312           30115                           XCH      MPAC                                  
016558,000066: 30,6313           25777                           EXTEND                                         
016559,000067: 30,6314           44522                           MP       HALF                                  
016560,000068: 30,6315           30034                           XCH      OVCTR                                 
016561,000069: 30,6316           60003                           AD       LP                                    
016562,000070: 30,6317           30116                           XCH      MPAC       +1                         
016563,000071: 30,6320           30034                           XCH      OVCTR                                 
016564,000072: 30,6321           30115                           XCH      MPAC                                  
016565,000073: 30,6322           05237                           TC       DPEXIT                                
016566,000074: 
016567,000075: 
016568,000076:                                                                                                  #  ROUTINE TO CONVERT 1S COMP. NOS. TO 2S COMP.
016569,000077: 
016570,000078: 30,6323           35501        1STO2S             CAF      ZERO                                  
016571,000079: 30,6324           30116                           XCH      MPAC       +1                         
016572,000080: 30,6325           60000                           DOUBLE                                         
016573,000081: 30,6326           50034                           TS       OVCTR                                 
016574,000082: 30,6327           35501                           CAF      ZERO                                  
016575,000083: 30,6330           60115                           AD       MPAC                                  
016576,000084: 30,6331           60115                           AD       MPAC                                  
016577,000085: 30,6332           10000                           CCS      A                                     
016578,000086: 30,6333           64516                           AD       ONE                                   
016579,000087: 30,6334           06336                           TC       +2                                    
016580,000088: 30,6335           40000                           COM                                            
016581,000089: 30,6336           50115        ZYXR               TS       MPAC                                  #  AND MAYBE OVERFLOW.
016582,000090: 30,6337           05237                           TC       DPEXIT                                
016583,000091: 
016584,000092: 30,6340           20000                           INDEX    A                                     #  HANDLE OVERFLOW IN STANDARD ANGULAR WAY.
016585,000093: 30,6341           34477                           CAF      LIMITS                                
016586,000094: 30,6342           60115                           AD       MPAC                                  #  GUARANTEED NO OVERFLOW.
016587,000095: 30,6343           06336                           TC       ZYXR                                  
016588,000096: 
016589,000097: 
016590,000098: 30,6344           20017        READPIPS           INHINT                                         
016591,000099: 30,6345           40044                           CS       PIPAX                                 
016592,000100: 30,6346           40000                           CS       A                                     
016593,000101: 30,6347           20067                           INDEX    FIXLOC                                
016594,000102: 30,6350           50040                           TS       VAC                                   
016595,000103: 30,6351           40045                           CS       PIPAY                                 
016596,000104: 30,6352           40000                           CS       A                                     
016597,000105: 30,6353           20067                           INDEX    FIXLOC                                
016598,000106: 30,6354           50042                           TS       VAC        +2                         
016599,000107: 30,6355           40046                           CS       PIPAZ                                 
016600,000108: 30,6356           40000                           CS       A                                     
016601,000109: 30,6357           20067                           INDEX    FIXLOC                                
016602,000110: 30,6360           50044                           TS       VAC        +4                         
016603,000111: 30,6361           20016                           RELINT                                         
016604,000112: 30,6362           35501                           CAF      ZERO                                  
016605,000113: 30,6363           20067                           INDEX    FIXLOC                                
016606,000114: 30,6364           50041                           TS       VAC        +1                         
016607,000115: 30,6365           20067                           INDEX    FIXLOC                                
016608,000116: 30,6366           50043                           TS       VAC        +3                         
016609,000117: 30,6367           20067                           INDEX    FIXLOC                                
016610,000118: 30,6370           50045                           TS       VAC        +5                         
016611,000119: 30,6371           50066                           TS       NEWEQIND                              #  LOAD INDICATOR OFF.
016612,000120: 30,6372           45501        VMODE              CS       ZERO                                  
016613,000121: 30,6373           05240                           TC       DPEXIT     +1                         
016614,000122: 
016615,000123: 
016616,000124: 
016617,000125: 30,6374           20067        PULSEIMU           INDEX    FIXLOC                                #  ADDRESS OF GYRO COMMANDS SHOULD BE IN X1
016618,000126: 30,6375           40046                           CS       X1                                    
016619,000127: 30,6376           40000                           COM                                            
016620,000128: 30,6377           05654                           TC       BANKCALL                              
016621,000129: 30,6400           31421                           CADR     GYRODPNT                              
016622,000130: 
016623,000131: 30,6401           04703                           TC       RE-ENTER                              
016624,000132: 
016625,000133: 
016626,000134: 30,6402           05654        SGNAGREE           TC       BANKCALL                              
016627,000135: 30,6403           07154                           CADR     TPAGREE                               
016628,000136: 30,6404           05237                           TC       DPEXIT                                
016629,000137: 
016630,000138: 
016631,000139:                                                                                                  #  ROUTINE TO COMPLETE OPTICS TRUNNION ANGLE CONVERSION FROM COUNTER
016632,000140:                                                                                                  #  READING TO DP REVOLUTIONS. CALLS TO TRUNLOG SHOULD BE IMMEDIATELY
016633,000141:                                                                                                  #  PRECEDED BY A CALL TO CDULOGIC.
016634,000142: 30,6405           34502        TRUNLOG            CAF      BIT13                                 
016635,000143: 30,6406           70730                           MASK     WASOPSET                              
016636,000144: 30,6407           10000                           CCS      A                                     
016637,000145: 30,6410           06414                           TC       +4                                    
016638,000146: 
016639,000147: 30,6411           34522                           CAF      HALF                                  
016640,000148: 30,6412           05416        TRUNLOG1           TC       SHORTMP                               
016641,000149: 30,6413           04024                           TC       DANZIG                                #  WITH PD IF AT END W/ NO ADDRESSES.
016642,000150: 
016643,000151: 30,6414           36421                           CAF      10DEGS                                #  CORRECT FOR 20 DEG OFFSET (CDULOGIC
016644,000152: 30,6415           60115                           AD       MPAC                                  #   ALREADY SHIFTED IT RIGHT ONE) AND SHIFT
016645,000153: 30,6416           50115                           TS       MPAC                                  #   RIGHT TWO ADDITIONAL PLACES.
016646,000154: 30,6417           34502                           CAF      QUARTER                               
016647,000155: 30,6420           06412                           TC       TRUNLOG1                              
016648,000156: 
016649,000157: 30,6421           07020        10DEGS             DEC      3600       B-14                       #  HALF OF SXT TRUNION OFFSET
016650,000158: 
016651,000159: 
016652,000160: 30,6422           36442        INCRCDUS           CAF      LOCTHETA                              
016653,000161: 30,6423           50077                           TS       BUF                                   
016654,000162: 30,6424           35503                           CAF      TWO                                   
016655,000163: 30,6425           50100        INCRCDU2           TS       BUF        +1                         
016656,000164: 30,6426           60000                           DOUBLE                                         
016657,000165: 30,6427           60070                           AD       VACLOC                                
016658,000166: 30,6430           20000                           INDEX    A                                     
016659,000167: 30,6431           40000                           CS       0                                     
016660,000168: 30,6432           40000                           COM                                            
016661,000169: 30,6433           05654                           TC       BANKCALL                              
016662,000170: 30,6434           30361                           CADR     CDUINC                                
016663,000171: 
016664,000172: 30,6435           10077                           CCS      BUF                                   
016665,000173: 30,6436           50077                           TS       BUF                                   
016666,000174: 30,6437           10100                           CCS      BUF        +1                         
016667,000175: 30,6440           06425                           TC       INCRCDU2                              
016668,000176: 30,6441           06372                           TC       VMODE                                 
016669,000177: 
016670,000178: 30,6442           00702        LOCTHETA           ADRES    THETAD     +2                         
016671,000179: 
016672,000180: 
016673,000181:                                                                                                  #        LOG FUNCTION SUBROUTINE
016674,000182: 
016675,000183:                                                                                                  #    INPUT... X  (IN IMPAC)
016676,000184:                                                                                                  #   OUTPUT... -LN(X)/32          ( IN MPAC.  SCALED BY 32TO FIT LOG OF 2EXP-28.
016677,000185: 
016678,000186: 30,6443           06570        LOG                TC       SWAPLOC                               #   CALLED BY    RTB     LOG
016679,000187: 30,6444           04000                           TC       INTPRET                               
016680,000188: 
016681,000189: 30,6445           47574                           NOLOD    2                                     #  GENERATES LOG BY SHIFTING ARG UNTIL
016682,000190: 30,6446           57726                           TSLC     BDSU                                  #  IT LIES BETWEEN .5 AND1.  THE LOG OF
016683,000191: 30,6447           77576                           EXIT                                           #  THIS PART IS FOUND AND THE LOG OF THE
016684,000192:                                                                                                  #  SHIFTED PART IS COMPUTED AND ADDED IN.
016685,000193: 30,6450           00040                                    31D                                   #  SHIFT COUNT STORED IN LOC 31 OF VAC AREA
016686,000194: 30,6451           21051                                    NEARONE                               
016687,000195: 
016688,000196: 30,6452           05554                           TC       POLY                                  #  GETS LOG OF PRINCIPLE PART.
016689,000197: 30,6453           00006                           DEC      6          B-14                       
016690,000198: 30,6454           00000 00000                     2DEC     0          B-28                       
016691,000199: 30,6456           01001 14636                     2DEC     .031335467                            
016692,000200: 30,6460           00325 07310                     2DEC     .0130145859                            
016693,000201: 30,6462           00541 16735                     2DEC     .0215738898                            
016694,000202: 30,6464           35501                           CAF      ZERO                                  
016695,000203: 30,6465           50117                           TS       MPAC       +2                         
016696,000204: 30,6466           36507                           CAF      CLOG1/2    +1                         
016697,000205: 30,6467           30116                           XCH      MPAC       +1                         
016698,000206: 30,6470           50100                           TS       LOGTEM     +1                         
016699,000207: 30,6471           36506                           CAF      CLOG1/2                               
016700,000208: 30,6472           30115                           XCH      MPAC                                  
016701,000209: 30,6473           30077                           XCH      LOGTEM                                
016702,000210: 30,6474           20067                           INDEX    FIXLOC                                
016703,000211: 30,6475           40037                           CS       31D                                   #  LOAD POSITIVE SHIFT COUNT IN A.
016704,000212: 30,6476           05422                           TC       SHORTMP2                              #  MULTIPLY BY SHIFT COUNT.
016705,000213: 
016706,000214: 30,6477           30117                           XCH      MPAC       +2                         
016707,000215: 30,6500           30116                           XCH      MPAC       +1                         
016708,000216: 30,6501           30115                           XCH      MPAC                                  #  RESULT WAS IN MPAC +1 AND MPAC +2.
016709,000217: 30,6502           05171                           TC       DAD                                   #  ADD IN PREVIOUS RESULT. LEFT IN LOGTEM.
016710,000218: 30,6503           00077                           ADRES    LOGTEM                                
016711,000219: 30,6504           06570                           TC       SWAPLOC                               
016712,000220: 30,6505           05237                           TC       DPEXIT                                
016713,000221: 
016714,000222: 30,6506           00542 34414  CLOG1/2            2DEC     .0216608494                            
016715,000223: 
016716,000224: 
016717,000225:                                                                                                  #        SUBROUTINE TO COMPUTE THE ARCTAN OF THE RATIO OF TWO FUNCTIONS.
016718,000226: 
016719,000227:                                                                                                  #        CALLED AS THOUGH A BASIC SUBR...        RTB     ARCTAN
016720,000228: 
016721,000229: 30,6510           06570        ARCTAN             TC       SWAPLOC                               #  ARCTAN COMPUTES ARCTAN(VACZ/VACX)
016722,000230: 30,6511           04000                           TC       INTPRET                               #                         ---------
016723,000231: 30,6512           51176        INATAN             DSQ      0                                     #  RESULT HAS VALUE BETWEEN + AND - 1/2
016724,000232: 30,6513           00045                                    VACZ                                  #  (180 DEG. SCALED) IS LEFT IN MPAC.
016725,000233: 
016726,000234: 30,6514           51172                           DSQ      4                                     
016727,000235: 30,6515           70746                           DAD      BOV                                   
016728,000236: 30,6516           47653                           BZE      SQRT                                  
016729,000237: 30,6517           61746                           BDDV     BOV                                   
016730,000238: 30,6520           56713                           TSRT     ASIN                                  
016731,000239: 30,6521           00041                                    VACX                                  
016732,000240: 30,6522           77777                                    -                                     
016733,000241: 30,6523           20554                                    2BIG                                  
016734,000242: 30,6524           20560                                    ATAN0/0                               
016735,000243: 30,6525           00045                                    VACZ                                  
016736,000244: 30,6526           20564                                    ATAN=90                               
016737,000245: 30,6527           00002                                    1                                     #  AND PUSH IT DOWN
016738,000246: 
016739,000247: 30,6530           73774                           BMN      2                                     
016740,000248: 30,6531           41423                           LODON    DMOVE                                 
016741,000249: 30,6532           77576                           EXIT                                           
016742,000250: 30,6533           00041                                    VACX                                  
016743,000251: 30,6534           20541                                    NEGVX                                 
016744,000252: 30,6535           77777                                    -                                     #  (INACTIVE NEEDED FOR PUSH-UP).
016745,000253: 
016746,000254: 30,6536           06570        ATANDUN            TC       SWAPLOC                               
016747,000255: 30,6537           05237                           TC       DPEXIT                                
016748,000256: 
016749,000257: 
016750,000258: 
016751,000259: 30,6540           47174        NEGVX              COMP     2                                     #  IF VACX NEGATIVE, CHNAGE RESULT.
016752,000260: 30,6541           43742                           BPL      DAD                                   
016753,000261: 30,6542           76576                           RTB                                            
016754,000262: 30,6543           77777                                    -                                     
016755,000263: 30,6544           20550                                    NEGOUT                                
016756,000264: 30,6545           21212                                    HALVE                                 
016757,000265: 30,6546           20537                                    ATANDUN                               
016758,000266: 30,6547           47575        NEGOUT             NOLOD    1                                     
016759,000267: 30,6550           66771                           DSU      RTB                                   
016760,000268: 30,6551           21212                                    HALVE                                 
016761,000269: 30,6552           20537                                    ATANDUN                               
016762,000270: 
016763,000271: 30,6553           47575        2BIG               NOLOD    1                                     
016764,000272: 30,6554           45772                           VSRT     ITC                                   
016765,000273: 30,6555           00002                                    1                                     
016766,000274: 30,6556           20513                                    INATAN                                
016767,000275: 
016768,000276: 30,6557           45175        ATAN0/0            DMOVE    1                                     
016769,000277: 30,6560           76576                           RTB                                            
016770,000278: 30,6561           21065                                    3ZEROS                                #  WHAT SHOULD ARCTAN(0/0) =
016771,000279: 30,6562           20537                                    ATANDUN                               
016772,000280: 
016773,000281: 30,6563           53775        ATAN=90            SIGN     1                                     
016774,000282: 30,6564           76576                           RTB                                            
016775,000283: 30,6565           21063                                    FOURTH                                
016776,000284: 30,6566           00045                                    VACZ                                  
016777,000285: 30,6567           20537                                    ATANDUN                               
016778,000286: 
016779,000287: 
016780,000288:                                                                                                  #        BASIC SUBROUTINE TO SAVE INTERPRETER REGISTERS  (SAME BANK AS RTBS).
016781,000289: 
016782,000290: 30,6570           30120        SWAPLOC            XCH      LOC                                   #  SUBROUTINE TO SWAP LOC, ADRLOC, AND
016783,000291: 30,6571           20067                           INDEX    FIXLOC                                #  ORDER REGISTERS WITH LOCATIONS 28,
016784,000292: 30,6572           30034                           XCH      28D                                   #  29, AND 30 IN TEMP AREA.
016785,000293: 30,6573           50120                           TS       LOC                                   
016786,000294: 30,6574           30121                           XCH      ADRLOC                                #  USEFUL FOR USING INTERPRETER IN SUBROUT
016787,000295: 30,6575           20067                           INDEX    FIXLOC                                #  AND THEN ABLE TO CONTINUE IN MIDDLE OF
016788,000296: 30,6576           30035                           XCH      29D                                   #  CURRENT EQUATIONS.
016789,000297: 30,6577           50121                           TS       ADRLOC                                #  USE...        TC      SWAPLOC
016790,000298: 30,6600           40061                           CS       BANKSET                               #  PACK INTERPRETIVE BANK AND ORDER IN 30D.
016791,000299: 30,6601           60063                           AD       ORDER                                 
016792,000300: 30,6602           20067                           INDEX    FIXLOC                                #                .........
016793,000301: 30,6603           30036                           XCH      30D                                   #                TC   SWAPLOC
016794,000302: 30,6604           50063                           TS       ORDER                                 #                TC   DANZIG
016795,000303: 30,6605           74720                           MASK     LOW7                                  
016796,000304: 30,6606           30063                           XCH      ORDER                                 
016797,000305: 30,6607           72261                           MASK     BANKMASK                              
016798,000306: 30,6610           40000                           COM                                            
016799,000307: 30,6611           50061                           TS       BANKSET                               
016800,000308: 30,6612           00001                           TC       Q                                     
016801,000309: 
016802,000310: 
016803,000311:                                                                                                  #        SUBROUTINE TO SET MPACS TO POS OR NEG MAX DEPENDING ON SIGN MPAC
016804,000312: 30,6613           10115        SIGNMPAC           CCS      MPAC                                  
016805,000313: 30,6614           06626                           TC       SETPOS                                
016806,000314: 30,6615           06626                           TC       SETPOS                                
016807,000315: 30,6616           06617                           TC       +1                                    
016808,000316: 30,6617           34500                           CAF      NEGSIGN                               
016809,000317: 30,6620           50115                           TS       MPAC                                  
016810,000318: 30,6621           50116                           TS       MPAC       +1                         
016811,000319: 30,6622           50117                           TS       MPAC       +2                         
016812,000320: 30,6623           35501                           CAF      ZERO                                  
016813,000321: 30,6624           50066                           TS       NEWEQIND                              
016814,000322: 30,6625           05237                           TC       DPEXIT                                
016815,000323: 
016816,000324: 30,6626           34476        SETPOS             CAF      POSMAX                                
016817,000325: 30,6627           06620                           TC       -7                                    
016818,000326: 
016819,000327: 
016820,000328: 30,6630           35503        V1STO2S            CAF      TWO                                   #  THIS ROUTINE TAKES GIMBAL ANGLES SCALED
016821,000329: 30,6631           50071                           TS       VBUF                                  #  2PI IN THE VAC AND LEAVES 2S COMPLIMENT
016822,000330: 30,6632           60000                           DOUBLE                                         #  ANSWERS IN MPAC.....MPAC +2
016823,000331: 30,6633           60070                           AD       VACLOC                                #  BASE ADDRESS OF VECTOR ACCUMULATOR
016824,000332: 30,6634           50072                           TS       VBUF       +1                         
016825,000333: 30,6635           20072                           INDEX    VBUF       +1                         
016826,000334: 30,6636           40001                           CS       Q                                     
016827,000335: 30,6637           40000                           COM                                            
016828,000336: 30,6640           60000                           DOUBLE                                         
016829,000337: 30,6641           50034                           TS       OVCTR                                 #  SKIPS ON OVERFLOW
016830,000338: 30,6642           35501                           CAF      ZERO                                  
016831,000339: 30,6643           20072                           INDEX    VBUF       +1                         
016832,000340: 30,6644           60000                           AD       A                                     
016833,000341: 30,6645           20072                           INDEX    VBUF       +1                         
016834,000342: 30,6646           60000                           AD       A                                     
016835,000343: 30,6647           10000                           CCS      A                                     #  TEZT FOR NEGATIVE MAJOR PART
016836,000344: 30,6650           64516                           AD       ONE                                   
016837,000345: 30,6651           06653                           TC       +2                                    
016838,000346: 30,6652           40000                           COM                                            
016839,000347: 30,6653           20071        ZYXW               INDEX    VBUF                                  
016840,000348: 30,6654           50115                           TS       MPAC                                  
016841,000349: 30,6655           06663                           TC       ZYXWV                                 
016842,000350: 30,6656           20000                           INDEX    A                                     
016843,000351: 30,6657           34477                           CAF      LIMITS                                #  NORMAL PROCEDURE FOR ANGLE OVERFLOW
016844,000352: 30,6660           20071                           INDEX    VBUF                                  
016845,000353: 30,6661           60115                           AD       MPAC                                  
016846,000354: 30,6662           06653                           TC       ZYXW                                  
016847,000355: 
016848,000356: 30,6663           10071        ZYXWV              CCS      VBUF                                  
016849,000357: 30,6664           06631                           TC       V1STO2S    +1                         
016850,000358: 30,6665           50066                           TS       NEWEQIND                              
016851,000359: 30,6666           45503                           CS       TWO                                   
016852,000360: 30,6667           05240                           TC       DPEXIT     +1                         
016853,000361: 30,6670           35503        V2STOD1S           CAF      TWO                                   #  THIS ROUTINE TAKES CDU ANGLES IN MPAC...
016854,000362: 30,6671           50071                           TS       VBUF                                  #  MPAC +2 AND CONVERTS TO ANGLES SCALED
016855,000363: 30,6672           60000                           DOUBLE                                         #  2PI IN THE VAC LOCATIONS
016856,000364: 30,6673           60070                           AD       VACLOC                                
016857,000365: 30,6674           50072                           TS       VBUF       +1                         
016858,000366: 
016859,000367: 
016860,000368: 
016861,000369: 30,6675           20071                           INDEX    VBUF                                  
016862,000370: 30,6676           40115                           CS       MPAC                                  
016863,000371: 30,6677           25777                           EXTEND                                         
016864,000372: 30,6700           44520                           MP       NEG1/2                                
016865,000373: 30,6701           50073                           TS       VBUF       +2                         #  UNCORRECTED UPPER PARTS
016866,000374: 30,6702           10003                           CCS      LP                                    #  TEST SIGN OF LOWER WORD
016867,000375: 30,6703           35501                           CAF      ZERO                                  
016868,000376: 30,6704           06707                           TC       +3                                    #  POSITIVE CASE OK
016869,000377: 30,6705           06706                           TC       +1                                    
016870,000378: 30,6706           44522                           CS       HALF                                  #  NEGATIVE CASE
016871,000379: 30,6707           60003                           AD       LP                                    #  CORRECT LOWER WORD
016872,000380: 30,6710           20072                           INDEX    VBUF       +1                         
016873,000381: 30,6711           50001                           TS       Q                                     #  STORE LOWER WORD
016874,000382: 30,6712           35501                           CAF      ZERO                                  #  DEAL WITH OVERFLOW STANDARD WAY
016875,000383: 30,6713           60073                           AD       VBUF       +2                         
016876,000384: 30,6714           20072                           INDEX    VBUF       +1                         
016877,000385: 30,6715           50000                           TS       A                                     #  STORE UPPER WORD
016878,000386: 
016879,000387: 30,6716           10071                           CCS      VBUF                                  
016880,000388: 30,6717           06670                           TC       V2STOD1S                              
016881,000389: 
016882,000390: 30,6720           45501                           CS       ZERO                                  
016883,000391: 30,6721           50065                           TS       MODE                                  
016884,000392: 30,6722           04024                           TC       DANZIG                                
016885,000393: 
016886,000394: 
016887,000395:                                                                                                  #  ROUTINE TO FREE DSKY
016888,000396: 
016889,000397: 
016890,000398: 
016891,000399: 30,6723           03370        DSPFREE            TC       FREEDSP                               
016892,000400: 30,6724           04703                           TC       RE-ENTER                              
016893,000401: 
016894,000402: 
016895,000403:                                                                                                  #        FINAGLE TO GET OGC CORRECTED TO NEAREST POINT ON 16 SPEED.
016896,000404: 
016897,000405: 30,6725           41520        CDUXFIX            CS       OGC                                   #  INTERPRETIVE SCALING.   (REVS)
016898,000406: 30,6726           25777                           EXTEND                                         
016899,000407: 30,6727           44503                           MP       BIT12                                 #  MULTIPLY BY 1/8 TH.
016900,000408: 30,6730           50116                           TS       MPAC       +1                         #  SAVE RESULT.
016901,000409: 
016902,000410: 30,6731           34504                           CAF      BIT11                                 #  1/16 TH.
016903,000411: 30,6732           60700                           AD       THETAD                                #  TO FIND NEAREST ZERO POINT.
016904,000412: 30,6733           76777                           MASK     HI4                                   #  DROPS BACK TO LOWER (MORE NEG) 1/8TH.
016905,000413: 30,6734           51450                           TS       K1ROLL                                
016906,000414: 30,6735           06740                           TC       +3                                    #  SKIPS THIS IF ADDITION OVERFLEW.
016907,000415: 30,6736           34476                           CAF      POSMAX                                #  IN THAT CASE, USE POSMAX.
016908,000416: 30,6737           51450                           TS       K1ROLL                                
016909,000417: 
016910,000418: 30,6740           41450                           CS       K1ROLL                                #  THE CURRENT NEAREST ZERO POINT ON 16 SPD
016911,000419: 30,6741           60700                           AD       THETAD                                #  DELTA FROM ZERO POINT.
016912,000420: 30,6742           60116                           AD       MPAC       +1                         #  MINUS NEW COMMAND
016913,000421:                                                                                                  #    A = DELTHETAD -DELNEWCOMMAND
016914,000422: 30,6743           64504                           AD       BIT11                                 #  PLUS 1/16 TH.  (180 DEG SCALED.)
016915,000423: 30,6744           10000                           CCS      A                                     #  IF NEG, CHANGE IS MORE THAN + 180 DEG.
016916,000424: 30,6745           06756                           TC       CHECKNEG                              #  OK, CHECK OTHER WAY.
016917,000425: 30,6746           74000        NEG1/8+1           OCT      74000                                 
016918,000426: 30,6747           44503                           CS       BIT12                                 #  CHANGE TOO BIG, MOVE TO NEXT LOWER 0-PT.
016919,000427: 30,6750           61450        NEWBIAS            AD       K1ROLL                                #  (NEG ZERO OF CCS COMES HERE ALSO, SO..)
016920,000428: 30,6751           51450                           TS       K1ROLL                                
016921,000429: 30,6752           06763                           TC       GETNUOGC                              #  SKIPPING ON OVERFLOW.
016922,000430: 
016923,000431: 30,6753           20000                           INDEX    A                                     
016924,000432: 30,6754           44477                           CS       LIMITS                                
016925,000433: 30,6755           06751                           TC       NEWBIAS    +1                         #  AND SET PROPER LIMIT VALUE.
016926,000434: 
016927,000435: 30,6756           66746        CHECKNEG           AD       NEG1/8+1                              
016928,000436: 30,6757           10000                           CCS      A                                     #  CHECK OTHER SIDE.
016929,000437: 30,6760           34503                           CAF      BIT12                                 #  ADD 108 TH TO K1ROLL.
016930,000438: 30,6761           06750                           TC       NEWBIAS                               #  (+ 0 IMPOSSIBLE.)
016931,000439: 30,6762           06763                           TC       +1                                    #  NO NEED TO CHANGE BIAS.
016932,000440: 
016933,000441: 30,6763           40116        GETNUOGC           CS       MPAC       +1                         #  NEW DELTA.
016934,000442: 30,6764           51372                           TS       K2ROLL                                
016935,000443: 30,6765           61450                           AD       K1ROLL                                #  AS MODIFIES IF IT WAS NEC. 
016936,000444: 30,6766           50115                           TS       MPAC                                  
016937,000445: 30,6767           06773                           TC       +4                                    #  DETECT OVERFLOW.
016938,000446: 
016939,000447: 30,6770           20000                           INDEX    A                                     
016940,000448: 30,6771           34477                           CAF      LIMITS                                #  GO TO POSMAX FROM NEGMAX. (AND VICEVERSA
016941,000449: 30,6772           60115                           AD       MPAC                                  #  AND GET NEW ANGLE.
016942,000450: 
016943,000451: 30,6773           25777                           EXTEND                                         
016944,000452: 30,6774           44501                           MP       BIT14                                 #  RESCALE TO REVS.
016945,000453: 30,6775           51520                           TS       OGC                                   
016946,000454: 30,6776           04703                           TC       RE-ENTER                              #  TO NEXT EQUATION WITHOUT PUSHING DOWN.
016947,000455: 
016948,000456: 
016949,000457: 
016950,000458: 30,6777           74000        HI4                OCT      74000                                 

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