Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of BURST120 (SUNBURST 120). They were scanned at archive.org's Boston facility, and the scanning was sponsored by Mike Stewart. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are in ALL-CAPS, whereas comments added later in transcription are in Mixed-Case. In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the BURST120 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	YUL SYSTEM FOR AGC: REVISION 0 OF PROGRAM BURST120 
	BY NASA 2021106-031 DEC 7, 1967

	THIS LISTING IS A COPY OF A VERSION OF THE PROGRAM INTENDED 
	FOR USE IN THE ON-BOARD PRIMARY GUIDANCE COMPUTER IN THE 
	UNMANNED FLIGHT OF APOLLO LUNAR MODULE 1 --- THE AS206 MISSION.
Note that the date is the date of the printout, not the date of the program revision.

040692,000002:                                                                                                  ## Copyright:   Public domain.
040693,000003:                                                                                                  ## Filename:    INTER-BANK_COMMUNICATION.agc
040694,000004:                                                                                                  ## Purpose:     A module for revision 0 of BURST120 (Sunburst). It 
040695,000005:                                                                                                  ##              is part of the source code for the Lunar Module's
040696,000006:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 5.
040697,000007:                                                                                                  ## Assembler:   yaYUL
040698,000008:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
040699,000009:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
040700,000010:                                                                                                  ## Mod history: 2016-09-30 RSB  Created draft version.
040701,000011:                                                                                                  ##              2016-10-19 RSB  Transcribed, largely from Aurora 12 version of the file.
040702,000012:                                                                                                  ##              2016-10-31 RSB  Typos.
040703,000013:                                                                                                  ##              2016-11-01 RSB  More typos.
040704,000014:                                                                                                  ##              2016-12-06 RSB  Comments proofed using octopus/ProoferComments,
040705,000015:                                                                                                  ##                              changes made.
040706,000016:                                                                                                  ##              2017-03-17 RSB  Comment-text fixes identified in diff'ing
040707,000017:                                                                                                  ##                              Luminary 99 vs Comanche 55.
040708,000018: 

Page 948

040710,000020:                                                                                                  #           THE FOLLOWING ROUTINE CAN BE USED TO CALL A SUBROUTINE IN ANOTHER BANK. IN THE BANKCALL VERSION, THE
040711,000021:                                                                                                  #  CADR OF THE SUBROUTINE IMMEDIATELY FOLLOWS THE  TC BANKCALL  INSTRUCTION, WITH C(A) AND C(L) PRESERVED.
040712,000022: 
040713,000023:    5206                                           BLOCK    02                                    
040714,000024:    5206           52124        BANKCALL           DXCH     BUF2                                  #  SAVE INCOMING A,L.
040715,000025:    5207           50002                           INDEX    Q                                     #  PICK UP CADR.
040716,000026:    5210           30000        BNKCAL+2           CA       0                                     
040717,000027:    5211           24002                           INCR     Q                                     #  SO WE RETURN TO THE LOC. AFTER THE CADR.
040718,000028: 
040719,000029:                                                                                                  #  SWCALL IS  IDENTICAL TO BANKCALL, EXCEPT THAT THE CADR ARRIVES IN A.
040720,000030: 
040721,000031:    5212           54001        SWCALL             TS       L                                     
040722,000032:    5213           22004                           LXCH     FBANK                                 #  SWITCH BANKS, SAVING RETURN.
040723,000033:    5214           75337                           MASK     LOW10                                 #  GET SUB-ADDRESS OF CADR.
040724,000034:    5215           56002                           XCH      Q                                     #  A,L NOW CONTAINS DP RETURN.
040725,000035:    5216           52124                           DXCH     BUF2                                  #  RESTORING INPUTS IF THIS IS A BANKCALL.
040726,000036:    5217           50002                           INDEX    Q                                     
040727,000037:    5220           02000                           TC       10000                                 #  SETTING Q TO SWRETURN.
040728,000038: 
040729,000039:    5221           56124        SWRETURN           XCH      BUF2       +1                         #  COMES HERE TO RETURN TO CALLER. C(A,L)
040730,000040:    5222           56004                           XCH      FBANK                                 #  ARE PRESERVED FOR RETURN.
040731,000041:    5223           56124                           XCH      BUF2       +1                         
040732,000042:    5224           00123                           TC       BUF2                                  
040733,000043: 
040734,000044:                                                                                                  #           THE FOLLOWING ROUTINE CAN BE USED AS A UNILATERAL JUMP WITH C(A,L) PRESERVED AND THE CADR IMMEDIATELY
040735,000045:                                                                                                  #  FOLLOWING THE TC POSTJUMP INSTRUCTION.
040736,000046: 
040737,000047:    5225           56002        POSTJUMP           XCH      Q                                     #  SAVE INCOMING C(A).
040738,000048:    5226           50000                           INDEX    A                                     #  GET CADR.
040739,000049:    5227           30000                           CA       0                                     
040740,000050: 
040741,000051:                                                                                                  #           BANKJUMP IS THE SAME AS POSTJUMP, EXCEPT THAT THE CADR ARRIVES IN A.
040742,000052: 
040743,000053:    5230           54004        BANKJUMP           TS       FBANK                                 
040744,000054:    5231           75337                           MASK     LOW10                                 
040745,000055:    5232           56002                           XCH      Q                                     #  RESTORING INPUT C(A) IF THIS WAS A
040746,000056:    5233           50002        Q+10000            INDEX    Q                                     #  POSTJUMP.
040747,000057:    5234           12000        BNKJUP+4           TCF      10000                                 
040748,000058: 

