Source Code

011357,000002: ## Copyright: Public domain. 011358,000003: ## Filename: INTER-BANK_COMMUNICATION.agc 011359,000004: ## Purpose: Part of the source code for Solarium build 55. This 011360,000005: ## is for the Command Module's (CM) Apollo Guidance 011361,000006: ## Computer (AGC), for Apollo 6. 011362,000007: ## Assembler: yaYUL --block1 011363,000008: ## Contact: Jim Lawton <jim DOT lawton AT gmail DOT com> 011364,000009: ## Website: www.ibiblio.org/apollo/index.html 011365,000010: ## Page Scans: www.ibiblio.org/apollo/ScansForConversion/Solarium055/ 011366,000011: ## Mod history: 2009-09-15 JL Created. 011367,000012: ## 2016-08-19 RSB Typos. 011368,000013: ## 2016-12-28 RSB Proofed comment text using octopus/ProoferComments, 011369,000014: ## but no errors found. 011370,000015:

Page 290

011372,000017: 
011373,000018:                                                                                                  #        THE FOLLOWING SUBROUTINES ARE INTENDED TO FACILITATE INTER-BANK COMMUNICATION. ROUTINES ARE PROVIDED
011374,000019:                                                                                                  #  FOR JUMPING TO A LOCATION IN ANOTHER BANK, CALLING A SUBROUTINE IN ANOTHER BANK, AND OBTAINING DATA FROM ANOTHER
011375,000020:                                                                                                  #  BANK. IN ADDITION, A ROUTINE IS PROVIDED FOR MAKING UP A RETURN_ADDRESS CADR FOR USE BY THE CALLED SUBROUTINE.
011376,000021: 
011377,000022:    5654                                           BANK     2                                     
011378,000023:    5654           50062        BANKCALL           TS       ADDRWD                                #  SUBROUTINE CALL WITH TRANSMISSION BOTH
011379,000024:    5655           30001                           XCH      Q                                     #  WAYS IN A. THE CADR OF THE CALLED
011380,000025:    5656           64516                           AD       ONE                                   #  ROUTINE SHOULD IMMEDIATELY FOLLOW THE
011381,000026:    5657           50001                           TS       Q                                     #  TC BANKCALL.
011382,000027:    5660           20000                           INDEX    A                                     
011383,000028:    5661           27777                           CAF      0          -1                         #  PICK UP CADR AND FALL INTO SWCALL.
011384,000029: 
011385,000030:    5662           50071        SWCALL             TS       TEMQS                                 #  SWCALL IS ALOS USED TO CALL SUBROUTINES
011386,000031:    5663           30015                           XCH      BANKREG                               #  IN OTHER BANKS, BUT THE CADR ARRIVES IN
011387,000032:    5664           50072                           TS       BANKTEM                               #  A. DATA MAY BE TRANSMITTED BACK TO THE
011388,000033:    5665           30001                           XCH      Q                                     #  CALLING PROGRAM IN A, HOWEVER. 
011389,000034:    5666           30071                           XCH      TEMQS                                 #  RETURN INFORMATION NOW COMPLETE.
011390,000035:    5667           50114                           TS       ESCAPE                                
011391,000036:    5670           72667                           MASK     70K                                   #  PROVISION FOR CALLING A ROUTINE IN
011392,000037:    5671           10000                           CCS      A                                     #  FIXED-FIXED (OF QUESTIONABLE VALUE).
011393,000038:    5672           05674                           TC       +2                                    #  SPECIAL TREATMENT REQUIRED IF NON-ZERO.
011394,000039:    5673           05676                           TC       +3                                    #  INPUT CADR OK AS IS.
011395,000040: 
011396,000041:    5674           40015                           CS       BANKREG                               #  FORM PROPER 12 BIT ADDRESS.
011397,000042:    5675           64373                           AD       6K                                    
011398,000043:    5676           60114                 +3        AD       ESCAPE                                #  PROPER CADRS COME HERE WITH C(A) = 0.
011399,000044:    5677           30062                           XCH      ADDRWD                                #  SO A CAN TRANSMIT WITH BANKCALL.
011400,000045:    5700           20062                           INDEX    ADDRWD                                
011401,000046:    5701           00000                           TC       0                                     #  SETTING Q TO SWRETURN.
011402,000047: 
011403,000048:    5702           30072        SWRETURN           XCH      BANKTEM                               #  RETURN TO CALLER, TRANSMITTING THROUGH A
011404,000049:    5703           50015                           TS       BANKREG                               
011405,000050:    5704           30072                           XCH      BANKTEM                               #  RESTORE A AS UPON ARRIVAL TO SWRETURN.
011406,000051:    5705           00071                           TC       TEMQS                                 #  RETURN.
011407,000052: 

Page 291

