Source Code

These source-code files were transcribed from a printout in Don Eyles's personal collection, scanned by archive.org, and financially sponsored by Linden Sims. A team of volunteers performed the transcription and proof-reading. The scanned page images are available at the Virtual AGC Project website, as well as higher-quality (but much larger) images at the Virtual AGC Project's collection in the Internet Archive. Report any problems by creating "issues" at the Virtual AGC Project's GitHub Repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 56 OF AGC PROGRAM ZERLINA BY ZOROASTER
	9:12 OCT. 21,1970
Note that the date is the date of the printout, not the date of the program revision.

044196,000002:                                                                                                  ## Copyright:   Public domain.
044197,000003:                                                                                                  ## Filename:    INTER-BANK_COMMUNICATION.agc
044198,000004:                                                                                                  ## Purpose:     A log section of Zerlina 56, the final revision of
044199,000005:                                                                                                  ##              Don Eyles's offline development program for the variable 
044200,000006:                                                                                                  ##              guidance period servicer. It also includes a new P66 with LPD 
044201,000007:                                                                                                  ##              (Landing Point Designator) capability, based on an idea of John 
044202,000008:                                                                                                  ##              Young's. Neither of these advanced features were actually flown,
044203,000009:                                                                                                  ##              but Zerlina was also the birthplace of other big improvements to
044204,000010:                                                                                                  ##              Luminary including the terrain model and new (Luminary 1E)
044205,000011:                                                                                                  ##              analog display programs. Zerlina was branched off of Luminary 145,
044206,000012:                                                                                                  ##              and revision 56 includes all changes up to and including Luminary
044207,000013:                                                                                                  ##              183. It is therefore quite close to the Apollo 14 program,
044208,000014:                                                                                                  ##              Luminary 178, where not modified with new features.
044209,000015:                                                                                                  ## Reference:   pp. 989-992
044210,000016:                                                                                                  ## Assembler:   yaYUL
044211,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
044212,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
044213,000019:                                                                                                  ## Mod history: 2017-07-28 MAS  Created from Luminary 210.
044214,000020:                                                                                                  ##              2017-08-27 MAS  Updated for Zerlina 56.
044215,000021: 

Page 989

044217,000023:                                                                                                  #           THE FOLLOWING ROUTINE CAN BE USED TO CALL A SUBROUTINE IN ANOTHER BANK. IN THE BANKCALL VERSION, THE
044218,000024:                                                                                                  #  CADR OF THE SUBROUTINE IMMEDIATELY FOLLOWS THE  TC BANKCALL  INSTRUCTION, WITH C(A) AND C(L) PRESERVED.
044219,000025: 
044220,000026:    4616                                           BLOCK    02                                    
044221,000027:    4616                                           COUNT*   $$/BANK                               
044222,000028:    4616           52134        BANKCALL           DXCH     BUF2                                  #  SAVE INCOMING A,L.
044223,000029:    4617           50002                           INDEX    Q                                     #  PICK UP CADR.
044224,000030:    4620           30000                           CA       0                                     
044225,000031:    4621           24002                           INCR     Q                                     #  SO WE RETURN TO THE LOC. AFTER THE CADR.
044226,000032: 
044227,000033:                                                                                                  #           SWCALL IS IDENTICAL TO BANKCALL, EXCEPT THAT THE CADR ARRIVES IN A.
044228,000034: 
044229,000035:    4622           54001        SWCALL             TS       L                                     
044230,000036:    4623           22004                           LXCH     FBANK                                 #  SWITCH BANKS, SAVING RETURN.
044231,000037:    4624           75012                           MASK     LOW10                                 #  GET SUB-ADDRESS OF CADR.
044232,000038:    4625           56002                           XCH      Q                                     #  A,L NOW CONTAINS DP RETURN.
044233,000039:    4626           52134                           DXCH     BUF2                                  #  RESTORING INPUTS IF THIS IS A BANKCALL.
044234,000040:    4627           50002                           INDEX    Q                                     
044235,000041:    4630           02000                           TC       10000                                 #  SETTING Q TO SWRETURN.
044236,000042: 
044237,000043:    4631           56134        SWRETURN           XCH      BUF2       +1                         #  COMES HERE TO RETURN TO CALLER. C(A,L)
044238,000044:    4632           56004                           XCH      FBANK                                 #  ARE PRESERVED FOR RETURN.
044239,000045:    4633           56134                           XCH      BUF2       +1                         
044240,000046:    4634           00133                           TC       BUF2                                  
044241,000047: 
044242,000048:                                                                                                  #           THE FOLLOWING ROUTINE CAN BE USED AS A UNILATERAL JUMP WITH C(A,L) PRESERVED AND THE CADR IMMEDIATELY
044243,000049:                                                                                                  #  FOLLOWING THE TC POSTJUMP INSTRUCTION.
044244,000050: 
044245,000051:    4635           56002        POSTJUMP           XCH      Q                                     #  SAVE INCOMING C(A).
044246,000052:    4636           50000                           INDEX    A                                     #  GET CADR.
044247,000053:    4637           30000                           CA       0                                     
044248,000054: 
044249,000055:                                                                                                  #           BANKJUMP IS THE SAME AS POSTJUMP, EXCEPT THAT THE CADR ARRIVES IN A.
044250,000056: 
044251,000057:    4640           54004        BANKJUMP           TS       FBANK                                 
044252,000058:    4641           75012                           MASK     LOW10                                 
044253,000059:    4642           56002                           XCH      Q                                     #  RESTORING INPUT C(A) IF THIS WAS A
044254,000060:    4643           50002        Q+10000            INDEX    Q                                     #  POSTJUMP.
044255,000061:    4644           12000        PRIO12             TCF      10000                                 #  PRIO12 = TCF   10000 = 12000
044256,000062: 