Page 949

040750,000060:                                                                                                  #           THE FOLLOWING ROUTINE GETS THE RETURN CADR SAVED BY SWCALL OR BANKCALL AND LEAVES IT IN A.
040751,000061: 
040752,000062:    5235           35337        MAKECADR           CAF      LOW10                                 
040753,000063:    5236           70123                           MASK     BUF2                                  
040754,000064:    5237           60124                           AD       BUF2       +1                         
040755,000065:    5240           00002                           TC       Q                                     
040756,000066: 
040757,000067: 
040758,000068:                                                                                                  #           THE FOLLOWING ROUTINE OBTAINS THE ONE WORD AT THE ADDRESS ARRIVING IN A, AND LEAVES IT IN A.  ENTER
040759,000069:                                                                                                  #  WITH THE CADR IN A, AT DATACALL WITH JUNK IN L IF NOT SWITCHING SUPERBANKS, OTHERWISE AT SUPDACAL WITH SUPERBANK
040760,000070:                                                                                                  #  BITS IN BITS 7-5 IN L (BITS 15-8 AND 4-1 MAY BE JUNK).  DEBRIS = MTEMP.  INHINTS FOR ABOUT 165 MUSEC.
040761,000071: 
040762,000072:    5241           54001        DATACALL           TS       L                                     #  SAVE CADR (SOLE INPUT HERE).
040763,000073:    5242           00006                           EXTEND                                         
040764,000074:    5243           00007                           READ     SUPERBNK                              #  THIS PROLOGUE MAKES SUPERSWITCH VACUOUS.
040765,000075:    5244           56001                           XCH      L                                     #  CADR IN A, SUPERBITS IN L.
040766,000076: 
040767,000077:    5245           54125        SUPDACAL           TS       MPTEMP                                
040768,000078:    5246           56004                           XCH      FBANK                                 #  SET FBANK FOR DATA.
040769,000079:    5247           00006                           EXTEND                                         
040770,000080:    5250           04007                           ROR      SUPERBNK                              #  SAVE FBANK IN BITS 15-11, AND
040771,000081:    5251           56125                           XCH      MPTEMP                                #   SUPERBANK IN BITS  7-5.
040772,000082:    5252           75337                           MASK     LOW10                                 
040773,000083:    5253           56001                           XCH      L                                     #  SAVE REL. ADR. IN BANK, FETCH SUPERBITS.
040774,000084:    5254           00004                           INHINT                                         #  BECAUSE RUPT DOES NOT SAVE SUPERBANK.
040775,000085:    5255           00006                           EXTEND                                         
040776,000086:    5256           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FOR DATA.
040777,000087:    5257           50001                           INDEX    L                                     
040778,000088:    5260           32000                           CA       10000                                 
040779,000089: 
040780,000090:    5261           56125                           XCH      MPTEMP                                #  SAVE 1ST WD, FETCH OLD FBANK AND SBANK.
040781,000091:    5262           00006                           EXTEND                                         
040782,000092:    5263           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK.
040783,000093:    5264           00003                           RELINT                                         
040784,000094:    5265           54004                           TS       FBANK                                 #  RESTORE FBANK.
040785,000095:    5266           30125                           CA       MPTEMP                                #  RECOVER FIRST WORD OF DATA.
040786,000096:    5267           00002                           RETURN                                         #  24 WDS. DATACALL 516 MU, SUPDACAL 432 MU
040787,000097: 

Page 950

