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.

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

Page 989

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

Page 990

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

Page 991

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

Page 992

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

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