Source Code

014515,000002: ## Copyright: Public domain. 014516,000003: ## Filename: RTB_OP_CODES.agc 014517,000004: ## Purpose: Part of the source code for Solarium build 55. This 014518,000005: ## is for the Command Module's (CM) Apollo Guidance 014519,000006: ## Computer (AGC), for Apollo 6. 014520,000007: ## Assembler: yaYUL --block1 014521,000008: ## Contact: Jim Lawton <jim DOT lawton AT gmail DOT com> 014522,000009: ## Website: www.ibiblio.org/apollo/index.html 014523,000010: ## Page Scans: www.ibiblio.org/apollo/ScansForConversion/Solarium055/ 014524,000011: ## Mod history: 2009-09-29 JL Adapted from corresponding Artemis072 file. 014525,000012: ## 2016-12-28 RSB Proofed comment text using octopus/ProoferComments, 014526,000013: ## and fixed errors found. 014527,000014:

Page 374

014529,000016: 
014530,000017: 30,6252                                           BANK     30                                    
014531,000018:                                                                                                  #  ROUTINE TO LOAD TIME OF DAY INTO MPAC
014532,000019: 
014533,000020: 30,6252           02676        LOADTIME           TC       READTIME                              
014534,000021: 30,6253           40572                           CS       RUPTSTOR                              
014535,000022: 30,6254           50115                           TS       MPAC                                  
014536,000023: 30,6255           40573                           CS       RUPTSTOR   +1                         
014537,000024: 30,6256           50116                           TS       MPAC       +1                         
014538,000025: 30,6257           20016                           RELINT                                         
014539,000026: 30,6260           35501                           CAF      ZERO                                  
014540,000027: 30,6261           50066                           TS       NEWEQIND                              
014541,000028: 30,6262           50117                           TS       MPAC       +2                         
014542,000029: 30,6263           05237                           TC       DPEXIT                                
014543,000030: 

Page 375

014545,000032: 
014546,000033:                                                                                                  #  ROUTINE TO RESET THE PUSHDOWN POUNTER
014547,000034: 
014548,000035: 30,6264           40067        FRESHPD            CS       FIXLOC                                
014549,000036: 30,6265           40000                           COM                                            
014550,000037: 30,6266           50123                           TS       PUSHLOC                               
014551,000038: 30,6267           04703                           TC       RE-ENTER                              
014552,000039: 

Page 376

014554,000041: 
014555,000042:                                                                                                  #  ROUTINE TO ZERO OUT THE FIRST 38 LOCS OF A VAC AREA
014556,000043: 
014557,000044: 30,6270           36302        ZEROVAC            CAF      37DEC                                 
014558,000045: 30,6271           50102        ZVLOOP             TS       TEM2                                  
014559,000046: 30,6272           60067                           AD       FIXLOC                                
014560,000047: 30,6273           50001                           TS       Q                                     
014561,000048: 30,6274           35501                           CAF      ZERO                                  
014562,000049: 30,6275           20001                           INDEX    Q                                     
014563,000050: 30,6276           50000                           TS       0                                     
014564,000051: 30,6277           10102                           CCS      TEM2                                  
014565,000052: 30,6300           06271                           TC       ZVLOOP                                
014566,000053: 30,6301           04703                           TC       RE-ENTER                              
014567,000054: 
014568,000055: 30,6302           00045        37DEC              DEC      37         B-14                       
014569,000056: 

Page 377