040789,000099:                                                                                                  #           THE FOLLOWING ROUTINES ARE IDENTICAL TO BANKCALL AND SWCALL EXCEPT THAT THEY ARE USED IN INTERRUPT.
040790,000100: 
040791,000101:    5270           52073        IBNKCALL           DXCH     RUPTREG3                              #  USES RUPTREG3,4 FOR DP RETURN ADDRESS.
040792,000102:    5271           50002                           INDEX    Q                                     
040793,000103:    5272           30000                           CAF      0                                     
040794,000104:    5273           24002                           INCR     Q                                     
040795,000105: 
040796,000106:    5274           54001        ISWCALLL           TS       L                                     
040797,000107:    5275           22004                           LXCH     FBANK                                 
040798,000108:    5276           75337                           MASK     LOW10                                 
040799,000109:    5277           56002                           XCH      Q                                     
040800,000110:    5300           52073                           DXCH     RUPTREG3                              
040801,000111:    5301           50002                           INDEX    Q                                     
040802,000112:    5302           02000                           TC       10000                                 
040803,000113: 
040804,000114:    5303           56073        ISWRETRN           XCH      RUPTREG4                              
040805,000115:    5304           56004                           XCH      FBANK                                 
040806,000116:    5305           56073                           XCH      RUPTREG4                              
040807,000117:    5306           00072                           TC       RUPTREG3                              
040808,000118: 

Page 951

040810,000120:                                                                                                  #           THE FOLLOWING SUBROUTINES PROVIDE TO THE BASIC PROGRAMMER ENTRY INTO AND RETURN FROM ANY INTERPRETIVE
040811,000121:                                                                                                  #  CODING WHICH DOES NOT USE THE ENTERING CONTENTS OF Q AND WHICH RETURNS VIA DANZIG. C(A) AND C(L) ARE SAVED.
040812,000122: 
040813,000123:                                                                                                  #  USER'S RESPONSIBILITY TO FILL IN ADVANCE THE APPROPRIATE OPERAND AND ADDRESS REGISTERS USED BY THE
040814,000124:                                                                                                  #  INTERPRETIVE CODING SUCH AS MPAC, BUF, ADDRWD, ETC.; AND TO CONFIRM THAT THE INTERPRETIVE CODING MEETS THE
040815,000125:                                                                                                  #  ABOVE RESTRICTIONS WITH RESPECT TO Q AND DANZIG.
040816,000126: 
040817,000127:                                                                                                  #  USEPRET AND USPRCADR MUST NOT BE USED IN INTERRUPT.
040818,000128: 
040819,000129:                                                                                                  #  1. USEPRET ACCESSES INTERPRETIVE CODING WHICH CAN BE ENTERED WITHOUT CHANGING FBANK.
040820,000130:                                                                                                  #     THE CALLING SEQUENCE IS AS FOLLOWS:
040821,000131: 
040822,000132:                                                                                                  #                                          L         TC     USEPRET
040823,000133:                                                                                                  #                                          L+1       TC,TCF INTPRETX       TC,TCF MEANS TC OR TCF
040824,000134:                                                                                                  #                                                                          INTPRETX IS THE INTERPRETIVE CODING
040825,000135:                                                                                                  #                                                                          RETURN IS TO L+2
040826,000136: 
040827,000137:                                                                                                  #  2. USPRCADR ACCESSES INTERPRETIVE CODING IN OTHER THAN THE USER'S FBANK. THE CALLING SEQUENCE IS AS FOLLOWS:
040828,000138: 
040829,000139:                                                                                                  #                                          L         TC     USPRCADR
040830,000140:                                                                                                  #                                          L+1       CADR   INTPRETX       INTPRETX IS THE INTERPRETIVE CODING
040831,000141:                                                                                                  #                                                                          RETURN IS TO L+2
040832,000142: 
040833,000143:    5307           56002        USEPRET            XCH      Q                                     #  FETCH Q, SAVING A
040834,000144:    5310           54154                           TS       LOC                                   #  L+1 TO LOC
040835,000145:    5311           30006                           CA       BBANK                                 
040836,000146:    5312           54155                           TS       BANKSET                               #  USER'S BBANK TO BANKSET
040837,000147:    5313           37754                           CA       BIT8                                  
040838,000148:    5314           54023                           TS       EDOP                                  #  EXIT INSTRUCTION TO EDOP
040839,000149:    5315           30002                           CA       Q                                     #  RETRIEVE ORIGINAL A
040840,000150:    5316           00154                           TC       LOC                                   
040841,000151: 
040842,000152:    5317           54154        USPRCADR           TS       LOC                                   #  SAVE A
040843,000153:    5320           37754                           CA       BIT8                                  
040844,000154:    5321           54023                           TS       EDOP                                  #  EXIT INSTRUCTION TO EDOP
040845,000155:    5322           30006                           CA       BBANK                                 
040846,000156:    5323           54155                           TS       BANKSET                               #  USER'S BBANK TO BANKSET
040847,000157:    5324           50002                           INDEX    Q                                     
040848,000158:    5325           30000                           CA       0                                     
040849,000159:    5326           54004                           TS       FBANK                                 #  INTERPRETIVE BANK TO FBANK
040850,000160:    5327           75337                           MASK     LOW10                                 #  YIELDS INTERPRETIVE RELATIVE ADDRESS
040851,000161:    5330           56002                           XCH      Q                                     #  INTERPRETIVE ADDRESS TO Q, FETCHING L+1
040852,000162:    5331           56154                           XCH      LOC                                   #  L+1 TO LOC, RETRIEVING ORIGINAL A
040853,000163:    5332           15233                           TCF      Q+10000                               
040854,000164: 

