Source Code
These source-code files are part of a reconstructed copy of Artemis 071, the
first release of the Apollo 15 through 17 Command Module (CM) Apollo Guidance
Computer (AGC) software.
The reconstruction began with source code of Artemis 072 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes between the two versions. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021154-. Note that page numbers in the reconstructed code match those on the Artemis 072 printout, although the changed code would likely have changed page numbers for a real Artemis 071 listing. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. |
018773,000002: ## Copyright: Public domain.
018774,000003: ## Filename: SYSTEM_TEST_STANDARD_LEAD_INS.agc
018775,000004: ## Purpose: A section of Artemis revision 071.
018776,000005: ## It is part of the reconstructed source code for the first
018777,000006: ## release of the flight software for the Command Module's
018778,000007: ## (CM) Apollo Guidance Computer (AGC) for Apollo 15 through
018779,000008: ## 17. The code has been recreated from a copy of Artemis 072.
018780,000009: ## It has been adapted such that the resulting bugger words
018781,000010: ## exactly match those specified for Artemis 071 in NASA
018782,000011: ## drawing 2021154-, which gives relatively high confidence
018783,000012: ## that the reconstruction is correct.
018784,000013: ## Reference: 424
018785,000014: ## Assembler: yaYUL
018786,000015: ## Contact: Ron Burkey <info@sandroid.org>.
018787,000016: ## Website: www.ibiblio.org/apollo/index.html
018788,000017: ## Mod history: 2019-08-14 MAS Created from Artemis 072.
018789,000018:
Page 424 |
018791,000020:
018792,000021: 22,3172 E5,1671 EBANK= XSM
018793,000022:
018794,000023: 13,2000 SETLOC E/PROG1
018795,000024: 13,2000 BANK
018796,000025:
018797,000026: 13,2036 COUNT* $$/P07
018798,000027:
018799,000028: # SPECIAL PROGRAMS TO EASE THE PANGS OF ERASABLE MEMORY PROGRAMS.
018800,000029:
018801,000030: # E/BKCALL FOR DOING BANKCALLS FROM AND RETURNING TO ERASABLE.
018802,000031:
018803,000032: # THIS ROUTINE IS CALLABLE FROM ERASABLE OR FIXED. LIKE BANKCALL, HOWEVER, SWITCHING BETWEEN S3 AND S4
018804,000033: # IS NOT POSSIBLE.
018805,000034:
018806,000035: # THE CALLING SEQUENCE IS:
018807,000036:
018808,000037: # TC BANKCALL
018809,000038: # CADR E/BKCALL
018810,000039: # CADR ROUTINE WHERE YOU WANT TO GO IN FIXED.
018811,000040: # RETURN HERE FROM DISPLAY TERMINATE, BAD STALL OR TC Q.
018812,000041: # RETURN HERE FROM DISPLAY PROCEED OR GOOD RETURN FROM STALL.
018813,000042: # RETURN HERE FROM DISPLAY ENTER OR RECYCLE.
018814,000043:
018815,000044: # THIS ROUTINE REQUIRES TWO ERASABLES (EBUF2, +1) IN UNSWITCHED WHICH ARE UNSHARED BY INTERRUPTS AND
018816,000045: # OTHER EMEMORY PROGRAMS.
018817,000046:
018818,000047: # A + L ARE PRESERVED THROUGH BANKCALL AND E/BKCALL.
018819,000048:
018820,000049: 13,2036 52134 E/BKCALL DXCH BUF2 # SAVE A,L AND GET DP RETURN.
018821,000050: 13,2037 53115 DXCH EBUF2 # SAVE DP RETURN.
018822,000051: 13,2040 25114 INCR EBUF2 # RETURN +1 BECAUSE DOUBLE CADR.
018823,000052: 13,2041 30006 CA BBANK
018824,000053: 13,2042 75041 MASK LOW10 # GET CURRENT EBANK. (SBANK SOMEDAY)
018825,000054: 13,2043 27115 ADS EBUF2 +1 # FORM BBCON. (WAS FBANK)
018826,000055: 13,2044 51114 NDX EBUF2
018827,000056: 13,2045 27777 CA 0 -1 # GET CADR OF ROUTINE.
018828,000057: 13,2046 04642 TC SWCALL # GO TO ROUTINE, SETTING Q TO SWRETURN
018829,000058: # AND RESTORING A + L.
018830,000059: 13,2047 02053 TC +4 # TX Q, V34, OR BAD STALL RETURN.
018831,000060: 13,2050 02052 TC +2 # PROCEED OR GOOD STALL RETURN.
018832,000061: 13,2051 25114 INCR EBUF2 # ENTER OR RECYCLE RETURN.
018833,000062: 13,2052 25114 INCR EBUF2
018834,000063: 13,2053 53115 E/SWITCH DXCH EBUF2
018835,000064: 13,2054 52006 DTCB
018836,000065:
Page 425 |
018838,000067: # E/CALL FOR CALLING A FIXED MEMORY INTERPRETIVE SUBROUTINE FROM ERASABLE AND RETURNING TO ERASABLE.
018839,000068:
018840,000069: # THE CALLING SEQUENCE IS...
018841,000070:
018842,000071: # RTB
018843,000072: # E/CALL
018844,000073: # CADR ROUTINE THE INTERPRETIVE SUBROUTINE YOU WANT.
018845,000074: # RETURNS HERE IN INTERPRETIVE.
018846,000075:
018847,000076: 13,2055 22164 E/CALL LXCH LOC # ADRES -1 OF CADR.
018848,000077: 13,2056 50001 INDEX L
018849,000078: 13,2057 30001 CA L # CADR IN A.
018850,000079: 13,2060 24001 INCR L
018851,000080: 13,2061 24001 INCR L # RETURN ADRES IN L.
018852,000081: 13,2062 53115 DXCH EBUF2 # STORE CADR AND RETURN.
018853,000082: 13,2063 06006 TC INTPRET
018854,000083: 13,2064 77624 CALL
018855,000084: 13,2065 01114 EBUF2 # INDIRECTLY EXECUTE ROUTINE. IT MUST
018856,000085: 13,2066 77776 EXIT # LEAVE VIA RVQ OR EQUIVALENT.
018857,000086: 13,2067 23115 LXCH EBUF2 +1 # PICK UP RETURN.
018858,000087: 13,2070 16010 TCF INTPRET +2 # SET LOC AND RETURB TO CALLER
018859,000088:
Page 426 |
018861,000090: # E/JOBWAK FOR WAKING UP ERASABLE MEMORY JOBS.
018862,000091:
018863,000092: # THIS ROUTINE MUST BE CALLED IN INTERRUPT OR WITH INTERRUPTS INHIBITED.
018864,000093:
018865,000094: # THE CALLING SEQUENCE IS:
018866,000095:
018867,000096: # INHINT
018868,000097: # .
018869,000098: # .
018870,000099: # CA WAKEADR ADDRESS OF SLEEPING JOB
018871,000100: # TC IBNKCALL
018872,000101: # CADR E/JOBWAK
018873,000102: # . RETURNS HERE
018874,000103: # .
018875,000104: # .
018876,000105: # RELINT IF YOU DID AN INHINT.
018877,000106:
018878,000107: 12,2000 SETLOC E/PROG
018879,000108: 12,2000 BANK
018880,000109:
018881,000110: 12,2000 COUNT* $$/P07
018882,000111:
018883,000112: 12,2000 05167 E/JOBWAK TC JOBWAKE # ARRIVE IWTH ADRES IN A.
018884,000113: 12,2001 44756 CS BIT11
018885,000114: 12,2002 50064 NDX LOCCTR
018886,000115: 12,2003 26164 ADS LOC # KNOCK FIXED MEMORY BIT OUT OF ADRES.
018887,000116: 12,2004 00072 TC RUPTREG3 # RETURN
018888,000117:
018889,000118:
018890,000119: # THESE PROGRAMS ARE PROVIDED TO ALLOW OVERLAY OF BANKS 30 THRU 33 OF THE 205 VERSIONS OF SYSTEM TESTS AND
018891,000120: # PRELAUNCH ALIGN. THE INTENT IS TO ALLOW THE STG AND HYBRID LABS TO RUN ALL THE TESTS WITH COLOSSUS.
018892,000121:
018893,000122:
018894,000123: 33,2000 SETLOC TESTLEAD
018895,000124: 33,2000 BANK
018896,000125:
018897,000126: 33,2000 COUNT* $$/COMST
018898,000127: 33,2000 E5,1425 EBANK= QPLACE
018899,000128:
018900,000129: 33,2000 03212 COMPVER TC GCOMPVER # MUST BE 33,2000.
018901,000130:
018902,000131: 33,2001 02703 GTSCPSS1 TC GTSCPSS # MUST BE AT 33,2001
End of include-file SYSTEM_TEST_STANDARD_LEAD_INS.agc. Parent file is MAIN.agc