014571,000058: 
014572,000059:                                                                                                  #  ROUTINE TO CONVERT IS COMP. NOS. TO 1S COMP.
014573,000060: 
014574,000061: 30,6303           10115        CDULOGIC           CCS      MPAC                                  #  THIS BASIC ROUTINE TESTS CDU ANGLES FOR
014575,000062: 30,6304           06311                           TC       CDULOG1                               #  +OR-SIGN INCLUDING ZERO AND FORMS A DP
014576,000063: 30,6305           06311                           TC       CDULOG1                               #  NUMBER CORRESPONDING TO ANGLE
014577,000064: 30,6306           06307                           TC       +1                                    
014578,000065: 30,6307           44522                           CS       HALF                                  #  USE           SMOVE   1
014579,000066: 30,6310           06312                           TC       +2                                    #                RTB
014580,000067: 30,6311           45501        CDULOG1            CS       ZERO                                  #                        CDUXYZ
014581,000068: 30,6312           30034                           XCH      OVCTR                                 #                        CDULOGIC
014582,000069: 30,6313           30115                           XCH      MPAC                                  
014583,000070: 30,6314           25777                           EXTEND                                         
014584,000071: 30,6315           44522                           MP       HALF                                  
014585,000072: 30,6316           30034                           XCH      OVCTR                                 
014586,000073: 30,6317           60003                           AD       LP                                    
014587,000074: 30,6320           30116                           XCH      MPAC       +1                         
014588,000075: 30,6321           30034                           XCH      OVCTR                                 
014589,000076: 30,6322           30115                           XCH      MPAC                                  
014590,000077: 30,6323           05237                           TC       DPEXIT                                
014591,000078: 

Page 378

014593,000080: 
014594,000081:                                                                                                  #  ROUTINE TO CONVERT 1S COMP. NOS. TO 2S COMP.
014595,000082: 
014596,000083: 30,6324           35501        1STO2S             CAF      ZERO                                  
014597,000084: 30,6325           30116                           XCH      MPAC       +1                         
014598,000085: 30,6326           60000                           DOUBLE                                         
014599,000086: 30,6327           50034                           TS       OVCTR                                 
014600,000087: 30,6330           35501                           CAF      ZERO                                  
014601,000088: 30,6331           60115                           AD       MPAC                                  
014602,000089: 30,6332           60115                           AD       MPAC                                  
014603,000090: 30,6333           10000                           CCS      A                                     
014604,000091: 30,6334           64516                           AD       ONE                                   
014605,000092: 30,6335           06337                           TC       +2                                    
014606,000093: 30,6336           40000                           COM                                            
014607,000094: 30,6337           50115        ZYXR               TS       MPAC                                  #  AND MAYBE OVERFLOW.
014608,000095: 30,6340           05237                           TC       DPEXIT                                
014609,000096: 
014610,000097: 30,6341           20000                           INDEX    A                                     #  HANDLE OVERFLOW IN STANDARD ANGULAR WAY.
014611,000098: 30,6342           34477                           CAF      LIMITS                                
014612,000099: 30,6343           60115                           AD       MPAC                                  #  GUARANTEED NO OVERFLOW.
014613,000100: 30,6344           06337                           TC       ZYXR                                  
014614,000101: 

Page 379

014616,000103: 
014617,000104: 30,6345           20017        READPIPS           INHINT                                         
014618,000105: 30,6346           40044                           CS       PIPAX                                 
014619,000106: 30,6347           40000                           CS       A                                     
014620,000107: 30,6350           20067                           INDEX    FIXLOC                                
014621,000108: 30,6351           50040                           TS       VAC                                   
014622,000109: 30,6352           40045                           CS       PIPAY                                 
014623,000110: 30,6353           40000                           CS       A                                     
014624,000111: 30,6354           20067                           INDEX    FIXLOC                                
014625,000112: 30,6355           50042                           TS       VAC        +2                         
014626,000113: 30,6356           40046                           CS       PIPAZ                                 
014627,000114: 30,6357           40000                           CS       A                                     
014628,000115: 30,6360           20067                           INDEX    FIXLOC                                
014629,000116: 30,6361           50044                           TS       VAC        +4                         
014630,000117: 30,6362           20016                           RELINT                                         
014631,000118: 30,6363           35501                           CAF      ZERO                                  
014632,000119: 30,6364           20067                           INDEX    FIXLOC                                
014633,000120: 30,6365           50041                           TS       VAC        +1                         
014634,000121: 30,6366           20067                           INDEX    FIXLOC                                
014635,000122: 30,6367           50043                           TS       VAC        +3                         
014636,000123: 30,6370           20067                           INDEX    FIXLOC                                
014637,000124: 30,6371           50045                           TS       VAC        +5                         
014638,000125: 30,6372           50066                           TS       NEWEQIND                              #  LOAD INDICATOR OFF.
014639,000126: 30,6373           45501        VMODE              CS       ZERO                                  
014640,000127: 30,6374           05240                           TC       DPEXIT     +1                         
014641,000128: 
014642,000129: 
014643,000130: 
014644,000131: 30,6375           20067        PULSEIMU           INDEX    FIXLOC                                #  ADDRESS OF GYRO COMMANDS SHOULD BE IN X1
014645,000132: 30,6376           40046                           CS       X1                                    
014646,000133: 30,6377           40000                           COM                                            
014647,000134: 30,6400           05654                           TC       BANKCALL                              
014648,000135: 30,6401           31433                           CADR     GYRODPNT                              
014649,000136: 
014650,000137: 30,6402           04703                           TC       RE-ENTER                              
014651,000138: 