Page 952

040856,000166:                                                                                                  #  THERE ARE FOUR POSSIBLE SETTINGS FOR CHANNEL 07. (CHANNEL 07 CONTAINS THE SUPERBANK SETTING.)
040857,000167:                                                                                                  #                                            PSEUDO-FIXED     OCTAL PSEUDO
040858,000168:                                                                                                  #  SUPERBANK     SETTING     S-REG. VALUE    BANK NUMBERS     ADDRESSES
040859,000169:                                                                                                  #  ---------     -------     ------------     ------------     ------------
040860,000170: 
040861,000171:                                                                                                  #  SUPERBANK 3     0XX       2000 - 3777        30 - 37       70000 - 107777   (WHERE XX CAN BE ANYTHING AND
040862,000172:                                                                                                  #                                                                              WILL USUALLY BE SEEN AS 11)
040863,000173:                                                                                                  #  SUPERBANK 4     100       2000 - 3777        40 - 47       110000 - 127777  (AS FAR AS IT CAN BE SEEN,
040864,000174:                                                                                                  #                                                                              ONLY BANKS 40-43 WILL EVER BE
040865,000175:                                                                                                  #                                                                              AND ARE PRESENTLY AVAILABLE)
040866,000176:                                                                                                  #  SUPERBANK 5     101       2000 - 3777        50 - 57       130000 - 147777  (PRESENTLY NOT AVAILABLE TO
040867,000177:                                                                                                  #                                                                              THE USER)
040868,000178:                                                                                                  #  SUPERBANK 6     110       2000 - 3777        60 - 67       150000 - 167777  (PRESENTLY NOT AVAILABLE TO
040869,000179:                                                                                                  #                                                                              THE USER)
040870,000180:                                                                                                  #  ***  THIS ROUTINE MAYBE CALLED BY ANY PROGRAM LOCATED IN BANKS 00 - 27.  I.E., NO PROGRAM LIVING IN ANY
040871,000181:                                                                                                  #  SUPERBANK SHOULD USE SUPERSW. ***
040872,000182: 
040873,000183:                                                                                                  #  SUPERSW MAY BE CALLED IN THIS FASHION:
040874,000184: 
040875,000185:                                                                                                  #           CAF     ABBCON          WHERE  --  ABBCON   BBCON  SOMETHIN  --
040876,000186:                                                                                                  #           TCR     SUPERSW         (THE SUPERBNK BITS ARE IN THE BBCON)
040877,000187:                                                                                                  #           ...       ...
040878,000188:                                                                                                  #            .         .
040879,000189:                                                                                                  #            .         .
040880,000190: 
040881,000191:                                                                                                  #  OR IN THIS FASHION:
040882,000192: 
040883,000193:                                                                                                  #           CAF     SUPERSET        WHERE SUPERSET IS ONE OF THE FOUR AVAILABLE
040884,000194:                                                                                                  #           TCR     SUPERSW         SUPERBANK BIT CONSTANTS:
040885,000195:                                                                                                  #           ...       ...                                   SUPER011 OCTAL  60
040886,000196:                                                                                                  #            .         .                                    SUPER100 OCTAL 100
040887,000197:                                                                                                  #            .         .                                    SUPER101 OCTAL 120
040888,000198:                                                                                                  #                                                           SUPER110 OCTAL 140
040889,000199: 
040890,000200:    5333           00006        SUPERSW            EXTEND                                         
040891,000201:    5334           01007                           WRITE    SUPERBNK                              #  WRITE BITS 7-6-5 OF THE ACCUMULATOR INTO
040892,000202:                                                                                                  #  CHANNEL 07
040893,000203:    5335           00002                           TC       Q                                     #  TC TO INSTRUCTION FOLLOWING
040894,000204:                                                                                                  #    TC  SUPERSW
040895,000205: 

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