Page 990

044258,000064:                                                                                                  #           THE FOLLOWING ROUTINE GETS THE RETURN CADR SAVED BY SWCALL OR BANKCALL AND LEAVES IT IN A.
044259,000065: 
044260,000066:    4645           35012        MAKECADR           CAF      LOW10                                 
044261,000067:    4646           70133                           MASK     BUF2                                  
044262,000068:    4647           60134                           AD       BUF2       +1                         
044263,000069:    4650           00002                           TC       Q                                     
044264,000070: 
044265,000071: 
044266,000072:    4651           54135        SUPDACAL           TS       MPTEMP                                
044267,000073:    4652           56004                           XCH      FBANK                                 #  SET FBANK FOR DATA.
044268,000074:    4653           00006                           EXTEND                                         
044269,000075:    4654           04007                           ROR      SUPERBNK                              #  SAVE FBANK IN BITS 15-11, AND
044270,000076:    4655           56135                           XCH      MPTEMP                                #   SUPERBANK IN BITS  7-5.
044271,000077:    4656           75012                           MASK     LOW10                                 
044272,000078:    4657           56001                           XCH      L                                     #  SAVE REL. ADR. IN BANK, FETCH SUPERBITS.
044273,000079:    4660           00004                           INHINT                                         #  BECAUSE RUPT DOES NOT SAVE SUPERBANK.
044274,000080:    4661           00006                           EXTEND                                         
044275,000081:    4662           01007                           WRITE    SUPERBNK                              #  SET SUPERBANK FOR DATA.
044276,000082:    4663           50001                           INDEX    L                                     
044277,000083:    4664           32000                           CA       10000                                 #  PINBALL (FIX MEM DISP) PREVENTS DCA HERE
044278,000084:    4665           56135                           XCH      MPTEMP                                #  SAVE 1ST WD, FETCH OLD FBANK AND SBANK.
044279,000085:    4666           00006                           EXTEND                                         
044280,000086:    4667           01007                           WRITE    SUPERBNK                              #  RESTORE SUPERBANK.
044281,000087:    4670           00003                           RELINT                                         
044282,000088:    4671           54004                           TS       FBANK                                 #  RESTORE FBANK.
044283,000089:    4672           30135                           CA       MPTEMP                                #  RECOVER FIRST WORD OF DATA.
044284,000090:    4673           00002                           RETURN                                         #  24 WDS. DATACALL 516 MU, SUPDACAL 432 MU
044285,000091: 

Page 991

044287,000093:                                                                                                  #           THE FOLLOWING ROUTINES ARE IDENTICAL TO BANKCALL AND SWCALL EXCEPT THAT THEY ARE USED IN INTERRUPT.
044288,000094: 
044289,000095:    4674           52073        IBNKCALL           DXCH     RUPTREG3                              #  USES RUPTREG3,4 FOR DP RETURN ADDRESS.
044290,000096:    4675           50002                           INDEX    Q                                     
044291,000097:    4676           30000                           CAF      0                                     
044292,000098:    4677           24002                           INCR     Q                                     
044293,000099: 
044294,000100:    4700           54001        ISWCALLL           TS       L                                     
044295,000101:    4701           22004                           LXCH     FBANK                                 
044296,000102:    4702           75012                           MASK     LOW10                                 
044297,000103:    4703           56002                           XCH      Q                                     
044298,000104:    4704           52073                           DXCH     RUPTREG3                              
044299,000105:    4705           50002                           INDEX    Q                                     
044300,000106:    4706           02000                           TC       10000                                 
044301,000107: 
044302,000108:    4707           56073        ISWRETRN           XCH      RUPTREG4                              
044303,000109:    4710           56004                           XCH      FBANK                                 
044304,000110:    4711           56073                           XCH      RUPTREG4                              
044305,000111:    4712           00072                           TC       RUPTREG3                              
044306,000112: 
044307,000113:                                                                                                  #  2. USPRCADR ACCESSES INTERPRETIVE CODING IN OTHER THAN THE USER'S FBANK. THE CALLING SEQUENCE IS AS FOLLOWS:
044308,000114: 
044309,000115:                                                                                                  #                                          L        TC     USPRCADR
044310,000116:                                                                                                  #                                          L+1      CADR   INTPRETX        INTPRETX IS THE INTERPRETIVE CODING
044311,000117:                                                                                                  #                                                                          RETURN IS TO L+2
044312,000118: 
044313,000119: 
044314,000120:    4713           54164        USPRCADR           TS       LOC                                   #  SAVE A
044315,000121:    4714           34744                           CA       BIT8                                  
044316,000122:    4715           54023                           TS       EDOP                                  #  EXIT INSTRUCTION TO EDOP
044317,000123:    4716           30006                           CA       BBANK                                 
044318,000124:    4717           54165                           TS       BANKSET                               #  USER'S BBANK TO BANKSET
044319,000125:    4720           50002                           INDEX    Q                                     
044320,000126:    4721           30000                           CA       0                                     
044321,000127:    4722           54004                           TS       FBANK                                 #  INTERPRETIVE BANK TO FBANK
044322,000128:    4723           75012                           MASK     LOW10                                 #  YIELDS INTERPRETIVE RELATIVE ADDRESS
044323,000129:    4724           56002                           XCH      Q                                     #  INTERPRETIVE ADDRESS TO Q, FETCHING L+1
044324,000130:    4725           56164                           XCH      LOC                                   #  L+1 TO LOC, RETRIEVING ORIGINAL A
044325,000131:    4726           14643                           TCF      Q+10000                               
044326,000132: 