Page 380

014653,000140: 
014654,000141: 30,6403           05654        SGNAGREE           TC       BANKCALL                              
014655,000142: 30,6404           07154                           CADR     TPAGREE                               
014656,000143: 30,6405           05237                           TC       DPEXIT                                
014657,000144: 
014658,000145: 
014659,000146: 
014660,000147:                                                                                                  #  ROUTINE TO COMPLETE OPTICS TRUNNION ANGLE CONVERSION FROM COUNTER
014661,000148:                                                                                                  #  READING TO DP REVOLUTIONS. CALLS TO TRUNLOG SHOULD BE IMMEDIATELY
014662,000149:                                                                                                  #  PRECEDED BY A CALL TO CDULOGIC.  (NO NEED TO CHECK SXT POWER-ON BIT.)
014663,000150: 30,6406           36414        TRUNLOG            CAF      10DEGS                                #  CORRECT FOR 20 DEG OFFSET (CDULOGIC
014664,000151: 30,6407           60115                           AD       MPAC                                  #   ALREADY SHIFTED IT RIGHT ONE) AND SHIFT
014665,000152: 30,6410           50115                           TS       MPAC                                  #   RIGHT TWO ADDITIONAL PLACES.
014666,000153: 30,6411           34502                           CAF      QUARTER                               
014667,000154: 30,6412           05416                           TC       SHORTMP                               
014668,000155: 30,6413           04024                           TC       DANZIG                                #  WITH PD IF AT END W/ NO ADDRESSES.
014669,000156: 
014670,000157: 30,6414           07020        10DEGS             DEC      3600       B-14                       #  HALF OF SXT TRUNION OFFSET
014671,000158: 

Page 381

014673,000160: 
014674,000161: 30,6415           36435        INCRCDUS           CAF      LOCTHETA                              
014675,000162: 30,6416           50077                           TS       BUF                                   
014676,000163: 30,6417           35503                           CAF      TWO                                   
014677,000164: 30,6420           50100        INCRCDU2           TS       BUF        +1                         
014678,000165: 30,6421           60000                           DOUBLE                                         
014679,000166: 30,6422           60070                           AD       VACLOC                                
014680,000167: 30,6423           20000                           INDEX    A                                     
014681,000168: 30,6424           40000                           CS       0                                     
014682,000169: 30,6425           40000                           COM                                            
014683,000170: 30,6426           05654                           TC       BANKCALL                              
014684,000171: 30,6427           30361                           CADR     CDUINC                                
014685,000172: 
014686,000173: 30,6430           10077                           CCS      BUF                                   
014687,000174: 30,6431           50077                           TS       BUF                                   
014688,000175: 30,6432           10100                           CCS      BUF        +1                         
014689,000176: 30,6433           06420                           TC       INCRCDU2                              
014690,000177: 30,6434           06373                           TC       VMODE                                 
014691,000178: 
014692,000179: 30,6435           00702        LOCTHETA           ADRES    THETAD     +2                         
014693,000180: 

Page 382

