Source Code

These source-code files were reconstructed by Mike Stewart from dumps of the RETREAD 50 program stored in physical AGC core-rope modules (B1 and B2) belonging to the Computer History Museum, Mountain View, California. The reconstruction was aided by pre-existing source code for the AGC programs RETREAD 44 and AURORA 12. Read about the process here. Assembling this source code with yaYUL produces core ropes identical to those of the physical modules. Page-number references refer to corresponding sections of RETREAD 44 source code. No printouts of RETREAD 50 program listings are available. New sections of the software (appearing in EXTENDED_VERBS_FOR_MODING.agc) have been disassembled; labels and comments have been either taken from similar code in later programs or, in cases where this was not possible, added by VirtualAGC for clarity.

003664,000002:                                                                                                  ## Copyright:   Public domain.
003665,000003:                                                                                                  ## Filename:    INTER-BANK_COMMUNICATION.agc
003666,000004:                                                                                                  ## Purpose:     Part of the source code for AGC program Retread 50. 
003667,000005:                                                                                                  ## Assembler:   yaYUL
003668,000006:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
003669,000007:                                                                                                  ## Website:     www.ibiblio.org/apollo/Restoration.html
003670,000008:                                                                                                  ## Mod history: 2019-06-12 MAS  Recreated from Computer History Museum's
003671,000009:                                                                                                  ##                              physical core-rope modules.
003672,000010: 

Page 105

003674,000012: 
003675,000013:                                                                                                  #           THE FOLLOWING ROUTINE CAN BE USED TO CALL A SUBROUTINE IN ANOTHER BANK. IN THE BANKCALL VERSION, THE
003676,000014:                                                                                                  #  CADR OF THE SUBROUTINE IMMEDIATELY FOLLOWS THE  TC BANKCALL  INSTRUCTION, WITH C(A) AND C(L) PRESERVED.
003677,000015: 
003678,000016:    4063                                           SETLOC   ENDINTFF                              
003679,000017: 
003680,000018:    4063           52120        BANKCALL           DXCH     BUF2                                  #  SAVE INCOMING A,L.
003681,000019:    4064           50002                           INDEX    Q                                     #  PICK UP CADR.
003682,000020:    4065           30000                           CA       0                                     
003683,000021:    4066           24002                           INCR     Q                                     #  SO WE RETURN TO THE LOC. AFTER THE CADR.
003684,000022: 
003685,000023:                                                                                                  #           SWCALL IS IDENTICAL TO BANKCALL, EXCEPT THAT THE CADR ARRIVES IN A.
003686,000024: 
003687,000025:    4067           54001        SWCALL             TS       L                                     
003688,000026:    4070           22004                           LXCH     FBANK                                 #  SWITCH BANKS, SAVING RETURN.
003689,000027:    4071           76425                           MASK     LOW10                                 #  GET SUB-ADDRESS OF CADR.
003690,000028:    4072           56002                           XCH      Q                                     #  A,L NOW CONTAINS DP RETURN.
003691,000029:    4073           52120                           DXCH     BUF2                                  #  RESTORING INPUTS IF THIS IS A BANKCALL.
003692,000030:    4074           50002                           INDEX    Q                                     
003693,000031:    4075           02000                           TC       10000                                 #  SETTING Q TO SWRETURN.
003694,000032: 
003695,000033:    4076           56120        SWRETURN           XCH      BUF2       +1                         #  COMES HERE TO RETURN TO CALLER. C(A,L)
003696,000034:    4077           56004                           XCH      FBANK                                 #  ARE PRESERVED FOR RETURN.
003697,000035:    4100           56120                           XCH      BUF2       +1                         
003698,000036:    4101           00117                           TC       BUF2                                  
003699,000037: 
003700,000038: 
003701,000039: 
003702,000040:                                                                                                  #           THE FOLLOWING ROUTINE CAN BE USED AS A UNILATERAL JUMP WITH C(A,L) PRESERVED AND THE CADR IMMEDIATELY
003703,000041:                                                                                                  #  FOLLOWING THE TC POSTJUMP INSTRUCTION.
003704,000042: 
003705,000043:    4102           56002        POSTJUMP           XCH      Q                                     #  SAVE INCOMING C(A).
003706,000044:    4103           50000                           INDEX    A                                     #  GET CADR.
003707,000045:    4104           30000                           CA       0                                     
003708,000046: 
003709,000047:                                                                                                  #           BANKJUMP IS THE SAME AS POSTJUMP, EXCEPT THAT THE CADR ARRIVES IN A.
003710,000048: 
003711,000049:    4105           54004        BANKJUMP           TS       FBANK                                 
003712,000050:    4106           76425                           MASK     LOW10                                 
003713,000051:    4107           56002                           XCH      Q                                     #  RESTORING INPUT C(A) IF THIS WAS A
003714,000052:    4110           50002                           INDEX    Q                                     #  POSTJUMP.
003715,000053:    4111           12000                           TCF      10000                                 
003716,000054: 

Page 106

003718,000056:                                                                                                  #           THE FOLLOWING ROUTINE GETS THE RETURN CADR SAVED BY SWCALL OR BANKCALL AND LEAVES IT IN A.
003719,000057: 
003720,000058:    4112           36425        MAKECADR           CAF      LOW10                                 
003721,000059:    4113           70117                           MASK     BUF2                                  
003722,000060:    4114           60120                           AD       BUF2       +1                         
003723,000061:    4115           00002                           TC       Q                                     
003724,000062: 
003725,000063:                                                                                                  #           THE FOLLOWING ROUTINE OBTAINS THE TWO WORDS BEGINNING AT THE ADDRESS ARRIVING IN A, AND LEAVES THEM IN
003726,000064:                                                                                                  #  A,L.
003727,000065: 
003728,000066:    4116           54001        DATACALL           TS       L                                     
003729,000067:    4117           22004                           LXCH     FBANK                                 
003730,000068:    4120           22121                           LXCH     MPTEMP                                #  SAVE FORMER BANK.
003731,000069:    4121           76425                           MASK     LOW10                                 
003732,000070:    4122           00006                           EXTEND                                         
003733,000071:    4123           50000                           INDEX    A                                     
003734,000072:    4124           32001                           DCA      10000                                 
003735,000073: 
003736,000074:    4125           56121                           XCH      MPTEMP                                
003737,000075:    4126           54004                           TS       FBANK                                 #  RESTORE FBANK.
003738,000076:    4127           30121                           CA       MPTEMP                                
003739,000077:    4130           00002                           TC       Q                                     
003740,000078: 
003741,000079:    4131                        ENDIBNKF           EQUALS                                         

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