Page 992

044328,000134:                                                                                                  #  THERE ARE FOUR POSSIBLE SETTINGS FOR CHANNEL 07. (CHANNEL 07 CONTAINS THE SUPERBANK SETTING.)
044329,000135:                                                                                                  #                                            PSEUDO-FIXED     OCTAL PSEUDO
044330,000136:                                                                                                  #  SUPERBANK     SETTING     S-REG. VALUE    BANK NUMBERS     ADDRESSES
044331,000137:                                                                                                  #  ----------    -------     ------------    ------------      ------------
044332,000138: 
044333,000139:                                                                                                  #  SUPERBANK 3     0XX       2000 - 3777        30 - 37       70000 - 107777   (WHERE XX CAN BE ANYTHING AND
044334,000140:                                                                                                  #                                                                              WILL USUALLY BE SEEN AS 11)
044335,000141:                                                                                                  #  SUPERBANK 4     100       2000 - 3777        40 - 47       110000 - 127777  (AS FAR AS IT CAN BE SEEN,
044336,000142:                                                                                                  #                                                                              ONLY BANKS 40-43 WILL EVER BE
044337,000143:                                                                                                  #                                                                              AND ARE PRESENTLY AVAILABLE)
044338,000144:                                                                                                  #  SUPERBANK 5     101       2000 - 3777        50 - 57       130000 - 147777  (PRESENTLY NOT AVAILABLE TO
044339,000145:                                                                                                  #                                                                              THE USER)
044340,000146:                                                                                                  #  SUPERBANK 6     110       2000 - 3777        60 - 67       150000 - 167777  (PRESENTLY NOT AVAILABLE TO
044341,000147:                                                                                                  #                                                                              THE USER)
044342,000148:                                                                                                  #  ***  THIS ROUTINE MAYBE CALLED BY ANY PROGRAM LOCATED IN BANKS 00 - 27.  I.E., NO PROGRAM LIVING IN ANY
044343,000149:                                                                                                  #  SUPERBANK SHOULD USE SUPERSW.  ***
044344,000150: 
044345,000151:                                                                                                  #  SUPERSW MAYBE CALLED IN THIS FASHION:
044346,000152: 
044347,000153:                                                                                                  #           CAF    ABBCON          WHERE  --  ABBCON   BBCON  SOMETHIN  --
044348,000154:                                                                                                  #           TCR    SUPERSW         (THE SUPERBNK BITS ARE IN THE BBCON)
044349,000155:                                                                                                  #           ...      ...
044350,000156:                                                                                                  #            .        .
044351,000157:                                                                                                  #            .        .
044352,000158: 
044353,000159:                                                                                                  #  OR IN THIS FASHION :
044354,000160: 
044355,000161:                                                                                                  #           CAF    SUPERSET        WHERE SUPERSET IS ONE OF THE FOUR AVAILABLE
044356,000162:                                                                                                  #           TCR    SUPERSW         SUPERBANK BIT CONSTANTS:
044357,000163:                                                                                                  #           ...      ...                                   SUPER011 OCTAL  60
044358,000164:                                                                                                  #            .        .                                    SUPER100 OCTAL 100
044359,000165:                                                                                                  #            .        .                                    SUPER101 OCTAL 120
044360,000166:                                                                                                  #                                                          SUPER110 OCTAL 140
044361,000167: 
044362,000168:    4727           00006        SUPERSW            EXTEND                                         
044363,000169:    4730           01007                           WRITE    SUPERBNK                              #  WRITE BITS 7-6-5 OF THE ACCUMULATOR INTO
044364,000170:                                                                                                  #  CHANNEL 07
044365,000171:    4731           00002                           TC       Q                                     #  TC TO INSTRUCTION FOLLOWING
044366,000172:                                                                                                  #    TC  SUPERSW
044367,000173: 

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