014695,000182: 
014696,000183:                                                                                                  #        LOG FUNCTION SUBROUTINE
014697,000184: 
014698,000185:                                                                                                  #    INPUT... X  (IN IMPAC)
014699,000186:                                                                                                  #   OUTPUT... -LN(X)/32          ( IN MPAC.  SCALED BY 32TO FIT LOG OF 2EXP-28.
014700,000187: 
014701,000188: 30,6436           06563        LOG                TC       SWAPLOC                               #   CALLED BY    RTB     LOG
014702,000189: 30,6437           04000                           TC       INTPRET                               
014703,000190: 
014704,000191: 30,6440           47574                           NOLOD    2                                     #  GENERATES LOG BY SHIFTING ARG UNTIL
014705,000192: 30,6441           57726                           TSLC     BDSU                                  #  IT LIES BETWEEN .5 AND1.  THE LOG OF
014706,000193: 30,6442           77576                           EXIT                                           #  THIS PART IS FOUND AND THE LOG OF THE
014707,000194:                                                                                                  #  SHIFTED PART IS COMPUTED AND ADDED IN.
014708,000195: 30,6443           00040                                    31D                                   #  SHIFT COUNT STORED IN LOC 31 OF VAC AREA
014709,000196: 30,6444           21043                                    NEARONE                               
014710,000197: 
014711,000198: 30,6445           05554                           TC       POLY                                  #  GETS LOG OF PRINCIPLE PART.
014712,000199: 30,6446           00006                           DEC      6          B-14                       
014713,000200: 30,6447           00000 00000                     2DEC     0          B-28                       
014714,000201: 30,6451           01001 14636                     2DEC     .031335467                            
014715,000202: 30,6453           00325 07310                     2DEC     .0130145859                            
014716,000203: 30,6455           00541 16735                     2DEC     .0215738898                            
014717,000204: 30,6457           35501                           CAF      ZERO                                  
014718,000205: 30,6460           50117                           TS       MPAC       +2                         
014719,000206: 30,6461           36502                           CAF      CLOG1/2    +1                         
014720,000207: 30,6462           30116                           XCH      MPAC       +1                         
014721,000208: 30,6463           50100                           TS       LOGTEM     +1                         
014722,000209: 30,6464           36501                           CAF      CLOG1/2                               
014723,000210: 30,6465           30115                           XCH      MPAC                                  
014724,000211: 30,6466           30077                           XCH      LOGTEM                                
014725,000212: 30,6467           20067                           INDEX    FIXLOC                                
014726,000213: 30,6470           40037                           CS       31D                                   #  LOAD POSITIVE SHIFT COUNT IN A.
014727,000214: 30,6471           05422                           TC       SHORTMP2                              #  MULTIPLY BY SHIFT COUNT.
014728,000215: 
014729,000216: 30,6472           30117                           XCH      MPAC       +2                         
014730,000217: 30,6473           30116                           XCH      MPAC       +1                         
014731,000218: 30,6474           30115                           XCH      MPAC                                  #  RESULT WAS IN MPAC +1 AND MPAC +2.
014732,000219: 30,6475           05171                           TC       DAD                                   #  ADD IN PREVIOUS RESULT. LEFT IN LOGTEM.
014733,000220: 30,6476           00077                           ADRES    LOGTEM                                
014734,000221: 30,6477           06563                           TC       SWAPLOC                               
014735,000222: 30,6500           05237                           TC       DPEXIT                                
014736,000223: 
014737,000224: 30,6501           00542 34414  CLOG1/2            2DEC     .0216608494                            
014738,000225: 

Page 383