011409,000054: 
011410,000055:    5706           35501        MAKECADR           CAF      ZERO                                  #  LEAVES RETURN-ADDRESS CADR (AS SET BY
011411,000056:    5707           60071                           AD       TEMQS                                 #  SWCALL OR BANKCALL) IN ADDRWD.
011412,000057:    5710           50062                           TS       ADDRWD                                
011413,000058:    5711           62165                           AD       32K                                   #  SEE IF BANK INFORMATION NEEDED (USUAL).
011414,000059:    5712           50034                           TS       OVCTR                                 
011415,000060:    5713           00001                           TC       Q                                     #  ADDRWD SET OK IF NO OVERFLOW (IN FF).
011416,000061: 
011417,000062:    5714           30034                           XCH      OVCTR                                 #  CONTAINS LOW 10 BITS ONLY.
011418,000063:    5715           60072                           AD       BANKTEM                               
011419,000064:    5716           50062                           TS       ADDRWD                                #  RETURN CADR NOW COMPLETE.
011420,000065:    5717           00001                           TC       Q                                     
011421,000066: 
011422,000067:    5720     2165               32K                EQUALS   PRIO32                                
011423,000068:    5720           30001        POSTJUMP           XCH      Q                                     #  ONE-WAY BANK TO BANK JUMP, WITH NO
011424,000069:    5721           20000                           INDEX    A                                     #  RETURN ADDRESS. THIS VERSION TRANSMITS
011425,000070:    5722           30000                           CAF      0                                     #  THROUGH A IF DESIRED.
011426,000071: 
011427,000072:    5723           50015        BANKJUMP           TS       BANKREG                               #  SAME AS ABOVE ONLY ADDRESS ARRIVES IN A.
011428,000073:    5724           74606                           MASK     LOW10                                 #  BANKJUMP AND POSTJUMP MAY BE USED IN
011429,000074:    5725           30001                           XCH      Q                                     #  INTERRUPT OR UNDER EXEC, BUT BANKCALL
011430,000075:    5726           20001                           INDEX    Q                                     #  AND SWCALL MAY BE USED ONLY UNDER EXEC.
011431,000076:    5727           06000                           TC       6000                                  
011432,000077: 
011433,000078: 
011434,000079:    5730           50114        DATACALL           TS       ESCAPE                                #  SUBROUTINE TO RETRIEVE DATA IN ANOTHER
011435,000080:    5731           30015                           XCH      BANKREG                               #  BANK. THE CADR OF THE LOCATION OF INTER-
011436,000081:    5732           30114                           XCH      ESCAPE                                #  EST ARRIVES IN A AND ITS CONTENTS ARE IN
011437,000082:    5733           74606                           MASK     LOW10                                 #  A ON EXIT. THIS MAY BE USED ONLY UNDER
011438,000083:    5734           20000                           INDEX    A                                     #  EXECUTIVE.
011439,000084:    5735           36000                           CAF      6000                                  #  REQUESTED DATA NOW ACQUIRED.
011440,000085: 
011441,000086:    5736           30114                           XCH      ESCAPE                                
011442,000087:    5737           50015                           TS       BANKREG                               
011443,000088:    5740           30114                           XCH      ESCAPE                                
011444,000089:    5741           00001                           TC       Q                                     
011445,000090: 

Page 292

011447,000092: 
011448,000093:                                                                                                  #        THE FOLLOWING ROUTINES ARE INTERRUPT ANALOGS OF BANKCALL AND SWCALL. BANK-TO-BANK ONLY.
011449,000094: 
011450,000095:    5742           50637        IBNKCALL           TS       RUPTREG1                              
011451,000096:    5743           30001                           XCH      Q                                     
011452,000097:    5744           64516                           AD       ONE                                   
011453,000098:    5745           50001                           TS       Q                                     
011454,000099:    5746           20000                           INDEX    A                                     
011455,000100:    5747           27777                           CAF      0          -1                         
011456,000101: 
011457,000102:    5750           50641        ISWCALL            TS       RUPTREG3                              
011458,000103:    5751           30015                           XCH      BANKREG                               
011459,000104:    5752           50640                           TS       RUPTREG2                              
011460,000105:    5753           30001                           XCH      Q                                     
011461,000106:    5754           30641                           XCH      RUPTREG3                              
011462,000107:    5755           74606                           MASK     LOW10                                 
011463,000108:    5756           30637                           XCH      RUPTREG1                              
011464,000109:    5757           20637                           INDEX    RUPTREG1                              
011465,000110:    5760           06000                           TC       6000                                  
011466,000111: 
011467,000112:    5761           30640        ISWRETRN           XCH      RUPTREG2                              
011468,000113:    5762           50015                           TS       BANKREG                               
011469,000114:    5763           30640                           XCH      RUPTREG2                              
011470,000115:    5764           00641                           TC       RUPTREG3                              

End of include-file INTER-BANK_COMMUNICATION.agc.  Parent file is MAIN.agc