014740,000227: 
014741,000228:                                                                                                  #        SUBROUTINE TO COMPUTE THE ARCTAN OF THE RATIO OF TWO FUNCTIONS.
014742,000229: 
014743,000230:                                                                                                  #        CALLED AS THOUGH A BASIC SUBR...        RTB     ARCTAN
014744,000231: 
014745,000232: 30,6503           06563        ARCTAN             TC       SWAPLOC                               #  ARCTAN COMPUTES ARCTAN(VACZ/VACX)
014746,000233: 30,6504           04000                           TC       INTPRET                               #                         ---------
014747,000234: 30,6505           51176        INATAN             DSQ      0                                     #  RESULT HAS VALUE BETWEEN + AND - 1/2
014748,000235: 30,6506           00045                                    VACZ                                  #  (180 DEG. SCALED) IS LEFT IN MPAC.
014749,000236: 
014750,000237: 30,6507           51172                           DSQ      4                                     
014751,000238: 30,6510           70746                           DAD      BOV                                   
014752,000239: 30,6511           47653                           BZE      SQRT                                  
014753,000240: 30,6512           61746                           BDDV     BOV                                   
014754,000241: 30,6513           56713                           TSRT     ASIN                                  
014755,000242: 30,6514           00041                                    VACX                                  
014756,000243: 30,6515           77777                                    -                                     
014757,000244: 30,6516           20547                                    2BIG                                  
014758,000245: 30,6517           20553                                    ATAN0/0                               
014759,000246: 30,6520           00045                                    VACZ                                  
014760,000247: 30,6521           20557                                    ATAN=90                               
014761,000248: 30,6522           00002                                    1                                     #  AND PUSH IT DOWN
014762,000249: 
014763,000250: 30,6523           73774                           BMN      2                                     
014764,000251: 30,6524           41423                           LODON    DMOVE                                 
014765,000252: 30,6525           77576                           EXIT                                           
014766,000253: 30,6526           00041                                    VACX                                  
014767,000254: 30,6527           20534                                    NEGVX                                 
014768,000255: 30,6530           77777                                    -                                     #  (INACTIVE NEEDED FOR PUSH-UP).
014769,000256: 
014770,000257: 30,6531           06563        ATANDUN            TC       SWAPLOC                               
014771,000258: 30,6532           05237                           TC       DPEXIT                                
014772,000259: 
014773,000260: 
014774,000261: 
014775,000262: 30,6533           47174        NEGVX              COMP     2                                     #  IF VACX NEGATIVE, CHNAGE RESULT.
014776,000263: 30,6534           43742                           BPL      DAD                                   
014777,000264: 30,6535           76576                           RTB                                            
014778,000265: 30,6536           77777                                    -                                     
014779,000266: 30,6537           20543                                    NEGOUT                                
014780,000267: 30,6540           21174                                    HALVE                                 
014781,000268: 30,6541           20532                                    ATANDUN                               
014782,000269: 30,6542           47575        NEGOUT             NOLOD    1                                     
014783,000270: 30,6543           66771                           DSU      RTB                                   
014784,000271: 30,6544           21174                                    HALVE                                 
014785,000272: 30,6545           20532                                    ATANDUN                               
014786,000273: 
014787,000274: 30,6546           47575        2BIG               NOLOD    1                                     
014788,000275: 30,6547           45772                           VSRT     ITC                                   
014789,000276: 30,6550           00002                                    1                                     
014790,000277: 30,6551           20506                                    INATAN                                

Page 384

014792,000279: 
014793,000280: 30,6552           45175        ATAN0/0            DMOVE    1                                     
014794,000281: 30,6553           76576                           RTB                                            
014795,000282: 30,6554           21057                                    3ZEROS                                #  WHAT SHOULD ARCTAN(0/0) =
014796,000283: 30,6555           20532                                    ATANDUN                               
014797,000284: 
014798,000285: 30,6556           53775        ATAN=90            SIGN     1                                     
014799,000286: 30,6557           76576                           RTB                                            
014800,000287: 30,6560           21055                                    FOURTH                                
014801,000288: 30,6561           00045                                    VACZ                                  
014802,000289: 30,6562           20532                                    ATANDUN                               
014803,000290: 

Page 385

014805,000292: 
014806,000293:                                                                                                  #        BASIC SUBROUTINE TO SAVE INTERPRETER REGISTERS  (SAME BANK AS RTBS).
014807,000294: 
014808,000295: 30,6563           30120        SWAPLOC            XCH      LOC                                   #  SUBROUTINE TO SWAP LOC, ADRLOC, AND
014809,000296: 30,6564           20067                           INDEX    FIXLOC                                #  ORDER REGISTERS WITH LOCATIONS 28,
014810,000297: 30,6565           30034                           XCH      28D                                   #  29, AND 30 IN TEMP AREA.
014811,000298: 30,6566           50120                           TS       LOC                                   
014812,000299: 30,6567           30121                           XCH      ADRLOC                                #  USEFUL FOR USING INTERPRETER IN SUBROUT
014813,000300: 30,6570           20067                           INDEX    FIXLOC                                #  AND THEN ABLE TO CONTINUE IN MIDDLE OF
014814,000301: 30,6571           30035                           XCH      29D                                   #  CURRENT EQUATIONS.
014815,000302: 30,6572           50121                           TS       ADRLOC                                #  USE...        TC      SWAPLOC
014816,000303: 30,6573           40061                           CS       BANKSET                               #  PACK INTERPRETIVE BANK AND ORDER IN 30D.
014817,000304: 30,6574           60063                           AD       ORDER                                 
014818,000305: 30,6575           20067                           INDEX    FIXLOC                                #                .........
014819,000306: 30,6576           30036                           XCH      30D                                   #                TC   SWAPLOC
014820,000307: 30,6577           50063                           TS       ORDER                                 #                TC   DANZIG
014821,000308: 30,6600           74720                           MASK     LOW7                                  
014822,000309: 30,6601           30063                           XCH      ORDER                                 
014823,000310: 30,6602           72261                           MASK     BANKMASK                              
014824,000311: 30,6603           40000                           COM                                            
014825,000312: 30,6604           50061                           TS       BANKSET                               
014826,000313: 30,6605           00001                           TC       Q                                     
014827,000314: 

Page 386

014829,000316: 
014830,000317:                                                                                                  #        SUBROUTINE TO SET MPACS TO POS OR NEG MAX DEPENDING ON SIGN MPAC
014831,000318: 30,6606           10115        SIGNMPAC           CCS      MPAC                                  
014832,000319: 30,6607           06621                           TC       SETPOS                                
014833,000320: 30,6610           06621                           TC       SETPOS                                
014834,000321: 30,6611           06612                           TC       +1                                    
014835,000322: 30,6612           34500                           CAF      NEGSIGN                               
014836,000323: 30,6613           50115                           TS       MPAC                                  
014837,000324: 30,6614           50116                           TS       MPAC       +1                         
014838,000325: 30,6615           50117                           TS       MPAC       +2                         
014839,000326: 30,6616           35501                           CAF      ZERO                                  
014840,000327: 30,6617           50066                           TS       NEWEQIND                              
014841,000328: 30,6620           05237                           TC       DPEXIT                                
014842,000329: 
014843,000330: 30,6621           34476        SETPOS             CAF      POSMAX                                
014844,000331: 30,6622           06613                           TC       -7                                    
014845,000332: 

Page 387

014847,000334: 
014848,000335: 30,6623           35503        V1STO2S            CAF      TWO                                   #  THIS ROUTINE TAKES GIMBAL ANGLES SCALED
014849,000336: 30,6624           50071                           TS       VBUF                                  #  2PI IN THE VAC AND LEAVES 2S COMPLIMENT
014850,000337: 30,6625           60000                           DOUBLE                                         #  ANSWERS IN MPAC.....MPAC +2
014851,000338: 30,6626           60070                           AD       VACLOC                                #  BASE ADDRESS OF VECTOR ACCUMULATOR
014852,000339: 30,6627           50072                           TS       VBUF       +1                         
014853,000340: 30,6630           20072                           INDEX    VBUF       +1                         
014854,000341: 30,6631           40001                           CS       Q                                     
014855,000342: 30,6632           40000                           COM                                            
014856,000343: 30,6633           60000                           DOUBLE                                         
014857,000344: 30,6634           50034                           TS       OVCTR                                 #  SKIPS ON OVERFLOW
014858,000345: 30,6635           35501                           CAF      ZERO                                  
014859,000346: 30,6636           20072                           INDEX    VBUF       +1                         
014860,000347: 30,6637           60000                           AD       A                                     
014861,000348: 30,6640           20072                           INDEX    VBUF       +1                         
014862,000349: 30,6641           60000                           AD       A                                     
014863,000350: 30,6642           10000                           CCS      A                                     #  TEZT FOR NEGATIVE MAJOR PART
014864,000351: 30,6643           64516                           AD       ONE                                   
014865,000352: 30,6644           06646                           TC       +2                                    
014866,000353: 30,6645           40000                           COM                                            
014867,000354: 30,6646           20071        ZYXW               INDEX    VBUF                                  
014868,000355: 30,6647           50115                           TS       MPAC                                  
014869,000356: 30,6650           06656                           TC       ZYXWV                                 
014870,000357: 30,6651           20000                           INDEX    A                                     
014871,000358: 30,6652           34477                           CAF      LIMITS                                #  NORMAL PROCEDURE FOR ANGLE OVERFLOW
014872,000359: 30,6653           20071                           INDEX    VBUF                                  
014873,000360: 30,6654           60115                           AD       MPAC                                  
014874,000361: 30,6655           06646                           TC       ZYXW                                  
014875,000362: 
014876,000363: 30,6656           10071        ZYXWV              CCS      VBUF                                  
014877,000364: 30,6657           06624                           TC       V1STO2S    +1                         
014878,000365: 30,6660           50066                           TS       NEWEQIND                              
014879,000366: 30,6661           45503                           CS       TWO                                   
014880,000367: 30,6662           05240                           TC       DPEXIT     +1                         
014881,000368: 30,6663           35503        V2STOD1S           CAF      TWO                                   #  THIS ROUTINE TAKES CDU ANGLES IN MPAC...
014882,000369: 30,6664           50071                           TS       VBUF                                  #  MPAC +2 AND CONVERTS TO ANGLES SCALED
014883,000370: 30,6665           60000                           DOUBLE                                         #  2PI IN THE VAC LOCATIONS
014884,000371: 30,6666           60070                           AD       VACLOC                                
014885,000372: 30,6667           50072                           TS       VBUF       +1                         
014886,000373: 
014887,000374: 
014888,000375: 
014889,000376: 30,6670           20071                           INDEX    VBUF                                  
014890,000377: 30,6671           40115                           CS       MPAC                                  
014891,000378: 30,6672           25777                           EXTEND                                         
014892,000379: 30,6673           44520                           MP       NEG1/2                                
014893,000380: 30,6674           50073                           TS       VBUF       +2                         #  UNCORRECTED UPPER PARTS
014894,000381: 30,6675           10003                           CCS      LP                                    #  TEST SIGN OF LOWER WORD
014895,000382: 30,6676           35501                           CAF      ZERO                                  
014896,000383: 30,6677           06702                           TC       +3                                    #  POSITIVE CASE OK
014897,000384: 30,6700           06701                           TC       +1                                    

Page 388

014899,000386: 30,6701           44522                           CS       HALF                                  #  NEGATIVE CASE
014900,000387: 30,6702           60003                           AD       LP                                    #  CORRECT LOWER WORD
014901,000388: 30,6703           20072                           INDEX    VBUF       +1                         
014902,000389: 30,6704           50001                           TS       Q                                     #  STORE LOWER WORD
014903,000390: 30,6705           35501                           CAF      ZERO                                  #  DEAL WITH OVERFLOW STANDARD WAY
014904,000391: 30,6706           60073                           AD       VBUF       +2                         
014905,000392: 30,6707           20072                           INDEX    VBUF       +1                         
014906,000393: 30,6710           50000                           TS       A                                     #  STORE UPPER WORD
014907,000394: 
014908,000395: 30,6711           10071                           CCS      VBUF                                  
014909,000396: 30,6712           06664                           TC       V2STOD1S   +1                         
014910,000397: 
014911,000398: 30,6713           45501                           CS       ZERO                                  
014912,000399: 30,6714           50065                           TS       MODE                                  
014913,000400: 30,6715           04024                           TC       DANZIG                                
014914,000401: 

Page 389

014916,000403: 
014917,000404:                                                                                                  #  ROUTINE TO FREE DSKY
014918,000405: 
014919,000406: 
014920,000407: 
014921,000408: 30,6716           03362        DSPFREE            TC       FREEDSP                               
014922,000409: 30,6717           04703                           TC       RE-ENTER                              
014923,000410: 

Page 390

014925,000412: 
014926,000413:                                                                                                  #        FINAGLE TO GET OGC CORRECTED TO NEAREST POINT ON 16 SPEED.
014927,000414: 
014928,000415: 30,6720           41520        CDUXFIX            CS       OGC                                   #  INTERPRETIVE SCALING.   (REVS)
014929,000416: 30,6721           25777                           EXTEND                                         
014930,000417: 30,6722           44503                           MP       BIT12                                 #  MULTIPLY BY 1/8 TH.
014931,000418: 30,6723           50116                           TS       MPAC       +1                         #  SAVE RESULT.
014932,000419: 
014933,000420: 30,6724           34504                           CAF      BIT11                                 #  1/16 TH.
014934,000421: 30,6725           60700                           AD       THETAD                                #  TO FIND NEAREST ZERO POINT.
014935,000422: 30,6726           76771                           MASK     HI4                                   #  DROPS BACK TO LOWER (MORE NEG) 1/8TH.
014936,000423: 30,6727           51450                           TS       K1ROLL                                
014937,000424: 30,6730           06733                           TC       +3                                    #  SKIPS THIS IF ADDITION OVERFLEW.
014938,000425: 30,6731           34476                           CAF      POSMAX                                #  IN THAT CASE, USE POSMAX.
014939,000426: 30,6732           51450                           TS       K1ROLL                                
014940,000427: 
014941,000428: 30,6733           41450                           CS       K1ROLL                                #  THE CURRENT NEAREST ZERO POINT ON 16 SPD
014942,000429: 30,6734           60700                           AD       THETAD                                #  DELTA FROM ZERO POINT.
014943,000430: 30,6735           60116                           AD       MPAC       +1                         #  MINUS NEW COMMAND
014944,000431:                                                                                                  #    A = DELTHETAD -DELNEWCOMMAND
014945,000432: 30,6736           64504                           AD       BIT11                                 #  PLUS 1/16 TH.  (180 DEG SCALED.)
014946,000433: 30,6737           10000                           CCS      A                                     #  IF NEG, CHANGE IS MORE THAN + 180 DEG.
014947,000434: 30,6740           06751                           TC       CHECKNEG                              #  OK, CHECK OTHER WAY.
014948,000435: 30,6741           74000        NEG1/8+1           OCT      74000                                 
014949,000436: 30,6742           44503                           CS       BIT12                                 #  CHANGE TOO BIG, MOVE TO NEXT LOWER 0-PT.
014950,000437: 30,6743           61450        NEWBIAS            AD       K1ROLL                                #  (NEG ZERO OF CCS COMES HERE ALSO, SO..)
014951,000438: 30,6744           51450                           TS       K1ROLL                                
014952,000439: 30,6745           06756                           TC       GETNUOGC                              #  SKIPPING ON OVERFLOW.
014953,000440: 
014954,000441: 30,6746           20000                           INDEX    A                                     
014955,000442: 30,6747           44477                           CS       LIMITS                                
014956,000443: 30,6750           06744                           TC       NEWBIAS    +1                         #  AND SET PROPER LIMIT VALUE.
014957,000444: 
014958,000445: 30,6751           66741        CHECKNEG           AD       NEG1/8+1                              
014959,000446: 30,6752           10000                           CCS      A                                     #  CHECK OTHER SIDE.
014960,000447: 30,6753           34503                           CAF      BIT12                                 #  ADD 108 TH TO K1ROLL.
014961,000448: 30,6754           06743                           TC       NEWBIAS                               #  (+ 0 IMPOSSIBLE.)
014962,000449: 30,6755           06756                           TC       +1                                    #  NO NEED TO CHANGE BIAS.
014963,000450: 
014964,000451: 30,6756           40116        GETNUOGC           CS       MPAC       +1                         #  NEW DELTA.
014965,000452: 30,6757           61450                           AD       K1ROLL                                #  AS MODIFIES IF IT WAS NEC. 
014966,000453: 30,6760           50115                           TS       MPAC                                  
014967,000454: 30,6761           06765                           TC       +4                                    #  DETECT OVERFLOW.
014968,000455: 
014969,000456: 30,6762           20000                           INDEX    A                                     
014970,000457: 30,6763           34477                           CAF      LIMITS                                #  GO TO POSMAX FROM NEGMAX. (AND VICEVERSA
014971,000458: 30,6764           60115                           AD       MPAC                                  #  AND GET NEW ANGLE.
014972,000459: 
014973,000460: 30,6765           25777                           EXTEND                                         
014974,000461: 30,6766           44501                           MP       BIT14                                 #  RESCALE TO REVS.
014975,000462: 30,6767           51520                           TS       OGC                                   

Page 391

014977,000464: 30,6770           04703                           TC       RE-ENTER                              #  TO NEXT EQUATION WITHOUT PUSHING DOWN.
014978,000465: 
014979,000466: 
014980,000467: 
014981,000468: 30,6771           74000        HI4                OCT      74000                                 

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