Add remaining Apollo 11 source

This commit is contained in:
chrislgarry 2016-07-07 04:47:26 -04:00
parent ece623da47
commit dc4ea6735c
128 changed files with 85238 additions and 4771 deletions

BIN
.DS_Store vendored Normal file

Binary file not shown.

518
AGC_BLOCK_TWO_SELF-CHECK.s Normal file
View File

@ -0,0 +1,518 @@
# Copyright: Public domain.
# Filename: AGC_BLOCK_TWO_SELF-CHECK.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1394-1403
# Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
# from the Colossus249/ file of the same
# name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1394
# PROGRAM DESCRIPTION DATE: 20 DECEMBER 1967
# PROGRAM NAME -- SELF-CHECK LOG SECTION: AGC BLOCK TWO SELF-CHECK
# MOD NO -- 1 ASSEMBLY SUBROUTINE UTILITYM REV 25
# MOD BY -- GAUNTT
#
# FUNCTIONAL DESCRIPTION
# PROGRAM HAS TWO MAIN PARTS. THE FIRST IS SELF-CHECK WHICH RUNS AS A ZERO PRIORITY JOB WITH NO CORE SET, AS
# PART OF THE BACK-UP IDLE LOOP. THE SECOND IS SHOW-BANKSUM WHICH RUNS AS A REGULAR EXECUTIVE JOB WITH ITS OWN
# STARTING VERB.
#
# THE PURPOSE OF SELF-CHECK IS TO CHECK OUT VARIOUS PARTS OF THE COMPUTER AS OUTLINED BELOW IN THE OPTIONS.
#
# THE PURPOSE OF SHOW-BANKSUM IS TO DISPLAY THE SUM OF EACH BANK, ONE AT A TIME.
#
# IN ALL THERE ARE 7 POSSIBLE OPTIONS IN THIS BLOCK II VERSION OF SELF-CHECK. MORE DETAIL DESCRIPTION MAY BE
# FOUND IN E-2065 BLOCK II AGC SELF-CHECK AND SHOW BANKSUM BY EDWIN D. SMALLY DECEMBER 1966, AND ADDENDA 2 AND 3.
#
# THE DIFFERENT OPTIONS ARE CONTROLLED BY PUTTING DIFFERENT NUMBERS IN THE SMODE REGISTER (NOUN 27). BELOW IS
# A DESCRIPTION OF WHAT PARTS OF THE COMPUTER THAT ARE CHECKED BY THE OPTIONS, AND THE CORRESPONDING NUMBER, IN
# OCTAL, TO LOAD INTO SMODE.
# +-4 ERASABLE MEMORY
# +-5 FIXED MEMORY
# +-1,2,3,6,7,10 EVERYTHING IN OPTIONS 4 AND 5.
# -0 SAME AS +-10 UNTIL AN ERROR IS DETECTED.
# +0 NO CHECK, PUTS COMPUTER INTO THE BACKUP IDLE LOOP.
#
# WARNINGS
# USE OF E MEMORY RESERVED FOR SELF-CHECK (EVEN IN IDLE LOOP) AS TEMP STORAGE BY OTHER PROGRAMS IS DANGEROUS.
# SMODE SET GREATER THAN OCT 10 PUTS COMPUTER INTO BACKUP IDLE LOOP.
#
# CALLING SEQUENCE
# TO CALL SELF-CHECK KEY IN
# V 21 N 27 E OPTION NUMBER E
# TO CALL SHOW-BANKSUM KEY IN
# V 91 E DISPLAYS FIRST BANK
# V 33 E PROCEED, DISPLAYS NEXT BANK
#
# EXIT MODES, NORMAL AND ALARM
# SELF-CHECK NORMALLY CONTINUES INDEFINITELY UNLESS THERE IS AN ERROR DETECTED. IF SO + OPTION NUMBERS PUT
# COMPUTER INTO BACKUP IDLE LOOP, - OPTION NUMBERS RESTART THE OPTION.
#
# THE -0 OPTION PROCEEDS FROM THE LINE FOLLOWING THE LINE WHERE THE ERROR WAS DETECTED.
#
# SHOW-BANKSUM PROCEEDS UNTIL A TERMINATE IS KEYED IN (V 34 E). THE COMPUTER IS PUT INTO THE BACKUP IDLE LOOP.
#
# OUTPUT
# Page 1395
# SELF-CHECK UPON DETECTING AN ERROR LOADS THE SELF-CHECK ALARM CONSTANT (01102) INTO THE FAILREG SET AND
# TURNS ON THE ALARM LIGHT. THE OPERATOR MAY THEN DISPLAY THE THREE FAILREGS BY KEYING IN V 05 N 09 E. FOR FURTHER
# INFORMATION HE MAY KEY IN V 05 N 08 E, THE DSKY DISPLAY IN R1 WILL BE ADDRESS+1 OF WHERE THE ERROR WAS DETECTED,
# IN R2 THE BBCON OF SELF-CHECK, AND IN R3 THE TOTAL NUMBER OF ERRORS DETECTED BY SELF-CHECK SINCE THE LAST MAN
# INITIATED FRESH START (SLAP1).
#
# SHOW-BANKSUM STARTING WTIH BANK 0 DISPLAYS IN R1 THE BANK SUM (A +-NUMBER EQUAL TO THE BANK NUMBER), IN R2
# THE BANK NUMBER, AND IN R3 THE BUGGER WORD.
#
# ERASABLE INITIALIZATION REQUIRED
# ACCOMPLISHED BY FRESH START
# SMODE SET TO +0
#
# DEBRIS
# ALL EXITS FROM THE CHECK OF ERASABLE (ERASCHK) RESTORE ORIGINAL CONTENTS TO REGISTERS UNDER CHECK.
# EXCEPTION IS A RESTART. RESTART THAT OCCURS DURING ERASCHK RESTORES ERASABLE, UNLESS THERE IS EVIDENCE TO DOUBT
# E MEMORY, IN WHICH CASE PROGRAM THEN DOES A FRESH START (DOFSTART).
BANK 25
SETLOC SELFCHEC
BANK
COUNT 43/SELF
SBIT1 EQUALS BIT1
SBIT2 EQUALS BIT2
SBIT3 EQUALS BIT3
SBIT4 EQUALS BIT4
SBIT5 EQUALS BIT5
SBIT6 EQUALS BIT6
SBIT7 EQUALS BIT7
SBIT8 EQUALS BIT8
SBIT9 EQUALS BIT9
SBIT10 EQUALS BIT10
SBIT11 EQUALS BIT11
SBIT12 EQUALS BIT12
SBIT13 EQUALS BIT13
SBIT14 EQUALS BIT14
SBIT15 EQUALS BIT15
S+ZERO EQUALS ZERO
S+1 EQUALS BIT1
S+2 EQUALS BIT2
S+3 EQUALS THREE
S+4 EQUALS FOUR
S+5 EQUALS FIVE
# Page 1396
S+6 EQUALS SIX
S+7 EQUALS SEVEN
S8BITS EQUALS LOW8 # 00377
CNTRCON = OCT50 # USED IN CNTRCHK
ERASCON1 OCTAL 00061 # USED IN ERASCHK
ERASCON2 OCTAL 01373 # USED IN ERASCHK
ERASCON6 = OCT1400 # USED IN ERASCHK
ERASCON3 OCTAL 01461 # USED IN ERASCHK
ERASCON4 OCTAL 01773 # USED IN ERASCHK
S10BITS EQUALS LOW10 # 01777, USED IN ERASCHK
SBNK03 EQUALS PRIO6 # 06000, USED IN ROPECHK
-MAXADRS = HI5 # FOR ROPECHK
SIXTY OCTAL 00060
SUPRCON OCTAL 60017 # USED IN ROPECHK
S13BITS OCTAL 17777
CONC+S1 OCTAL 25252 # USED IN CYCLSHFT
CONC+S2 OCTAL 52400 # USED IN CYCLSHFT
ERASCON5 OCTAL 76777
S-7 = OCT77770
S-4 EQUALS NEG4
S-3 EQUALS NEG3
S-2 EQUALS NEG2
S-1 EQUALS NEGONE
S-ZERO EQUALS NEG0
EBANK= LST1
ADRS1 ADRES SKEEP1
SELFADRS ADRES SELFCHK # SELFCHK RETURN ADDRESS. SHOULD BE PUT
# IN SELFRET WHEN GOING FROM SELFCHK TO
# SHOWSUM AND PUT IN SKEEP1 WHEN GOING
# FROM SHOWSUM TO SELF-CHECK.
PRERRORS CA ERESTORE # IS IT NECESSARY TO RESTORE ERASABLE
EXTEND
BZF ERRORS # NO
EXTEND
DCA SKEEP5
INDEX SKEEP7
DXCH 0000 # RESTORE THE TWO ERASABLE REGISTERS
CA S+ZERO
TS ERESTORE
ERRORS INHINT
CA Q
TS SFAIL # SAVE Q FOR FAILURE LOCATION
TS ALMCADR # FOR DISPLAY WITH BBANK AND ERCOUNT
INCR ERCOUNT # KEEP TRACK OF NUMBER OF MALFUNCTIONS.
TCALARM2 TC ALARM2
OCT 01102 # SELF-CHECK MALFUNCTION INDICATOR
CCS SMODE
SIDLOOP CA S+ZERO
# Page 1397
TS SMODE
TC SELFCHK # GO TO IDLE LOOP
TC SFAIL # CONTINUE WITH SELF-CHECK
-1CHK CCS A
TCF PRERRORS
TCF PRERRORS
CCS A
TCF PRERRORS
TC Q
SMODECHK EXTEND
QXCH SKEEP1
TC CHECKNJ # CHECK FOR NEW JOB
CCS SMODE
TC SOPTIONS
TC SMODECHK +2 # TO BACKUP IDLE LOOP
TC SOPTIONS
INCR SCOUNT
TC SKEEP1 # CONTINUE WITH SELF-CHECK
SOPTIONS AD S-7
EXTEND
BZMF +2 # FOR OPTIONS BELOW NINE.
BNKOPTN TC SIDLOOP # ILLEGAL OPTION. GO TO IDLE LOOP.
INCR SCOUNT # FOR OPTIONS BELOW NINE.
AD S+7
INDEX A
TC SOPTION1
SOPTION1 TC SKEEP1 # WAS TC+TCF
SOPTION2 TC SKEEP1 # WAS IN:OUT1
SOPTION3 TC SKEEP1 # WAS COUNTCHK
SOPTION4 TC ERASCHK
SOPTION5 TC ROPECHK
SOPTION6 TC SKEEP1
SOPTION7 TC SKEEP1
SOPTON10 TC SKEEP1 # CONTINUE WITH SELF-CHECK
CHECKNJ EXTEND
QXCH SELFRET # SAVE RETURN ADDRESS WHILE TESTING NEWJOB
TC POSTJUMP # TO SEE IF ANY JOBS HAVE BECOME ACTIVE.
CADR ADVAN
SELFCHK TC SMODECHK # ** CHARLEY, COME IN HERE
# SKEEP7 HOLDS LOWEST OF TWO ADDRESSES BEING CHECKED.
# SKEEP6 HOLDS B(X+1).
# SKEEP5 HOLDS B(X).
# SKEEP4 HOLDS C(EBANK) DURING ERASLOOP AND CHECKNJ
# Page 1398
# SKEEP3 HOLDS LAST ADDRESS BEING CHECKED (HIGHEST ADDRESS).
# SKEEP2 CONTROLS CHECKING OF NON-SWITCHABLE ERASABLE MEMORY WITH BANK NUMBERS IN EB.
#
# ERASCHK TAKES APPROXIMATELY 7 SECONDS.
ERASCHK CA S+1
TS SKEEP2
0EBANK CA S+ZERO
TS EBANK
CA ERASCON3 # 01461
TS SKEEP7 # STARTING ADDRESS
CA S10BITS # 01777
TS SKEEP3 # LAST ADDRESS CHECKED
TC ERASLOOP
E134567B CA ERASCON6 # 01400
TS SKEEP7 # STARTING ADDRESS
CA S10BITS # 01777
TS SKEEP3 # LAST ADDRESS CHECKED
TC ERASLOOP
2EBANK CA ERASCON6 # 01400
TS SKEEP7 # STARTING ADDRESS
CA ERASCON4 # 01773
TS SKEEP3 # LAST ADDRESS CHECKED
TC ERASLOOP
NOEBANK TS SKEEP2 # +0
CA ERASCON1 # 00061
TS SKEEP7 # STARTING ADDRESS
CA ERASCON2 # 01373
TS SKEEP3 # LAST ADDRESS CHECKED
ERASLOOP INHINT
CA EBANK # STORES C(EBANK)
TS SKEEP4
EXTEND
NDX SKEEP7
DCA 0000
DXCH SKEEP5 # STORES C(X) AND C(X+1) IN SKEEP6 AND 5.
CA SKEEP7
TS ERESTORE # IF RESTART, RESTORE C(X) AND C(X+1)
TS L
INCR L
NDX A
DXCH 0000 # PUTS OWN ADDRESS IN X AND X +1
NDX SKEEP7
CS 0001 # CS X+1
NDX SKEEP7
AD 0000 # AD X
TC -1CHK
CA ERESTORE # HAS ERASABLE BEEN RESTORED
# Page 1399
EXTEND
BZF ELOOPFIN # YES, EXIT ERASLOOP.
EXTEND
NDX SKEEP7
DCS 0000 # COMPLEMENT OF ADDRESS OF X AND X+1
NDX SKEEP7
DXCH 0000 # PUT COMPLEMENT OF ADDRESS OF X AND X+1
NDX SKEEP7
CS 0000 # CS X
NDX SKEEP7
AD 0001 # AD X+1
TC -1CHK
CA ERESTORE # HAS ERASABLE BEEN RESTORED
EXTEND
BZF ELOOPFIN # YES, EXIT ERASLOOP.
EXTEND
DCA SKEEP5
NDX SKEEP7
DXCH 0000 # PUT B(X) AND B(X+1) BACK INTO X AND X+1
CA S+ZERO
TS ERESTORE # IF RESTART, DO NOT RESTORE C(X), C(X+1)
ELOOPFIN RELINT
TC CHECKNJ # CHECK FOR NEW JOB
CA SKEEP4 # REPLACES B(EBANK)
TS EBANK
INCR SKEEP7
CS SKEEP7
AD SKEEP3
EXTEND
BZF +2
TC ERASLOOP # GO TO NEXT ADDRESS IN SAME BANK
CCS SKEEP2
TC NOEBANK
INCR SKEEP2 # PUT +1 IN SKEEP2.
CA EBANK
AD SBIT9
TS EBANK
AD ERASCON5 # 76777, CHECK FOR BANK E2
EXTEND
BZF 2EBANK
CCS EBANK
TC E134567B # GO TO EBANKS 1,3,4,5,6, AND 7
CA ERASCON6 # END OF ERASCHK
TS EBANK
# CNTRCHK PERFORMS A CS OF ALL REGISTERS FROM OCT. 60 THROUGH OCT. 10.
# INCLUDED ARE ALL COUNTERS, T6-1, CYCLE AND SHIFT, AND ALL RUPT REGISTERS
CNTRCHK CA CNTRCON # 00050
CNTRLOOP TS SKEEP2
AD SBIT4 # +10 OCTAL
INDEX A
# Page 1400
CS 0000
CCS SKEEP2
TC CNTRLOOP
# CYCLSHFT CHECKS THE CYCLE AND SHIFT REGISTERS
CYCLSHFT CA CONC+S1 # 25252
TS CYR # C(CYR) = 12525
TS CYL # C(CYL) = 52524
TS SR # C(SR) = 12525
TS EDOP # C(EDOP) = 00125
AD CYR # 37777 C(CYR) = 45252
AD CYL # 00-12524 C(CYL) = 25251
AD SR # 00-25251 C(SR) = 05252
AD EDOP # 00-25376 C(EDOP) = +0
AD CONC+S2 # C(CONC+S2) = 52400
TC -1CHK
AD CYR # 45252
AD CYL # 72523
AD SR # 77775
AD EDOP # 77775
AD S+1 # 77776
TC -1CHK
INCR SCOUNT +1
TC SMODECHK
# SKEEP1 HOLDS SUM
# SKEEP2 HOLDS PRESENT CONTENTS OF ADDRESS IN ROPECHK AND SHOWSUM ROUTINES
# SKEEP2 HOLDS BANK NUMBER IN LOW ORDER BITS DURING SHOWSUM DISPLAY
# SKEEP3 HOLDS PRESENT ADDRESS (00000 TO 01777 IN COMMON FIXED BANKS)
# (04000 TO 07777 IN FXFX BANKS)
# SKEEP3 HOLDS BUGGER WORD DURING SHOWSUM DISPLAY
# SKEEP4 HOLDS BANK NUMBER AND SUPER BANK NUMBER
# SKEEP5 COUNTS 2 SUCCESSIVE TC SELF WORDS
# SKEEP6 CONTROLS ROPECHK OR SHOWSUM OPTION
# SKEEP7 CONTROLS WHEN ROUTINE IS IN COMMON FIXED OR FIXED FIXED BANKS
ROPECHK CA S-ZERO # *
TS SKEEP6 # * -0 FOR ROPECHK
STSHOSUM CA S+ZERO # * SHOULD BE ROPECHK
TS SKEEP4 # BANK NUMBER
CA S+1
COMMFX TS SKEEP7
CA S+ZERO
TS SKEEP1
TS SKEEP3
CA S+1
TS SKEEP5 # COUNTS DOWN 2 TC SELF WORDS
COMADRS CA SKEEP4
TS L # TO SET SUPER BANK
# Page 1401
MASK HI5
AD SKEEP3
TC SUPDACAL # SUPER DATA CALL
TC ADSUM
AD SBIT11 # 02000
TC ADRSCHK
FXFX CS A
TS SKEEP7
EXTEND
BZF +3
CA SBIT12 # 04000, STARTING ADDRESS OF BANK 02
TC +2
CA SBNK03 # 06000, STARTING ADDRESS OF BANK 03
TS SKEEP3
CA S+ZERO
TS SKEEP1
CA S+1
TS SKEEP5 # COUNTS DOWN 2 TC SELF WORDS
FXADRS INDEX SKEEP3
CA 0000
TC ADSUM
TC ADRSCHK
ADSUM TS SKEEP2
AD SKEEP1
TS SKEEP1
CAF S+ZERO
AD SKEEP1
TS SKEEP1
CS SKEEP2
AD SKEEP3
TC Q
ADRSCHK LXCH A
CA SKEEP3
MASK LOW10 # RELATIVE ADDRESS
AD -MAXADRS # SUBTRACT MAX RELATIVE ADDRESS = 1777.
EXTEND
BZF SOPTION # CHECKSUM FINISHED IF LAST ADDRESS.
CCS SKEEP5 # IS CHECKSUM FINISHED
TC +3 # NO
TC +2 # NO
TC SOPTION # GO TO ROPECHK SHOWSUM OPTION
CCS L # -0 MEANS A TC SELF WORD.
TC CONTINU
TC CONTINU
TC CONTINU
CCS SKEEP5
TC CONTINU +1
# Page 1402
CA S-1
TC CONTINU +1 # AD IN THE BUGGER WORD
CONTINU CA S+1 # MAKE SURE TWO CONSECUTIVE TC SELF WORDS
TS SKEEP5
CCS SKEEP6 # *
CCS NEWJOB # * +1, SHOWSUM
TC CHANG1 # *
TC +2 # *
TC CHECKNJ # -0 IN SKEEP6 FOR ROPECHK
ADRS+1 INCR SKEEP3
CCS SKEEP7
TC COMADRS
TC COMADRS
TC FXADRS
TC FXADRS
NXTBNK CS SKEEP4
AD LSTBNKCH # LAST BANK TO BE CHECKED
EXTEND
BZF ENDSUMS # END OF SUMMING OF BANKS.
CA SKEEP4
AD SBIT11
TS SKEEP4 # 37 TO 40 INCRMTS SKEEP4 BY END RND CARRY
TC CHKSUPR
17TO20 CA SBIT15
ADS SKEEP4 # SET FOR BANK 20
TC GONXTBNK
CHKSUPR MASK HI5
EXTEND
BZF NXTSUPR # INCREMENT SUPER BANK
27TO30 AD S13BITS
EXTEND
BZF +2 # BANK SET FOR 30
TC GONXTBNK
CA SIXTY # FIRST SUPER BANK
ADS SKEEP4
TC GONXTBNK
NXTSUPR AD SUPRCON # SET BNK 30 + INCR SUPR BNK AND CANCEL
ADS SKEEP4 # ERC BIT OF THE 37 TO 40 ADVANCE.
GONXTBNK CCS SKEEP7
TC COMMFX
CA S+1
TC FXFX
CA SBIT7 # HAS TO BE LARGER THAN NO OF FXSW BANKS.
TC COMMFX
SOPTION CA SKEEP4
MASK HI5 # = BANK BITS
TC LEFT5
# Page 1403
TS L # BANK NUMBER BEFORE SUPER BANK
CA SKEEP4
MASK S8BITS # = SUPER BANK BITS
EXTEND
BZF SOPT # BEFORE SUPER BANK
TS SR # SUPER BANK NECESSARY
CA L
MASK SEVEN
AD SR
TS L # BANK NUMBER WITH SUPER BANK
SOPT CA SKEEP6 # *
EXTEND # *
BZF +2 # * ON -0 CONTINUE WITH ROPE CHECK.
TC SDISPLAY # * ON +1 GO TO DISPLAY OF SUM.
CCS SKEEP1 # FORCE SUM TO ABSOLUTE VALUE.
TC +2
TC +2
AD S+1
TS SKEEP1
BNKCHK CS L # = - BANK NUMBER
AD SKEEP1
AD S-1
TC -1CHK # CHECK SUM
TC NXTBNK
EBANK= NEWJOB
LSTBNKCH BBCON* # * CONSTANT, LAST BANK.
SBANK= LOWSUPER

511
AGC_BLOCK_TWO_SELF_CHECK.s Normal file
View File

@ -0,0 +1,511 @@
# Copyright: Public domain.
# Filename: AGC_BLOCK_TWO_SELF_CHECK.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Onno Hommes <ohommes@cmu.edu>.
# Website: www.ibiblio.org/apollo.
# Pages: 1284-1293
# Mod history: 2009-05-27 OH Transcribed from page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 1284
# PROGRAM DESCRIPTION DATE: 20 DECEMBER 1967
# PROGRAM NAME -- SELF-CHECK LOG SECTION: AGC BLOCK TWO SELF-CHECK
# MOD NO -- 1 ASSEMBLY SUBROUTINE UTILITYM REV 25
# MOD BY -- GAUNTT
#
# FUNCTIONAL DESCRIPTION
# PROGRAM HAS TWO MAIN PARTS. THE FIRST IS SELF-CHECK WHICH RUNS AS A ZERO PRIORITY JOB WITH NO CORE SET, AS
# PART OF THE BACK-UP IDLE LOOP. THE SECOND IS SHOW-BANKSUM WHICH RUNS AS A REGULAR EXECUTIVE JOB WITH ITS OWN
# STARTING VERB.
#
# THE PURPOSE OF SELF-CHECK IS TO CHECK OUT VARIOUS PARTS OF THE COMPUTER AS OUTLINED BELOW IN THE OPTIONS.
#
# THE PURPOSE OF SHOW-BANKSUM IS TO DISPLAY THE SUM OF EACH BANK, ONE AT A TIME.
#
# IN ALL THERE ARE 7 POSSIBLE OPTIONS IN THIS BLOCK II VERSION OF SELF-CHECK. MORE DETAIL DESCRIPTION MAY BE
# FOUND IN E-2065 BLOCK II AGC SELF-CHECK AND SHOW BANKSUM BY EDWIN D. SMALLY DECEMBER 1966, AND ADDENDA 2 AND 3.
#
# THE DIFFERENT OPTIONS ARE CONTROLLED BY PUTTING DIFFERENT NUMBERS IN THE SMODE REGISTER (NOUN 27). BELOW IS
# A DESCRIPTION OF WHAT PARTS OF THE COMPUTER THAT ARE CHECKED BY THE OPTIONS, AND THE CORRESPONDING NUMBER, IN
# OCTAL, TO LOAD INTO SMODE.
# +-4 ERASABLE MEMORY
# +-5 FIXED MEMORY
# +-1,2,3,6,7,10 EVERYTHING IN OPTIONS 4 AND 5.
# -0 SAME AS +-10 UNTIL AN ERROR IS DETECTED.
# +0 NO CHECK, PUTS COMPUTER INTO THE BACKUP IDLE LOOP.
#
# WARNINGS
# USE OF E MEMORY RESERVED FOR SELF-CHECK (EVEN IN IDLE LOOP) AS TEMP STORAGE BY OTHER PROGRAMS IS DANGEROUS.
# SMODE SET GREATER THAN OCT 10 PUTS COMPUTER INTO BACKUP IDLE LOOP.
#
# CALLING SEQUENCE
# TO CALL SELF-CHECK KEY IN
# V 21 N 27 E OPTION NUMBER E
# TO CALL SHOW-BANKSUM KEY IN
# V 91 E DISPLAYS FIRST BANK
# V 33 E PROCEED, DISPLAYS NEXT BANK
#
# EXIT MODES, NORMAL AND ALARM
# SELF-CHECK NORMALLY CONTINUES INDEFINITELY UNLESS THERE IS AN ERROR DETECTED. IF SO + OPTION NUMBERS PUT
# COMPUTER INTO BACKUP IDLE LOOP, - OPTIONS NUMBERS RESTART THE OPTION.
#
# THE -0 OPTION PROCEEDS FROM THE LINE FOLLOWING THE LINE WHERE THE ERROR WAS DETECTED.
#
# SHOW-BANKSUM PROCEEDS UNTIL A TERMINATE IS KEYED IN (V 34 E). THE COMPUTER IS PUT INTO THE BACKUP IDLE LOOP.
#
# OUTPUT
# Page 1285
# SELF-CHECK UPON DETECTING AN ERROR LOADS THE SELF-CHECK ALARM CONSTANT (01102) INTO THE FAILREG SET AND
# TURNS ON THE ALARM LIGHT. THE OPERATOR MAY THEN DISPLAY THE THREE FAILREGS BY KEYING IN V 05 N 09 E. FOR FURTHER
# INFORMATION HE MAY KEY IN V 05 N 08 E, THE DSKY DISPLAY IN R1 WILL BE ADDRESS+1 OF WHERE THE ERROR WAS DETECTED,
# IN R2 THE BBCON OF SELF-CHECK, AND IN R3 THE TOTAL NUMBER OF ERRORS DETECTED BY SELF-CHECK SINCE THE LAST MAN
# INITIATED FRESH START (SLAP1).
#
# SHOW-BANKSUM STARTING WTIH BANK 0 DISPLAYS IN R1 THE BANK SUM (A +-NUMBER EQUAL TO THE BANK NUMBER), IN R2
# THE BANK NUMBER, AND IN R3 THE BUGGER WORD.
#
# ERASABLE INITIALIZATION REQUIRED
# ACCOMPLISHED BY FRESH START
# SMODE SET TO +0
#
# DEBRIS
# ALL EXITS FROM THE CHECK OF ERASABLE (ERASCHK) RESTORE ORIGINAL CONTENTS TO REGISTERS UNDER CHECK.
# EXCEPTION IS A RESTART. RESTART THAT OCCURS DURING ERASCHK RESTORES ERASABLE, UNLESS THERE IS EVIDENCE TO DOUBT
# E MEMORY, IN WHICH CASE PROGRAM THEN DOES A FRESH START (DOFSTART).
BANK 25
SETLOC SELFCHEC
BANK
COUNT* $$/SELF
SBIT1 EQUALS BIT1
SBIT2 EQUALS BIT2
SBIT3 EQUALS BIT3
SBIT4 EQUALS BIT4
SBIT5 EQUALS BIT5
SBIT6 EQUALS BIT6
SBIT7 EQUALS BIT7
SBIT8 EQUALS BIT8
SBIT9 EQUALS BIT9
SBIT10 EQUALS BIT10
SBIT11 EQUALS BIT11
SBIT12 EQUALS BIT12
SBIT13 EQUALS BIT13
SBIT14 EQUALS BIT14
SBIT15 EQUALS BIT15
S+ZERO EQUALS ZERO
S+1 EQUALS BIT1
S+2 EQUALS BIT2
S+3 EQUALS THREE
S+4 EQUALS FOUR
S+5 EQUALS FIVE
S+6 EQUALS SIX
# Page 1286
S+7 EQUALS SEVEN
S8BITS EQUALS LOW8 # 00377
CNTRCON = OCT50 # USED IN CNTRCHK
ERASCON1 OCTAL 00061 # USED IN ERASCHK
ERASCON2 OCTAL 01373 # USED IN ERASCHK
ERASCON6 = OCT1400 # USED IN ERASCHK
ERASCON3 OCTAL 01461 # USED IN ERASCHK
ERASCON4 OCTAL 01773 # USED IN ERASCHK
S10BITS EQUALS LOW10 # 01777, USED IN ERASCHK
SBNK03 EQUALS PRIO6 # 06000, USED IN ROPECHK
-MAXADRS = HI5 # FOR ROPECHK
SIXTY OCTAL 00060
SUPRCON OCTAL 60017 # USED IN ROPECHK
S13BITS OCTAL 17777
CONC+S1 OCTAL 25252 # USED IN CYCLSHFT
CONC+S2 OCTAL 52400 # USED IN CYCLSHFT
ERASCON5 OCTAL 76777
S-7 = OCT77770
S-4 EQUALS NEG4
S-3 EQUALS NEG3
S-2 EQUALS NEG2
S-1 EQUALS NEGONE
S-ZERO EQUALS NEG0
EBANK= LST1
ADRS1 ADRES SKEEP1
SELFADRS ADRES SELFCHK # SELFCHK RETURN ADDRESS. SHOULD BE PUT
# IN SELFRET WHEN GOING FROM SELFCHK TO
# SHOWSUM AND PUT IN SKEEP1 WHEN GOING
# FROM SHOWSUM TO SELF-CHECK.
PRERRORS CA ERESTORE # IS IT NECESSARY TO RESTORE ERASABLE
EXTEND
BZF ERRORS # NO
EXTEND
DCA SKEEP5
INDEX SKEEP7
DXCH 0000 # RESTORE THE TWO ERASABLE REGISTERS
CA S+ZERO
TS ERESTORE
ERRORS INHINT
CA Q
TS SFAIL # SAVE Q FOR FAILURE LOCATION
TS ALMCADR # FOR DISPLAY WITH BBANK AND ERCOUNT
INCR ERCOUNT # KEEP TRACK OF NUMBER OF MALFUNCTIONS.
TCALARM2 TC ALARM2
OCT 01102 # SELF-CHECK MALFUNCTION INDICATOR
CCS SMODE
SIDLOOP CA S+ZERO
TS SMODE
# Page 1287
TC SELFCHK # GO TO IDLE LOOP
TC SFAIL # CONTINUE WITH SELF-CHECK
-1CHK CCS A
TCF PRERRORS
TCF PRERRORS
CCS A
TCF PRERRORS
TC Q
SMODECHK EXTEND
QXCH SKEEP1
TC CHECKNJ # CHECK FOR NEW JOB
CCS SMODE
TC SOPTIONS
TC SMODECHK +2 # TO BACKUP IDLE LOOP
TC SOPTIONS
INCR SCOUNT
TC SKEEP1 # CONTINUE WITH SELF-CHECK
SOPTIONS AD S-7
EXTEND
BZMF +2 # FOR OPTIONS BELOW NINE.
BNKOPTN TC SIDLOOP # ILLEGAL OPTION. GO TO IDLE LOOP.
INCR SCOUNT # FOR OPTIONS BELOW NINE.
AD S+7
INDEX A
TC SOPTION1
SOPTION1 TC SKEEP1 # WAS TC+TCF
SOPTION2 TC SKEEP1 # WAS IN:OUT1
SOPTION3 TC SKEEP1
SOPTION4 TC ERASCHK
SOPTION5 TC ROPECHK
SOPTION6 TC SKEEP1
SOPTION7 TC SKEEP1
SOPTON10 TC SKEEP1 # CONTINUE WITH SELF-CHECK
CHECKNJ EXTEND
QXCH SELFRET # SAVE RETURN ADDRESS WHILE TESTING NEWJOB
TC POSTJUMP # TO SEE IF ANY JOBS HAVE BECOME ACTIVE.
CADR ADVAN
SELFCHK TC SMODECHK # ** CHARLEY, COME IN HERE
# SKEEP7 HOLDS LOWEST OF TWO ADDRESSES BEING CHECKED.
# SKEEP6 HOLDS B(X+1).
# SKEEP5 HOLDS B(X).
# SKEEP4 HOLDS C(EBANK) DURING ERASLOOP AND CHECKNJ
# SKEEP3 HOLDS LAST ADDRESS BEING CHECKED (HIGHEST ADDRESS).
# Page 1288
# SKEEP2 CONTROLS CHECKING OF NON-SWITCHABLE ERASABLE MEMORY WITH BANK NUMBERS IN EB.
#
# ERASCHK TAKES APPROXIMATELY 7 SECONDS.
ERASCHK CA S+1
TS SKEEP2
0EBANK CA S+ZERO
TS EBANK
CA ERASCON3 # 01461
TS SKEEP7 # STARTING ADDRESS
CA S10BITS # 01777
TS SKEEP3 # LAST ADDRESS CHECKED
TC ERASLOOP
E134567B CA ERASCON6 # 01400
TS SKEEP7 # STARTING ADDRESS
CA S10BITS # 01777
TS SKEEP3 # LAST ADDRESS CHECKED
TC ERASLOOP
2EBANK CA ERASCON6 # 01400
TS SKEEP7 # STARTING ADDRESS
CA ERASCON4 # 01773
TS SKEEP3 # LAST ADDRESS CHECKED
TC ERASLOOP
NOEBANK TS SKEEP2 # +0
CA ERASCON1 # 00061
TS SKEEP7 # STARTING ADDRESS
CA ERASCON2 # 01373
TS SKEEP3 # LAST ADDRESS CHECKED
ERASLOOP INHINT
CA EBANK # STORES C(EBANK)
TS SKEEP4
EXTEND
NDX SKEEP7
DCA 0000
DXCH SKEEP5 # STORES C(X) AND C(X+1) IN SKEEP6 AND 5.
CA SKEEP7
TS ERESTORE # IF RESTART, RESTORE C(X) AND C(X+1)
TS L
INCR L
NDX A
DXCH 0000 # PUTS OWN ADDRESS IN X AND X +1
NDX SKEEP7
CS 0001 # CS X+1
NDX SKEEP7
AD 0000 # AD X
TC -1CHK
CA ERESTORE # HAS ERASABLE BEEN RESTORED
EXTEND
# Page 1289
BZF ELOOPFIN # YES, EXIT ERASLOOP.
EXTEND
NDX SKEEP7
DCS 0000 # COMPLEMENT OF ADDRESS OF X AND X+1
NDX SKEEP7
DXCH 0000 # PUT COMPLEMENT OF ADDRESS OF X AND X+1
NDX SKEEP7
CS 0000 # CS X
NDX SKEEP7
AD 0001 # AD X+1
TC -1CHK
CA ERESTORE # HAS ERASABLE BEEN RESTORED
EXTEND
BZF ELOOPFIN # YES, EXIT ERASLOOP.
EXTEND
DCA SKEEP5
NDX SKEEP7
DXCH 0000 # PUT B(X) AND B(X+1) BACK INTO X AND X+1
CA S+ZERO
TS ERESTORE # IF RESTART, DO NOT RESTORE C(X), C(X+1)
ELOOPFIN RELINT
TC CHECKNJ # CHECK FOR NEW JOB
CA SKEEP4 # REPLACES B(EBANK)
TS EBANK
INCR SKEEP7
CS SKEEP7
AD SKEEP3
EXTEND
BZF +2
TC ERASLOOP # GO TO NEXT ADDRESS IN SAME BANK
CCS SKEEP2
TC NOEBANK
INCR SKEEP2 # PUT +1 IN SKEEP2.
CA EBANK
AD SBIT9
TS EBANK
AD ERASCON5 # 76777, CHECK FOR BANK E2
EXTEND
BZF 2EBANK
CCS EBANK
TC E134567B # GO TO EBANKS 1,3,4,5,6, AND 7
CA ERASCON6 # END OF ERASCHK
TS EBANK
# CNTRCHK PERFORMS A CS OF ALL REGISTERS FROM OCT. 60 THROUGH OCT. 10.
# INCLUDED ARE ALL COUNTERS, T6-1, CYCLE AND SHIFT, AND ALL RUPT REGISTERS
CNTRCHK CA CNTRCON # 00050
CNTRLOOP TS SKEEP2
AD SBIT4 # +10 OCTAL
INDEX A
CS 0000
# Page 1290
CCS SKEEP2
TC CNTRLOOP
# CYCLSHFT CHECKS THE CYCLE AND SHIFT REGISTERS
CYCLSHFT CA CONC+S1 # 25252
TS CYR # C(CYR) = 12525
TS CYL # C(CYL) = 52524
TS SR # C(SR) = 12525
TS EDOP # C(EDOP) = 00125
AD CYR # 37777 C(CYR) = 45252
AD CYL # 00-12524 C(CYL) = 25251
AD SR # 00-25251 C(SR) = 05252
AD EDOP # 00-25376 C(EDOP) = +0
AD CONC+S2 # C(CONC+S2) = 52400
TC -1CHK
AD CYR # 45252
AD CYL # 72523
AD SR # 77775
AD EDOP # 77775
AD S+1 # 77776
TC -1CHK
INCR SCOUNT +1
TC SMODECHK
# SKEEP1 HOLDS SUM
# SKEEP2 HOLDS PRESENT CONTENTS OF ADDRESS IN ROPECHK AND SHOWSUM ROUTINES
# SKEEP2 HOLDS BANK NUMBER IN LOW ORDER BITS DURING SHOWSUM DISPLAY
# SKEEP3 HOLDS PRESENT ADDRESS (00000 TO 01777 IN COMMON FIXED BANKS)
# (04000 TO 07777 IN FXFX BANKS)
# SKEEP3 HOLDS BUGGER WORD DURING SHOWSUM DISPLAY
# SKEEP4 HOLDS BANK NUMBER AND SUPER BANK NUMBER
# SKEEP5 COUNTS 2 SUCCESSIVE TC SELF WORDS
# SKEEP6 CONTROLS ROPECHK OR SHOWSUM OPTION
# SKEEP7 CONTROLS WHEN ROUTINE IS IN COMMON FIXED OR FIXED FIXED BANKS
ROPECHK CA S-ZERO # *
TS SKEEP6 # * -0 FOR ROPECHK
STSHOSUM CA S+ZERO # * SHOULD BE ROPECHK
TS SKEEP4 # BANK NUMBER
CA S+1
COMMFX TS SKEEP7
CA S+ZERO
TS SKEEP1
TS SKEEP3
CA S+1
TS SKEEP5 # COUNTS DOWN 2 TC SELF WORDS
COMADRS CA SKEEP4
TS L # TO SET SUPER BANK
MASK HI5
# Page 1291
AD SKEEP3
TC SUPDACAL # SUPER DATA CALL
TC ADSUM
AD SBIT11 # 02000
TC ADRSCHK
FXFX CS A
TS SKEEP7
EXTEND
BZF +3
CA SBIT12 # 04000, STARTING ADDRESS OF BANK 02
TC +2
CA SBNK03 # 06000, STARTING ADDRESS OF BANK 03
TS SKEEP3
CA S+ZERO
TS SKEEP1
CA S+1
TS SKEEP5 # COUNTS DOWN 2 TC SELF WORDS
FXADRS INDEX SKEEP3
CA 0000
TC ADSUM
TC ADRSCHK
ADSUM TS SKEEP2
AD SKEEP1
TS SKEEP1
CAF S+ZERO
AD SKEEP1
TS SKEEP1
CS SKEEP2
AD SKEEP3
TC Q
ADRSCHK LXCH A
CA SKEEP3
MASK LOW10 # RELATIVE ADDRESS
AD -MAXADRS # SUBTRACT MAX RELATIVE ADDRESS = 1777.
EXTEND
BZF SOPTION # CHECKSUM FINISHED IF LAST ADDRESS.
CCS SKEEP5 # IS CHECKSUM FINISHED
TC +3 # NO
TC +2 # NO
TC SOPTION # GO TO ROPECHK SHOWSUM OPTION
CCS L # -0 MEANS A TC SELF WORD.
TC CONTINU
TC CONTINU
TC CONTINU
CCS SKEEP5
TC CONTINU +1
CA S-1
# Page 1292
TC CONTINU +1 # AD IN THE BUGGER WORD
CONTINU CA S+1 # MAKE SURE TWO CONSECUTIVE TC SELF WORDS
TS SKEEP5
CCS SKEEP6 # *
CCS NEWJOB # * +1, SHOWSUM
TC CHANG1 # *
TC +2 # *
TC CHECKNJ # -0 IN SKEEP6 FOR ROPECHK
ADRS+1 INCR SKEEP3
CCS SKEEP7
TC COMADRS
TC COMADRS
TC FXADRS
TC FXADRS
NXTBNK CS SKEEP4
AD LSTBNKCH # LAST BANK TO BE CHECKED
EXTEND
BZF ENDSUMS # END OF SUMMING OF BANKS.
CA SKEEP4
AD SBIT11
TS SKEEP4 # 37 TO 40 INCRMTS SKEEP4 BY END RND CARRY
TC CHKSUPR
17TO20 CA SBIT15
ADS SKEEP4 # SET FOR BANK 20
TC GONXTBNK
CHKSUPR MASK HI5
EXTEND
BZF NXTSUPR # INCREMENT SUPER BANK
27TO30 AD S13BITS
EXTEND
BZF +2 # BANK SET FOR 30
TC GONXTBNK
CA SIXTY # FIRST SUPER BANK
ADS SKEEP4
TC GONXTBNK
NXTSUPR AD SUPRCON # SET BNK 30 + INCR SUPR BNK AND CANCEL
ADS SKEEP4 # ERC BIT OF TEH 37 TO 40 ADVANCE.
GONXTBNK CCS SKEEP7
TC COMMFX
CA S+1
TC FXFX
CA SBIT7 # HAS TO BE LARGER THAN NO OF FXSW BANKS.
TC COMMFX
SOPTION CA SKEEP4
MASK HI5 # = BANK BITS
TC LEFT5
TS L # BANK NUMBER BEFORE SUPER BANK
# Page 1293
CA SKEEP4
MASK S8BITS # = SUPER BANK BITS
EXTEND
BZF SOPT # BEFORE SUPER BANK
TS SR # SUPER BANK NECESSARY
CA L
MASK SEVEN
AD SR
TS L # BANK NUMBER WITH SUPER BANK
SOPT CA SKEEP6 # *
EXTEND # *
BZF +2 # * ON -0 CONTINUE WITH ROPE CHECK.
TC SDISPLAY # * ON +1 GO TO DISPLAY OF SUM.
CCS SKEEP1 # FORCE SUM TO ABSOLUTE VALUE.
TC +2
TC +2
AD S+1
TS SKEEP1
BNKCHK CS L # = - BANK NUMBER
AD SKEEP1
AD S-1
TC -1CHK # CHECK SUM
TC NXTBNK
EBANK= NEWJOB
LSTBNKCH BBCON* # * CONSTANT, LAST BANK.

229
AGS_INITIALIZATION.s Normal file
View File

@ -0,0 +1,229 @@
# Copyright: Public domain.
# Filename: AGS_INITIALIZATION.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 206-210
# Mod history: 2009-05-19 HG Transcribed from page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 206
# PROGRAM NAME: AGS INITIALIZIZATION (R47)
#
# WRITTEN BY: RHODE/KILROY/FOLLETT
#
# MOD NO.: 0
# DATE: 23 MARCH 1967
# MOD BY: KILROY
#
# MOD NO.: 1
# DATE: 28 OCTOBER 1967
# MOD BY: FOLLETT
#
# FUNCT. DESC.: (1) TO PROVIDE THE AGS ABORT ELECTRONICS ASSEMBLY (AEA) WITH THE LEM AND CSM STATE VECTORS
# (POSITION,VELOCITY,TIME) IN LEM IMU COORDINATES BY MEANS OF THE LGC DIGITAL DOWNLINK.
#
# (2) TO ZERO THE ICDU, LGC, AND AEA GIMBAL ANGLE COUNTER SIMULTANEOUSLY IN ORDER TO ESTABLISH A
# COMMON ZERO REFERENCE FOR THE MEASUREMENT OF GIMBAL (EULER) ANGLES WHICH DEFINE LEM ATTITUDE
#
# (3) TO ESTABLISH THE GROUND ELAPSED TIME OF AEA CLOCK ZERO. (IF AN AEA CLOCK ZERO IS
# REQUESTED DURING THIS PROGRAM
#
# LOG SECTION: AGS INITIALIZATION
#
# CALLING SEQ: PROGRAM IS ENTERED WHEN ASTRONAUT KEYS V47E ON DSKY.
# R47 MAY BE CALLED AT ANY TIME EXCEPT WHEN ANOTHER EXTENDED VERB IS IN PROGRESS
#
# SUBROUTINES
# CALLED:
#
# NORMAL EXIT: ENDEXT
#
# ALARM/ABORT: ALARM -- BAD REFSMMAT -- CODE:220
# OPERATOR ERROR IF V47 SELECTED DURING ANOTHER EXTENDED VERB.
#
# ERASABLES
# USED: SAMPTIME (2) TIME OF :ENTER: KEYSTROKE
# AGSK (2) GROUND ELAPSED TIME OF THE AEA CLOCK :ZERO:
# AGSBUFF (140) CONTAINS AGS INITIALIZATION DATA (SEE :OUTPUT: BELOW)
# AGSWORD (1) PREVIOUS DOWNLIST SAVED HERE
EBANK= AGSBUFF
BANK 40
SETLOC R47
BANK
COUNT* $$/R47
AGSINIT CAF REFSMBIT
MASK FLAGWRD3 # CHECK REFSMFLG.
CCS A
# Page 207
TC REDSPTEM # REFSMMAT IS OK
TC ALARM # REFSMMAT IS BAD
OCT 220
TC ENDEXT
NEWAGS EXTEND
DCA SAMPTIME # TIME OF THE :ENTER: KEYSTROKE
DXCH AGSK # BECOMES NEW AEA CLOCK :ZERO:
REDSPTEM EXTEND
DCA AGSK
DXCH DSPTEMX
AGSDISPK CAF V06N16
TC BANKCALL # R1 = 00XXX. HRS., R2 = 000XX MIN.,
CADR GOMARKF # R3 = 0XX.XX SEC.
TC ENDEXT # TERMINATE RETURN
TC AGSVCALC # PROCEED RETURN
CS BIT6 # IS ENTER VIA A V32
AD MPAC
EXTEND
BZF NEWAGS # YES, USE KEYSTROKE TIME FOR NEW AGSK
EXTEND # NO, NEW AGSK LOADED VIA V25
DCA DSPTEMX # LOADED INTO DSPTEMX BY KEYING
TC REDSPTEM -1 # V25E FOLLOWED BY HRS.,MINS.,SECS.
# DISPLAY THE NEW K.
AGSVCALC TC INTPRET
SET
NODOFLAG # DON'T ALLOW V37
SET EXIT
XDSPFLAG
CAF V06N16
TC BANKCALL
CADR EXDSPRET
TC INTPRET # EXTRAPOLATE LEM AND CSM STATE VECTORS
RTB # TO THE PRESENT TIME
LOADTIME # LOAD MPAC WITH TIME2,TIME1
STCALL TDEC1 # CALCULATE LEM STATE VECTOR
LEMPREC
CALL # CALL ROUTINE TO CONVERT TO SM COORDS AND
SCALEVEC # PROVIDE PROPER SCALING
STODL AGSBUFF # (LEMPREC AND CSMPREC LEAVE TDEC1 IN TAT)
TAT # TAT = TIME TO WHICH RATT1 AND VATT1 ARE
STCALL TDEC1 # COMPUTED (CSEC SINCE CLOCK START B-28).
CSMPREC # CALCULATE CSM STATE VECTOR FOR SAME TIME
CALL
SCALEVEC
# Page 208
STODL AGSBUFF +6
TAT
DSU DDV # CALCULATE AND STORE THE TIME
AGSK
TSCALE
STORE AGSBUFF +12D
EXIT
CAF LAGSLIST
TS DNLSTCOD
CAF 20SEC # DELAY FOR 20 SEC WHILE THE AGS
TC BANKCALL # DOWNLIST IS TRANSMITTED
CADR DELAYJOB
CA AGSWORD
TS DNLSTCOD # RETURN TO THE OLD DOWNLIST
CAF IMUSEBIT
MASK FLAGWRD0 # CHECK IMUSE FLAG.
CCS A
TC AGSEND # IMU IS BEING USED -- DO NOT ZERO
CKSTALL CCS IMUCADR # CHECK FOR IMU USAGE WHICH AVOIDS THE
TCF +3 # IMUSE BIT: I.E., IMU COMPENSATION.
TCF +6 # FREE. GO AHEAD WITH THE IMU ZERO.
TCF +1
+3 CAF TEN # WAIT .1 SEC AND TRY AGAIN.
TC BANKCALL
CADR DELAYJOB
TCF CKSTALL
+6 TC BANKCALL # IMU IS NOT IN USE
CADR IMUZERO # SET IMU ZERO DISCRETE FOR 320 MSECS.
TC BANKCALL # WAIT 3 SEC FOR COUNTERS TO INCREMENT
CADR IMUSTALL
TC AGSEND
AGSEND TC DOWNFLAG # ALLOW V37
ADRES NODOFLAG
CAF V50N16
TC BANKCALL
CADR GOMARK3
TCF ENDEXT
TCF ENDEXT
TC ENDEXT
SCALEVEC VLOAD MXV
VATT1
REFSMMAT
VXSC VSL2
VSCALE
# Page 209
VAD VAD # THIS SECTION ROUNDS THE VECTOR, AND
AGSRND1 # CORRECTS FOR THE FACT THAT THE AGS
AGSRND2 # IS A 2'S COMPLEMENT MACHINE WHILE THE
RTB # LGC IS A 1'S COMPLEMENT MACHINE.
VECSGNAG
STOVL VATT1
RATT1
MXV VXSC
REFSMMAT
RSCALE
VSL8 VAD # AGAIN THIS SECTION ROUNDS. TWO VECTORS
AGSRND1 # ARE ADDED TO DEFEAT ALSIGNAG IN THE
VAD RTB # CASE OF A HIGH-ORDER ZERO COUPLED WITH
AGSRND2 # A LOW ORDER NEGATIVE PART.
VECSGNAG
LXA,1
VATT1
SXA,1 LXA,1
MPAC +1
VATT1 +2
SXA,1 LXA,1
MPAC +4
VATT1 +4
SXA,1 RVQ
MPAC +6
LAGSLIST = ONE
V01N14 VN 0114
V50N00A VN 5000
V00N25 EQUALS OCT31
V06N16 VN 0616
V00N34 EQUALS 34DEC
V50N16 VN 5016
TSCALE 2DEC 100 B-10 # CSEC TO SEC SCALE FACTOR
20SEC DEC 2000
RSCALE 2DEC 3.280839 B-3 # METERS TO FEET SCALE FACTOR
VSCALE 2DEC 3.280839 E2 B-9 # METERS/CS TO FEET/SEC SCALE FACTOR
AGSRND1 2OCT 0000060000
2OCT 0000060000
2OCT 0000060000
AGSRND2 2OCT 0000037777
2OCT 0000037777
S# Page 210
2OCT 0000037777
SBANK= LOWSUPER # FOR SUBSEQUENT LOW 2CADRS.

231
ALARM_AND_ABORT.s Normal file
View File

@ -0,0 +1,231 @@
# Copyright: Public domain.
# Filename: ALARM_AND_ABORT.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 1493-1496
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-07 RSB Adapted from Colossus249 file of the same
# name, and page images. Corrected various
# typos in the transcription of program
# comments, and these should be back-ported
# to Colossus249.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 1483
# THE FOLLOWING SUBROUTINE MAY BE CALLED TO DISPLAY A NON-ABORTIVE ALARM CONDITION. IT MAY BE CALLED
# EITHER IN INTERRUPT OR UNDER EXECUTIVE CONTROL.
#
# THE CALLING SEQUENCE IS AS FOLLOWS:
# TC ALARM
# OCT NNNNN
# # (RETURNS HERE)
BLOCK 02
SETLOC FFTAG7
BANK
EBANK= FAILREG
COUNT 02/ALARM
# ALARM TURNS ON THE PROGRAM ALARM LIGHT, BUT DOES NOT DISPLAY.
ALARM INHINT
CA Q
ALARM2 TS ALMCADR
INDEX Q
CA 0
BORTENT TS L
PRIOENT CA BBANK
+1 EXTEND
ROR SUPERBNK # ADD SUPER BITS.
TS ALMCADR +1
LARMENT CA Q # STORE RETURN FOR ALARM
TS ITEMP1
CA LOC
TS LOCALARM
CA BANKSET
TS BANKALRM
CHKFAIL1 CCS FAILREG # IS ANYTHING IN FAILREG
TCF CHKFAIL2 # YES TRY NEXT REG
LXCH FAILREG
TCF PROGLARM # TURN ALARM LIGHT ON FOR FIRST ALARM
CHKFAIL2 CCS FAILREG +1
TCF FAIL3
LXCH FAILREG +1
TCF MULTEXIT
FAIL3 CA FAILREG +2
# Page 1494
MASK POSMAX
CCS A
TCF MULTFAIL
LXCH FAILREG +2
TCF MULTEXIT
PROGLARM CS DSPTAB +11D
MASK OCT40400
ADS DSPTAB +11D
MULTEXIT XCH ITEMP1 # OBTAIN RETURN ADDRESS IN A
RELINT
INDEX A
TC 1
MULTFAIL CA L
AD BIT15
TS FAILREG +2
TCF MULTEXIT
# PRIOLARM DISPLAYS V05N09 VIA PRIODSPR WITH 3 RETURNS TO THE USER FROM THE ASTRONAUT AT CALL LOC +1,+2,+3 AND
# AN IMMEDIATE RETURN TO THE USER AT CALL LOC +4. EXAMPLE FOLLOWS,
# CAF OCTXX # ALARM CODE
# TC BANKCALL
# CADR PRIOLARM
# ... ...
# ... ...
# ... ... # ASTRONAUT RETURN
# TC PHASCHNG # IMMEDIATE RETURN TO USER. RESTART
# OCT X.1 # PHASE CHANGE FOR PRIO DISPLAY
BANK 10
SETLOC DISPLAYS
BANK
COUNT 10/DSPLA
PRIOLARM INHINT # * * * KEEP IN DISPLAY ROUTINE'S BANK
TS L # SAVE ALARM CODE
CA BUF2 # 2 CADR OF PRIOLARM USER
TS ALMCADR
CA BUF2 +1
TC PRIOENT +1 # * LEAVE L ALONE
-2SEC DEC -200 # *** DON'T MOVE
CAF V05N09
TCF PRIODSPR
# Page 1495
BLOCK 02
SETLOC FFTAG13
BANK
COUNT 02/ALARM
BAILOUT INHINT
CA Q
TS ALMCADR
TC BANKCALL
CADR VAC5STOR
INDEX ALMCADR
CAF 0
TC BORTENT
OCT40400 OCT 40400
INHINT
WHIMPER CA TWO
AD Z
TS BRUPT
RESUME
TC POSTJUMP # RESUME SENDS CONTROL HERE
CADR ENEMA
SETLOC FFTAG7
BANK
P00DOO INHINT
CA Q
TS ALMCADR
TC BANKCALL
CADR VAC5STOR # STORE ERASABLES FOR DEBUGGING PURPOSES.
INDEX ALMCADR
CAF 0
ABORT2 TC BORTENT
OCT77770 OCT 77770 # DON'T MOVE
CA V37FLBIT # IS AVERAGE G ON
MASK FLAGWRD7
CCS A
TC WHIMPER -1 # YES. DON'T DO POODOO. DO BAILOUT.
TC DOWNFLAG
ADRES STATEFLG
TC DOWNFLAG
# Page 1496
ADRES REINTFLG
TC DOWNFLAG
ADRES NODOFLAG
TC BANKCALL
CADR MR.KLEAN
TC WHIMPER
CCSHOLE INHINT
CA Q
TS ALMCADR
TC BANKCALL
CADR VAC5STOR
CA OCT1103
TC ABORT2
OCT1103 OCT 1103
CURTAINS INHINT
CA Q
TC ALARM2
OCT217 OCT 00217
TC ALMCADR # RETURN TO USER
DOALARM EQUALS ENDOFJOB
# CALLING SEQUENCE FOR VARALARM
# CAF (ALARM)
# TC VARALARM
# Page 1486
# VARALARM TURNS ON PROGRAM ALARM LIGHT BUT DOES NOT DISPLAY
VARALARM INHINT
TS L # SAVE USER'S ALARM CODE
CA Q # SAVE USER'S Q
TS ALMCADR
TC PRIOENT
OCT14 OCT 14 # DON'T MOVE
TC ALMCADR # RETURN TO USER
ABORT EQUALS BAILOUT # *** TEMPORARY UNTIL ABORT CALLS OUT

634
ANGLFIND.s Normal file
View File

@ -0,0 +1,634 @@
# Copyright: Public domain.
# Filename: ANGLFIND.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 399-411
# Mod history: 2009-05-09 RSB Adapted from the Colossus249/ file
# of the same name, using Comanche055 page
# images.
# 2009-05-22 RSB In NOGOM2, TC ZEROEROR corrected to
# CADR ZEROEROR.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 399
BANK 15
SETLOC KALCMON1
BANK
EBANK= BCDU
COUNT 22/KALC
KALCMAN3 TC INTPRET
RTB
READCDUK # PICK UP CURRENT CDU ANGLES
STORE BCDU # STORE THE INITIAL S/C ANGLES
AXC,2 TLOAD # COMPUTE THE TRANSFORMATION FROM
MIS # INITIAL S/C AXES TO STABLE MEMBER AXES
BCDU # (MIS)
CALL
CDUTODCM
AXC,2 TLOAD # COMPUTE THE TRANSFORMATION FROM
MFS # FINAL S/C AXES TO STABLE MEMBER AXES
CPHI # (MFS)
CALL
CDUTODCM
SECAD AXC,1 CALL # MIS AND MFS ARRAYS CALCULATED $2
MIS
TRANSPOS
VLOAD
STADR
STOVL TMIS +12D
STADR
STOVL TMIS +6
STADR
STORE TMIS # TMIS = TRANSPOSE(MIS) SCALED BY 2
AXC,1 AXC,2
TMIS
MFS
CALL
MXM3
VLOAD STADR
STOVL MFI +12D
STADR
STOVL MFI +6
STADR
STORE MFI # MFI = TMIS MFS (SCALED BY 4)
SETPD CALL # TRANSPOSE MFI IN PD LIST
18D
TRNSPSPD
VLOAD STADR
STOVL TMFI +12D
STADR
STOVL TMFI +6
# Page 400
STADR
STORE TMFI # TMFI = TRANSPOSE (MFI) SCALED BY 4
# CALCULATE COFSKEW AND MFISYM
DLOAD DSU
TMFI +2
MFI +2
PDDL DSU # CALCULATE COF SCALED BY 2/SIN(AM)
MFI +4
TMFI +4
PDDL DSU
TMFI +10D
MFI +10D
VDEF
STORE COFSKEW # EQUALS MFISKEW
# CALCULATE AM AND PROCEED ACCORDING TO ITS MAGNITUDE
DLOAD DAD
MFI
MFI +16D
DSU DAD
DP1/4TH
MFI +8D
STORE CAM # CAM = (MFI0+MFI4+MFI8-1)/2 HALF-SCALE
ARCCOS
STORE AM # AM=ARCCOS(CAM) (AM SCALED BY 2)
DSU BPL
MINANG
CHECKMAX
EXIT # MANEUVER LESS THAN 0.25 DEG
INHINT # GO DIRECTLY INTO ATTITUDE HOLD
CS ONE # ABOUT COMMANDED ANGLES
TS HOLDFLAG # NOGO WILL STOP ANY RATE AND SET UP FOR A
TC LOADCDUD # GOOD RETURN
TCF NOGO
CHECKMAX DLOAD DSU
AM
MAXANG
BPL VLOAD
ALTCALC # UNIT
COFSKEW # COFSKEW
UNIT
STORE COF # COF IS THE MANEUVER AXIS
GOTO # SEE IF MANEUVER GOES THRU GIMBAL LOCK
LOCSKIRT
ALTCALC VLOAD VAD # IF AM GREATER THAN 170 DEGREES
MFI
# Page 401
TMFI
VSR1
STOVL MFISYM
MFI +6
VAD VSR1
TMFI +6
STOVL MFISYM +6
MFI +12D
VAD VSR1
TMFI +12D
STORE MFISYM +12D # MFISYM=(MFI+TMFI)/2 SCALED BY 4
# CALCULATE COF
DLOAD SR1
CAM
PDDL DSU # PD0 CAM $4
DPHALF
CAM
BOVB PDDL # PD2 1 - CAM $2
SIGNMPAC
MFISYM +16D
DSU DDV
0
2
SQRT PDDL # COFZ = SQRT(MFISYM8-CAM)/(1-CAM)
MFISYM +8D # $ ROOT 2
DSU DDV
0
2
SQRT PDDL # COFY = SQRT(MFISYM4-CAM)/(1-CAM) $ROOT2
MFISYM
DSU DDV
0
2
SQRT VDEF # COFX = SQRT(MFISYM-CAM)/(1-CAM) $ROOT 2
UNIT
STORE COF
# DETERMINE LARGEST COF AND ADJUST ACCORDINGLY
COFMAXGO DLOAD DSU
COF
COF +2
BMN DLOAD # COFY G COFX
COMP12
COF
DSU BMN
COF +4
# Page 402
METHOD3 # COFZ G COFX OR COFY
GOTO
METHOD1 # COFX G COFY OR COFZ
COMP12 DLOAD DSU
COF +2
COF +4
BMN
METHOD3 # COFZ G COFY OR COFX
METHOD2 DLOAD BPL # COFY MAX
COFSKEW +2 # UY
U2POS
VLOAD VCOMP
COF
STORE COF
U2POS DLOAD BPL
MFISYM +2 # UX UY
OKU21
DLOAD DCOMP # SIGN OF UX OPPOSITE TO UY
COF
STORE COF
OKU21 DLOAD BPL
MFISYM +10D # UY UZ
LOCSKIRT
DLOAD DCOMP # SIGN OF UZ OPPOSITE TO UY
COF +4
STORE COF +4
GOTO
LOCSKIRT
METHOD1 DLOAD BPL # COFX MAX
COFSKEW # UX
U1POS
VLOAD VCOMP
COF
STORE COF
U1POS DLOAD BPL
MFISYM +2 # UX UY
OKU12
DLOAD DCOMP
COF +2 # SIGN OF UY OPPOSITE TO UX
STORE COF +2
OKU12 DLOAD BPL
MFISYM +4 # UX UZ
LOCSKIRT
DLOAD DCOMP # SIGN OF UZ OPPOSITE TO UY
COF +4
STORE COF +4
GOTO
LOCSKIRT
METHOD3 DLOAD BPL # COFZ MAX
# Page 403
COFSKEW +4 # UZ
U3POS
VLOAD VCOMP
COF
STORE COF
U3POS DLOAD BPL
MFISYM +4 # UX UZ
OKU31
DLOAD DCOMP
COF # SIGN OF UX OPPOSITE TO UZ
STORE COF
OKU31 DLOAD BPL
MFISYM +10D # UY UZ
LOCSKIRT
DLOAD DCOMP
COF +2 # SIGN OF UY OPPOSITE TO UZ
STORE COF +2
GOTO
LOCSKIRT
# Page 404
# MATRIX OPERATIONS
MXM3 SETPD # MXM3 MULTIPLIES 2 3X3 MATRICES
0 # AND LEAVES RESULT IN PD LIST
DLOAD* PDDL* # ADDRESS OF 1ST MATRIX IN XR1
12D,2 # ADDRESS OF 2ND MATRIX IN XR2
6,2
PDDL* VDEF # DEFINE VECTOR M2(COL 1)
0,2
MXV* PDDL* # M1XM2(COL 1) IN PD
0,1
14D,2
PDDL* PDDL*
8D,2
2,2
VDEF MXV* # DEFINE VECTOR M2(COL 2)
0,1
PDDL* PDDL* # M1XM2(COL2) IN PD
16D,2
10D,2
PDDL* VDEF # DEFINE VECTOR M2(COL 3)
4,2
MXV* PUSH # M1XM2(COL 3) IN PD
0,1
GOTO
TRNSPSPD # REVERSE ROWS AND COLS IN PD AND
# RETURN WITH M1XM2 IN PD LIST
TRANSPOS SETPD VLOAD* # TRANSPOS TRANSPOSES A 3X3 MATRIX
0 # AND LEAVES RESULT IN PD LIST
0,1 # MATRIX ADDRESS IN XR1
PDVL* PDVL*
6,1
12D,1
PUSH # MATRIX IN PD
TRNSPSPD DLOAD PDDL # ENTER WITH MATRIX IN PD LIST
2
6
STODL 2
STADR
STODL 6
4
PDDL
12D
STODL 4
STADR
STODL 12D
10D
PDDL
# Page 405
14D
STODL 10D
STADR
STORE 14D
RVQ # RETURN WITH TRANSPOSED MATRIX IN PD LIST
MINANG DEC .00069375
MAXANG DEC .472222
# GIMBAL LOCK CONSTANTS
# D = MGA CORRESPONDING TO GIMBAL LOCK = 60 DEGREES
# NGL = BUFFER ANGLE (TO AVOID DIVISIONS BY ZERO) = 2 DEGREES
SD DEC .433015 # = SIN(D) $2
K3S1 DEC .86603 # = SIN(D) $2
K4 DEC -.25 # = -COS(D) $2
K4SQ DEC .125 # = COS(D)COS(D) $2
SNGLCD DEC .008725 # = SIN(NGL)COS(D) $2
CNGL DEC .499695 # = COS(NGL) $2
READCDUK INHINT # LOAD T(MPAC) WITH THE CURRENT CDU ANGLES
CA CDUZ
TS MPAC +2
EXTEND
DCA CDUX
RELINT
TCF TLOAD +6
BANK 16
SETLOC KALCMON2
BANK
COUNT* $$/KALC
CDUTODCM AXT,1 SSP # SUBROUTINE TO COMPUTE DIRECTION COSINE
OCT 3 # MATRIX RELATING S/C AXES TO STARLE
S1 # MEMBER AXES FROM 3 CDU ANGLES IN T(MPAC)
OCT 1 # SET XR1, S1, AND PD FOR LOOP
STORE 7
SETPD
0
LOOPSIN SLOAD* RTB
10D,1
CDULOGIC
STORE 10D # LOAD PD WITH 0 SIN(PHI)
SIN PDDL # 2 COS(PHI)
10D # 4 SIN(THETA)
COS PUSH # 6 COS(THETA)
TIX,1 DLOAD # 8 SIN(PSI)
LOOPSIN # 10 COS(PSI)
6
DMP SL1
10D
# Page 406
STORE 0,2
DLOAD
4
DMP PDDL
0 # (PD6 SIN(THETA)SIN(PHI))
6
DMP DMP
8D
2
SL1 BDSU
12D
SL1
STORE 2,2
DLOAD
2
DMP PDDL # (PD7 COS(PHI)SIN(THETA)) SCALED 4
4
6
DMP DMP
8D
0
SL1
DAD SL1
14D
STORE 4,2
DLOAD
8D
STORE 6,2
DLOAD
10D
DMP SL1
2
STORE 8D,2
DLOAD
10D
DMP DCOMP
0
SL1
STORE 10D,2
DLOAD
4
DMP DCOMP
10D
SL1
STORE 12D,2
DLOAD
DMP SL1 # (PUSH UP 7)
8D
PDDL DMP # (PD7 COS(PHI)SIN(THETA)SIN(PSI)) SCALE 4
6
# Page 407
0
DAD SL1 # (PUSH UP 7)
STADR # C7=COS(PHI)SIN(THETA)SIN(PSI)
STORE 14D,2
DLOAD
DMP SL1 # (PUSH UP 6)
8D
PDDL DMP # (PD6 SIN(THETA)SIN(PHI)SIN(PSI)) SCALE 4
6
2
DSU SL1 # (PUSH UP 6)
STADR
STORE 16D,2 # C8=-SIN(THETA)SIN(PHI)SIN(PSI)
RVQ # +COS(THETA)COS(PHI)
ENDOCM EQUALS
BANK 15
SETLOC KALCMON1
BANK
# CALCULATION OF THE MATRIX DEL.......
#
# * * __T *
# DEL = (IDMATRIX)COS(A)+UU (1-COS(A))+UX SIN(A) SCALED 1
#
# _
# WHERE U IS A UNIT VECTOR (DP SCALED 2) ALONG THE AXIS OF ROTATION.
# A IS THE ANGLE OF ROTATION (DP SCALED 2).
# _
# UPON ENTRY THE STARTING ADDRESS OF U IS COF, AND A IS IN MPAC.
COUNT 22/KALC
DELCOMP SETPD PUSH # MPAC CONTAINS THE ANGLE A
0
SIN PDDL # PD0 = SIN(A)
COS PUSH # PD2 = COS(A)
SR2 PDDL # PD2 = COS(A) $8
BDSU BOVB # PD4 = 1-COS(A) $2
DPHALF
SIGNMPAC
# COMPUTE THE DIAGONAL COMPONENTS OF DEL
PDDL
COF
DSQ DMP
4
DAD SL3
# Page 408
2
BOVB
SIGNMPAC
STODL DEL # UX UX(U-COS(A)) +COS(A) $1
COF +2
DSQ DMP
4
DAD SL3
2
BOVB
SIGNMPAC
STODL DEL +8D # UY UY(1-COS(A)) +COS(A) $1
COF +4
DSQ DMP
4
DAD SL3
2
BOVB
SIGNMPAC
STORE DEL +16D # UZ UZ(1-COS(A)) +COS(A) $1
# COMPUTE THE OFF-DIAGONAL TERMS OF DEL
DLOAD DMP
COF
COF +2
DMP SL1
4
PDDL DMP # D6 UX UY (1-COS A) $ 4
COF +4
0
PUSH DAD # D8 UZ SIN A $ 4
6
SL2 BOVB
SIGNMPAC
STODL DEL +6
BDSU SL2
BOVB
SIGNMPAC
STODL DEL +2
COF
DMP DMP
COF +4
4
SL1 PDDL # D6 UX UZ (1-COS A) $ 4
COF +2
DMP PUSH # D8 UY SIN(A)
0
DAD SL2
6
# Page 409
BOVB
SIGNMPAC
STODL DEL +4 # UX UZ (1-COS(A))+UY SIN(A)
BDSU SL2
BOVB
SIGNMPAC
STODL DEL +12D # UX UZ (U-COS(A))-UY SIGN(A)
COF +2
DMP DMP
COF +4
4
SL1 PDDL # D6 UY UZ (1-COS(A)) $ 4
COF
DMP PUSH # D6 UX SIN(A)
0
DAD SL2
6
BOVB
SIGNMPAC
STODL DEL +14D # UY UZ(1-COS(A)) +UX SIN(A)
BDSU SL2
BOVB
SIGNMPAC
STORE DEL +10D # UY UZ(1-COS(A)) -UX SIN(A)
RVQ
# DIRECTION COSINE MATRIX TO CDU ANGLE ROUTINE
# X1 CONTAINS THE COMPLEMENT OF THE STARTING ADDRESS FOR MATRIX (SCALED 2)
# LEAVES CDU ANGLES SCALED 2PI IN V(MPAC)
# COS(MGA) WILL BE LEFT IN S1 (SCALED 1)
#
# THE DIRECTION COSINE MATRIX RELATING S/C AXES TO STABLE MEMBER AXES CAN BE WRITTEN AS ***
#
# C =COS(THETA)COS(PSI)
# 0
#
# C =-COS(THETA)SIN(PSI)COS(PHI)+SIN(THETA)SIN(PHI)
# 1
#
# C =COS(THETA)SIN(PSI)SIN(PHI)+SIN(THETA)COS(PHI)
# 2
#
# C =SIN(PSI)
# 3
#
# C =COS(PSI)COS(PHI)
# 4
#
# C =-COS(PSI)SIN(PHI)
# 5
#
# C =-SIN(THETA)COS(PSI)
# 6
#
# C =SIN(THETA)SIN(PSI)COS(PHI)+COS(THETA)SIN(PHI)
# 7
# Page 410
# C =-SIN(THETA)SIN(PSI)SIN(PHI)+COS(THETA)COS(PHI)
# 8
#
# WHERE PHI = OGA
# THETA = IGA
# PSI = MGA
DCMTOCDU DLOAD* ARCSIN
6,1
PUSH COS # PD +0 PSI
SL1 BOVB
SIGNMPAC
STORE S1
DLOAD* DCOMP
12D,1
DDV ARCSIN
S1
PDDL* BPL # PD +2 THETA
0,1 # MUST CHECK THE SIGN OF COS(THETA)
OKTHETA # TO DETERMINE THE PROPER QUADRANT
DLOAD DCOMP
BPL DAD
SUHALFA
DPHALF
GOTO
CALCPHI
SUHALFA DSU
DPHALF
CALCPHI PUSH
OKTHETA DLOAD* DCOMP
10D,1
DDV ARCSIN
S1
PDDL* BPL # PUSH DOWN PHI
8D,1
OKPHI
DLOAD DCOMP # PUSH UP PHI
BPL DAD
SUHALFAP
DPHALF
GOTO
VECOFANG
SUHALFAP DSU GOTO
DPHALF
VECOFANG
OKPHI DLOAD # PUSH UP PHI
VECOFANG VDEF RVQ
# Page 411
# ROUTINE FOR TERMINATING AUTOMATIC MANEUVERS
NOGOM2 INHINT # THIS LOCATION ACCESSED BY A BZMF NOGO -2
TC BANKCALL
CADR ZEROERROR
NOGO INHINT
TC STOPRATE
# TERMINATE MANEUVER
CAF TWO # NOTE: ALL RETURNS ARE NOW MADE VIA
TC WAITLIST # GOODEND
EBANK= BCDU
2CADR ENDMANU
TCF ENDOFJOB

1069
AOSTASK_AND_AOSJOB.s Normal file

File diff suppressed because it is too large Load Diff

695
AOTMARK.s Normal file
View File

@ -0,0 +1,695 @@
# Copyright: Public domain.
# Filename: AOTMARK.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 244-261
# Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
# from the Luminary131/ file of the same
# name, using Luminary099 page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 244
BANK 12
SETLOC AOTMARK1
BANK
EBANK= XYMARK
COUNT* $$/MARK
AOTMARK INHINT
CCS MARKSTAT # SEE IF AOTMARK BUSY
TC +2 # MARK SYSTEM BUSY -- DO ALARM
TC EXTVBCHK
TC P00DOO
OCT 00105
EXTVBCHK CAF SIX # SEE IF EXT. VERB WORKING
MASK EXTVBACT
CCS A
TCF MKABORT # YES -- ABORT
CAF BIT2 # NO -- DISALLOW SOME EXTENDED VERB ACTION
ADS EXTVBACT # BIT2 RESET IN ENDMARK
MKVAC CCS VAC1USE # LOOK FOR A VAC AREAD -- DO ABORT IF
TCF MKVACFND # NONE AVAILABLE
CCS VAC2USE
TCF MKVACFND
CCS VAC3USE
TCF MKVACFND
CCS VAC4USE
TCF MKVACFND
CCS VAC5USE
TCF MKVACFND
DXCH BUF2
TC BAILOUT1 # ALL VAC AREAS OCCUPIED -- ABORT.
OCT 01207
MKVACFND AD TWO
TS MARKSTAT # STORE VAC ADR IN LOW 9 OF MARKSTAT
CAF ZERO
INDEX MARKSTAT
TS 0 -1 # ZERO IN VACUSE REG TO SHOW VAC OCCUPIED
CAF PRIO15
TC FINDVAC # SET UP JOB FOR GETDAT
EBANK= XYMARK
2CADR GETDAT
RELINT
TCF SWRETURN
# Page 245
MKABORT DXCH BUF2
TC BAILOUT1 # CONFLICT WITH EXTENDED VERB
OCT 01211
MKRELEAS CAF ZERO
XCH MARKSTAT # SET MARKSTAT TO ZERO
MASK LOW9 # PICK UP VAC AREA AOR
CCS A
INDEX A
TS 0 # SHOW MKVAC AREA AVAILABLE
CAF ONE
TC IBNKCALL
CADR GOODEND # GO WAKE UP CALLING JOB
# Page 246
KILLAOT CAF ZERO
TS EXTVBACT # TERMINATE AOTMARK -- ALLOW EXT VERB
TC GOTOP00H
GETDAT CS MARKSTAT # SET BIT12 TO DISCOURAGE MARKRUPT
MASK BIT12 # BIT12 RESET AT GETMARK
ADS MARKSTAT
CAF V01N71 # DISPLAY DETENT AND STAR CODE
TC BANKCALL
CADR GOMARKF
TCF KILLAOT # V34 -- DOES GOTOP00H
TCF DODAT # V33 -- PROCEED -- USE THIS STAR FOR MARKS
ENTERDAT TCF GETDAT # ENTER -- REDISPLAY STAR CODE
DODAT CAF HIGH9 # PICK DETENT CODE FROM BITS7-9 OF AOTCODE
MASK AOTCODE # AND SEE IF CODE 1 TO 6
EXTEND
MP BIT9
TS XYMARK # STORE DETENT
EXTEND
BZMF GETDAT # COAS CALIBRATION CODE - NO GOOD HERE
AD NEG7 # SEE IF DETENT 7 FOR COAS
EXTEND
BZF CODE7
TCF CODE1TO6
CODE7 CAF V06N87* # CODE 7, COAS SIGHTING, GET OPTIC AXIS
TC BANKCALL # AZ AND EL OF SIGHTING DEVICE FROM ASTRO
CADR GOMARKF
TCF KILLAOT # V34 -- DOES GOTOP00H
TCF +2 # PROCEED
TCF CODE7 # ON ENTER, RECYCLE
EXTEND
DCA AZ # PICK UP AZ AND EL IN SP 25 COMP
INDEX FIXLOC
DXCH 8D # STORE IN 8D AND 9D OF LOCAL VAC
CAF ZERO # BACKUP SYSTEM TO BE USED
TCF COASCODE # ZERO APPARENT ROTATION
CODE1TO6 INDEX XYMARK # INDEX AOT POSITION BY DET CODE
CA AOTEL -1
INDEX FIXLOC
TS 9D # STORE ELEVATION IN VAC+9D
INDEX XYMARK # INDEX DET CODE 1,2 OR 3
# Page 247
CA AOTAZ -1
INDEX FIXLOC
TS 8D # STORE AZIMUTH IN VAC +8D
CA AOTAZ +1 # COMPENSATION FOR APPARENT ROTATION OF
EXTEND # AOT FIELD OF VIEW IN LEFT AND RIGHT
INDEX FIXLOC # DETENTS IS STORED IN VAC +10D IN SP
MSU 8D # PRECISION ONE'S COMPLEMENT
COASCODE INDEX FIXLOC
TS 10D # ROT ANGLE
TC INTPRET # COMPUTE X AND Y PLANE VECTORS
# Page 248
# THE OPTAXIS SOBROUTINE COMPUTES THE X AND Y MARK PLANE VECS AND
# ROTATES THEM THRU THE APPARENT FIELD OF VIEW ROTATION UNIQUE TO AOT
# OPTAXIS USES OANB TO COMPUTE THE OPTIC AXIS
#
# INPUT -- AZIMUTH ANGLE IN SINGLE PREC AT CDU SCALE IN 8D OF JOB VAC
# ELEVATION ANGLE IN SINGLE PREC AT CDU SCALE IN 9D OF JOB VAC
# ROTATION ANGLE IN SINGLE PREC IS COMP SCALED BY PI IN 10D OF VAC
#
# OUTPUT -- OPTIC AXIS VEC IN NG COORDS IN SCAXIS
# X-MARK PLANE 1/4VEC IN NB COORDS AT 18D OF JOB VAC
# Y-MARK PLANE 1/4VEC IN NB COORDS AT 12D OF JOB VAC
OPTAXIS CALL # GO COMPUTE OA AN X AND Y PLANE VECS
OANB
SLOAD SR1 # LOAD APP ROTATION IN ONES COMP
10D # RESCALE BY 2PI
PUSH SIN # 1/2SIN(ROT) 0-1
PDDL COS
PUSH VXSC # 1/2COS(ROT) 2-3
18D
PDDL VXSC # 1/4COS(ROT)UYP 4-9
0
24D # 1/4SIN(ROT)UXP
BVSU STADR # UP 4-9
STODL 12D # YPNB=1/4(COS(ROT)UYP-SIN(ROT)UXP)
VXSC PDDL # UP 2-3 UP 0-1 FOR EXCHANGE
24D # 1/4COS(ROT)UXP PUSH 0-5
VXSC VAD # 1/4SIN(ROT)UYP
18D # UP 0-5
STADR
STOVL 18D # XPNB=1/4(COS(ROT)UXP+SIN(ROT)UYP)
LO6ZEROS # INITIALIZE AVE STAR VEC ACCUMULATOR
STORE STARAD +6
EXIT
TCF GETMKS
# Page 249
# THE OANB SUBROUTINE COMPUTES THE OPTIC AXIS OF THE SIGHTING INSTRUMENT
# FROM AZIMUTH AND ELEVATION INPUT FROM THE ASTRONAUT.
#
# INPUT -- AZIMUTH ANGLE IN SINGLE PREC 2'S COMP IN 8D OF JOB VAC
# ELEVATION ANGLE IN SINGLE PREC 2'S COMP IN 9D OF VAC
#
# OUTPUT -- OPTIC AXIS IN NB COORDS. IN SCAXIS
# X-PLANE 1/2VEC IN NB COORDS AT 24D OF VAC
# Y-PLANE 1/2VEC IN NB COORDS AT 18D OF VAC
BANK 05
SETLOC AOTMARK2
BANK
COUNT* $$/MARK
OANB SETPD STQ
0
GCTR # STORE RETURN
SLOAD RTB
9D # PICK UP SP ELV
CDULOGIC
PUSH COS
PDDL SIN # 1/2COS(ELV) PD 0-1
STADR
STODL SCAXIS # OAX=1/2SIN(ELV)
8D
RTB
CDULOGIC
PUSH COS
STORE 20D # STORE UYP(Y) 20-21
PDDL SIN # 1/2COS(AZ) PD 2-3
PUSH DCOMP # PUSH 1/2S IN (AZ) 4-5
STODL 22D # STORE UYP(Z) 22-23
LO6ZEROS
STODL 18D # STORE UYP(X) 18-19
DMP SL1
0
STODL SCAXIS +2 # OAY=1/2COS(ELV)SIN(AZ)
DMP SL1 # UP 2-3
STADR # UP 0-1
STOVL SCAXIS +4 # OAZ=1/2COS(ELV)COS(AZ)
18D # LOAD UYP VEC
VXV UNIT
SCAXIS # UXP VEC=UYP X OA
STORE 24D # STORE UXP
GOTO
GCTR
# Page 250
# SURFSTAR COMPUTES A STAR VECTOR IN SM COORDINAGES FOR LUNAR
# SURFACE ALIGNMENT AND EXITS TO AVEIT TO AVERAGE STAR VECTORS.
#
# GIVEN X-MARK PLANE 1/4 VEC IN NB AT 18D OF LOCAL VAC
# Y-MARK PLANE 1/4 VEC IN NB AT 12D OF LOCAL VAC
# CURSOR SP 2COMP AT POSITION 1 OF INDEXED MARKVAC
# SPIRAL SP 2COMP AT POSITION 3 OF INDEXED MARKVAC
# CDUY,Z,X AT POSITIONS 0,2,4 OF INDEXED MARKVAC
BANK 15
SETLOC P50S
BANK
COUNT* $$/R59
SURFSTAR VLOAD*
0,1 # PUT X-MARK CDUS IN CDUSPOT FOR TRG*NBSM
STORE CDUSPOT
SLOAD* RTB
1,1 # PICK UP YROT
CDULOGIC
STORE 24D # STORE CURSOR FOR SPIRAL COMP (REVS)
BZE
YZCHK # IF YROT ZERO -- SEE IF SROT ZERO
JUSTZY PUSH COS
PDDL SIN # 1/2COS(YROT) 0-1
VXSC PDDL # UP 0-1 1/8SIN(YROT)UXP 0-5
18D
VXSC VSU # UP 0-5
12D # UYP
UNIT VXV
SCAXIS
UNIT PUSH
SLOAD* RTB
3,1 # PICK UP SPIRAL
CDULOGIC
STORE 26D # STORE SPIRAL (REVS)
DSU DAD
24D
ABOUTONE
DMP
DP1/12
STORE 26D # SEP=(360 + SPIRAL -CURSOR)/12
SIN VXSC # UP 0-5
VSL1 PDDL # 1/2SIN(SEP)(UPP X OA) 0-5
26D
COS VXSC
SCAXIS
VSL1 VAD # UP 0-5
JUSTOA UNIT CALL
TRG*NBSM
STCALL 24D # STAR VEC IN SM
AVEIT # GO AVERAGE
# Page 251
ABOUTONE 2DEC .99999999
DP1/12 EQUALS DEG30 # .08333333
BANK 7
SETLOC AOTMARK1
BANK
COUNT* $$/MARK
YZCHK SLOAD* BZE # YROT ZERO AND IF SROT ZERO FORCE STAR
3,1 # ALONG OPTIC AXIS
YSZERO
DLOAD GOTO
24D
JUSTZY # SROT NOT ZERO -- CONTINUE NORMALLY
YSZERO VLOAD GOTO
SCAXIS
JUSTOA
# Page 252
# THE GETMKS ROUTINE INITIALIZES THE SIGHTING MARK PROCEDURE
GETMKS CAF ZERO # INITIALIZE MARK ID REGISTER AND MARK CNT
TS XYMARK
TS MARKCNTR
CAF LOW9 # ZERO BITS10 TO 15 RETAINING MKVAC ADR
MASK MARKSTAT
TS MARKSTAT
CAF MKVB54* # DISPLAY VB54 INITIALLY
PASTIT TC BANKCALL
CADR GOMARK4
TCF KILLAOT # V34 -- DOES GOTOP00H
TCF MARKCHEX # VB33 -- PROCEED, GOT MARKS, COMPUTE LOS
TCF GETDAT # ENTER -- RECYCLE TO V01N71
MARKCHEX CS MARKSTAT # SET BIT12 TO DISCOURAGE MARKRUPT
MASK BIT12
ADS MARKSTAT
MASK LOW9
TS XYMARK # JAM MARK VAC ADR IN XYMARK FOR AVESTAR
CAF ZERO
TS MKDEX # SET MKDEX ZERO FOR LOS VEC CNTR
CA MARKSTAT
MASK PRIO3 # SEE IF LAST MK PART COMPLETE
TS L
CAF PRIO3 # BITS10 AND 11
EXTEND
RXOR LCHAN
EXTEND
BZF AVESTAR # LAST PAIR COMPLETE -- TO COMPUTE LOS
CNTCHK CCS MARKCNTR # NO PAIR SHOWING -- SEE IF PAIR IN HOLD
TCF +2 # PAIR BURIED -- DECREMENT COUNTER
TCF MKALARM # NO PAIR -- ALARM
TS MARKCNTR # STORE DECREMENTED COUNTER
AVESTAR CAF BIT12 # INITIALIZE MKDEX FOR STAR LOS COUNTER
ADS MKDEX # MKDEX WAS INITIALIZED ZERO IN MARKCHEX
CS MARKCNTR
EXTEND
MP SIX # GET C(L) = -6 MARKCNTR
CS XYMARK
AD L # ADD -- MARK VAC ADR SET IN MARKCHEX
INDEX FIXLOC
TS X1 # JAM -- CDU ADR OF X-MARK IN X1
CA FIXLOC # SET PD POINTER TO ZERO
TS PUSHLOC
TC INTPRET
# Page 253
BON VLOAD*
SURFFLAG # IF ON SURFACE COMPUTE VEC AT SURFSTAR
SURFSTAR
1,1 # PUT Y-MARK CDUS IN CDUSPOT FOR TRG*NBSM
STOVL CDUSPOT
12D # LOAD Y-PLANE VECTOR IN NG
CALL
TRG*NBSM # CONVERT IT TO STABLE MEMBER
PUSH VLOAD*
0,1 # PUT X-MARK CDUS IN CDUSPOT FOR TRG*NBSM
STOVL CDUSPOT
18D # LOAD X-PLANE VECTOR IN NB
CALL
TRG*NBSM # CONVERT IT TO STABLE-MEMBER
VXV UNIT # UNIT(XPSM * YPSM)
STADR
STORE 24D
AVEIT SLOAD PDVL # N(NUMBER OF VECS) IN 0-1
MKDEX
24D # LOAD CURRENT VECTOR
VSR3 V/SC
0
STODL 24D # VEC/N
0
DSU DDV
DP1/8 # (N-1)/N
VXSC VAD
STARAD +6 # ADD VEC TO PREVIOUSLY AVERAGED VECTOR
24D # (N-1)/N AVESTVEC + VEC/N
STORE STARAD +6 # AVERAGE STAR VECTOR
STORE STARSAV2
EXIT
CCS MARKCNTR # SEE IF ANOTHER MARK PAIR IN MKVAC
TCF AVESTAR -1 # THERE IS -- GO GET IT -- DECREMENT COUNTER
ENDMARKS CAF FIVE # NO MORE MARKS -- TERMINATE AOTMARK
INHINT
TC WAITLIST
EBANK= XYMARK
2CADR MKRELEAS
TC ENDMARK
MKALARM TC ALARM # NOT A PAIR TO PROCESS -- DO GETMKS
OCT 111
TCF GETMKS
V01N71 VN 171
V06N87* VN 687
# Page 254
# MARKRUPT IS ENTERED FROM INTERRUPT LEAD-INS AND PROCESSES CHANNEL 16
# CAUSED BY X,Y MARK OR MARK REJECT OR BY THE RATE OF DESCENT SWITCH
MARKRUPT TS BANKRUPT
CA CDUY # STORE CDUS AND TIME NOW -- THEN SEE IF
TS ITEMP3 # WE NEED THEM
CA CDUZ
TS ITEMP4
CA CDUX
TS ITEMP5
EXTEND
DCA TIME2
DXCH ITEMP1
XCH Q
TS QRUPT
CAF OCT34 # SEE IF X OR Y MARK OR MKREJECT
EXTEND
RAND NAVKEYIN
CCS A
TCF +2 # ITS A LIVE ONE -- SEE IF ITS WANTED
TCF SOMEKEY # ITS SOME OTHER KEY
CAF BIT12 # ARE WE ASKING FOR A MARK
MASK MARKSTAT
CCS A
TC RESUME # DON'T WANT MARK OR MKREJECT -- DO NOTHING
CCS MARKSTAT # ARE MARKS BEING ACCEPTED
TCF FINDKEY # THEY ARE -- WHICH ONE IS IT
TC ALARM # MARKS NOT BEING ACCEPTED -- DO ALARM
OCT 112
TC RESUME
FINDKEY CAF BIT5 # SEE IF MARK REJECT.
EXTEND
RAND NAVKEYIN
CCS A
TCF MKREJ # IT'S A MARK REJECT
CAF BIT4 # SEE IF Y MARK
EXTEND
RAND NAVKEYIN
CCS A
TCF YMKRUPT # IT'S A Y MARK
CAF BIT3 # SEE IF X MARK
EXTEND
RAND NAVKEYIN
# Page 255
CCS A
TCF XMKRUPT # IT'S A X MARK
SOMEKEY CAF OCT140 # NOT MARK OR MKREJECT -- SEE IF DESCENT BITS
EXTEND
RAND NAVKEYIN
EXTEND
BZF +3 # IF NO BITS
TC POSTJUMP # IF DESCENT BITS
CADR DESCBITS
TC ALARM # NO INBITS IN CHANNEL 16.
OCT 113
TC RESUME
XMKRUPT CAF ZERO
TS RUPTREG1 # SET X MARK STORE INDEX TO ZERO
CAF BIT10
TCF +4
YMKRUPT CAF ONE
TS RUPTREG1 # SET Y MARK STORE INDEX TO ONE
CAF BIT11
TS XYMARK # SET MARK IDENTIFICATION
TC MARKTYPE # SEE IF SURFACE MARK
TCF SURFSTOR # SURFACE MARK -- JUST STORE CDUS
CAF BIT14 # GOT A MARK -- SEE IF MARK PARI MADE
MASK MARKSTAT
EXTEND
BZF VERIFYMK # NOT A PAIR, NORMAL PROCEDURE
CS MARKCNTR # GO A PAIR, SEE IF ANOTHER CAN BE MADE
AD FOUR # IF SO, INCREMENT POINTER, CLEAR BITS 10,11
EXTEND
BZMF 5MKALARM # HAVE FIVE MARK PAIRS -- DON'T ALLOW MARK
INCR MARKCNTR # OK FOR ANOTHER PAIR, INCR POINTER
CS PRIO23 # CLEAR BITS 10,11,14 FOR NEXT PAIR
MASK MARKSTAT
TS MARKSTAT
VERIFYMK CA XYMARK
MASK MARKSTAT
CCS A
TCF +2 # THIS MARK NOT DESIRED
TCF VACSTOR # MARK DESIRED -- STORE CDUS
TC ALARM
OCT 114
TC RESUME # RESUME -- DISPLAY UNCHANGED -- WAIT FOR ACTION
# Page 256
5MKALARM TC ALARM # ATTEMPTING TO MAKE MORE THAN 5 MK PAIRS
OCT 107
TC MARKTYPE # SEE IF SURFACE MARK
TCF DSPV6N79 # IT IS
TC RESUME # DON'T CHANGE DISPLAY -- DO NOTHING
# Page 257
MKREJ TC MARKTYPE # SEE IF SURFACE
TCF SURFREJ # SURFACE -- JUST CHECK MARK COUNTER
CAF PRIO3 # INFLIGHT -- SEE IF MARKS MADE
MASK MARKSTAT
CCS A
TCF REJECT # MARKS MADE -- REJECT ONE
REJALM TC ALARM # NO MARK TO REJECT -- BAD PROCEDURE -- ALARM
OCT 115
TC RESUME # DESIRED ACTION DISPLAYED
REJECT CS PRIO30 # ZERO BIT14, SHOW REJ., SEE IF MARK SINCE
MASK MARKSTAT # LAST REJECT
AD BIT13
XCH MARKSTAT
MASK BIT13
CCS A
TCF REJECT2 # ANOTHER REJECT SET BIT 10+11 TO ZERO
CS XYMARK # MARK MADE SINCE REJECT -- REJECT MARK IN 1D
RENEWMK MASK MARKSTAT
TS MARKSTAT
TCF REMARK # GO REQUEST NEW MARK ACTION
REJECT2 CS PRIO3 # ON SECOND REJECT -- DISPLAY VB53 AGAIN
TCF RENEWMK
SURFREJ CCS MARKCNTR # IF MARK DECREMENT COUNTER
TCF +2
TCF REJALM # NO MARKS TO REJECT -- ALARM
TS MARKCNTR
TC RESUME
# Page 258
# MARKTYPE TESTS TO SEE IF LEM ON LUNAR SURFACE. IF IT IS RETURN TO LOC+1
MARKTYPE CS FLAGWRD8 # SURFFLAG ******** TEMPORARY ******
MASK BIT8
CCS A
INCR Q # IF SURFACE MARK RETURN TO LOC +1
TC Q # IF INFLIGHT MARK RETURN TO LOC +2
SURFSTOR CAF ZERO # FOR SURFACE MARK ZERO MARK KIND INDEX
TS RUPTREG1
CS MARKSTAT # SET BITS10,11 TO SHOW SURFACE MARK
MASK PRIO3 # FOR MARKCHEX
ADS MARKSTAT
VACSTOR CAF LOW9
MASK MARKSTAT # STORE MARK VAC ADR IN RUPTREG2
TS RUPTREG2
EXTEND
DCA ITEMP1 # PICK UP MARKTIME
DXCH TSIGHT # STORE LAST MARK TIME
CA MARKCNTR # 6 X MARKCNTR FOR STORE INDEX
EXTEND
MP SIX
XCH L # GET INDEX FROM LOW ORDER PART
AD RUPTREG2 # SET CDU STORE INDEX TO MARKVAC
ADS RUPTREG1 # INCREMENT VAC PICKUP BY MARK FOR FLIGHT
TS MKDEX # STORE HERE IN CASE OF SURFACE MARK
CA ITEMP3
INDEX RUPTREG1
TS 0 # STORE CDUY
CA ITEMP4
INDEX RUPTREG1
TS 2 # STORE CDUZ
CA ITEMP5
INDEX RUPTREG1
TS 4 # STORE CDUX
TC MARKTYPE # IF SURFACE MARK -- JUST DO SURFJOB
TCF SURFJOB
CAF BIT13 # CLEAR BIT13 TO SHOW MARK MADE
AD XYMARK # SET MARK ID IN MARKSTAT
COM
MASK MARKSTAT
AD XYMARK
TS MARKSTAT
MASK PRIO3 # SEE IF X, Y MARK MADE
TS L
# Page 259
CA PRIO3
EXTEND
RXOR LCHAN
CCS A
TCF REMARK # NOT PAIR YET, DISPLAY MARK ACTION
CS MARKSTAT # MARK PAIR COMPLETE -- SET BIT14
MASK BIT14
ADS MARKSTAT
TCF REMARK # GO DISPLAY V54
# Page 260
REMARK CAF PRIO3 # BITS 10 AND 11
MASK MARKSTAT
EXTEND
MP BIT6 # SHIFT MARK IDS TO BE 0 TO 3 FOR INDEX
TS MKDEX # STORE VERB INDEX
SURFJOB CAF PRIO15
TC NOVAC # ENTER JOB TO CHANGE DISPLAY TO
EBANK= XYMARK # REQUEST NEXT ACTION
2CADR CHANGEVB
TC RESUME
CHANGEVB TC MARKTYPE
TCF DSPV6N79 # SURFACE -- DISPLAY V 06 N 79
INDEX MKDEX # INFLIGHT -- PICK UP MARK VB INDEX
CAF MKVB54
TC PASTIT # PASTE UP NEXT MK VERB DISPLAY
# THE FOUR MKVBS ARE INDEXED -- THEIR ORDER CANNOT BE CHANGED
MKVB54 VN 5471 # MAKE X OR Y MARK
MKVB53 VN 5371 # MAKE Y MARK
MKVB52 VN 5271 # MAKE X MARK
MKVB54* VN 5471 # MAKE X OR Y MARK
DP1/8 2DEC .125
OCT34 OCT 34
V06N71 VN 671
V06N79* VN 679
# Page 261
# ROUTINE TO REQUEST CURSOR AND SPIRAL MEASUREMENTS
COUNT* $$/R59
DSPV6N79 CAF V06N79* # CURSOR -- SPIRAL DISPLAY
TC BANKCALL
CADR GOMARKF
TCF KILLAOT # V34 -- DOES GOTOP00H
TCF SURFEND # V33 -- PROCEED, END MARKING
CAF BIT6 # IF V32(OCT40) IN MPAC DO RECYCLE
MASK MPAC # OTHERWISE IT IS LOAD VB ENTER SO
CCS A # RE-DISPLAY V06N79
TCF SURFAGAN # VB32 -- RECYCLE
TCF DSPV6N79 # ENTER
SURFEND CS BIT14 # SET BIT14 TO SHOW MARK END
MASK MARKSTAT
AD BIT14
TS MARKSTAT
SURFAGAN CA CURSOR
INDEX MKDEX # HOLDS VAC AREA POINTER FOR SURF MARKING
TS 1 # STORE CURSOR SP 2COMP
CA SPIRAL
INDEX MKDEX
TS 3 # STORE SPIRAL
CS MARKSTAT # IF BIT 14 SET -- END MARKING
MASK BIT14
EXTEND
BZF MARKCHEX
CA MARKCNTR # THIS IS RECYCLE -- SEE IF 5 MARKS ALREADY
AD ONE
COM
AD FIVE
EXTEND
BZMF 5MKALARM # CAN'T RECYCLE -- TOO MANY MARKS -- ALARM
INCR MARKCNTR # OF FOR RECYCLE -- INCR COUNTER
TCF GETMKS +3 # GO DISPLAY MARK VB

647
ASCENT_GUIDANCE.s Normal file
View File

@ -0,0 +1,647 @@
# Copyright: Public domain.
# Filename: ASCENT_GUIDNCE.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 843-856
# Mod history: 2009-05-23 HG Transcribed from page images.
# 2009-06-05 RSB Fixed a couple of typos.
# 2009-06-07 RSB Corrected a typo.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 843
BANK 34
SETLOC ASCFILT
BANK
EBANK= DVCNTR
COUNT* $$/ASENT
ATMAG TC PHASCHNG
OCT 00035
TC INTPRET
BON
FLRCS
ASCENT
DLOAD DSU
ABDVCONV
MINABDV
BMN CLEAR
ASCTERM4
SURFFLAG
CLEAR SLOAD
RENDWFLG
BIT3H
DDV EXIT
ABDVCONV
DXCH MPAC
DXCH 1/DV3
DXCH 1/DV2
DXCH 1/DV1
DXCH 1/DV0
TC INTPRET
DLOAD DAD
1/DV0
1/DV1
DAD DAD
1/DV2
1/DV3
DMP DMP
VE
2SEC(9)
SL3 PDDL
TBUP
SR1 DAD
DSU
6SEC(18)
STODL TBUP
VE
SR1 DDV
TBUP
STCALL AT
# Page 844
ASCENT
BIT3H OCT 4
# Page 845
BANK 30
SETLOC ASENT
BANK
COUNT* $$/ASENT
ASCENT VLOAD ABVAL
R
STOVL /R/MAG
ZAXIS1
DOT SL1
V # Z.V = ZDOT*2(-8).
STOVL ZDOT # ZDOT*2(-7)
ZAXIS1
VXV VSL1
UNIT/R/ # Z X UR = LAXIS*2(-2)
STORE LAXIS # LAXIS*2(-1)
DOT SL1
V # L.V = YDOT*2(-8).
STCALL YDOT # YDOT * 2(-7)
YCOMP
VLOAD
GDT1/2 # LOAD GDT1/2*2(-7) M/CS.
V/SC DOT
2SEC(18)
UNIT/R/ # G.UR*2(9) = GR*2(9).
PDVL VXV # STORE IN PDL(0)
UNIT/R/ # LOAD UNIT/R/ *2(-1)
V # UR*2(-1) X V*2(-7) = H/R*2(-8).
VSQ DDV # H(2)/R(2)*2(-16).
/R/MAG # H(2)/R(3)*2(9).
SL1 DAD
STADR
STODL GEFF # GEFF*2(10)m/CS/CS.
ZDOTD
DSU
ZDOT
STORE DZDOT # DZDOT = (ZDOTD - ZDOT) * 2(7) M/CS.
VXSC PDDL
ZAXIS1
YDOTD
DSU
YDOT
STORE DYDOT # DYDOT = (YDOTD - YDOT) *2(7) M/CS.
VXSC PDDL
LAXIS
RDOTD
# Page 846
DSU
RDOT
STORE DRDOT # DRDOT = (RDOTD - RDOT) * 2(7) M/CS.
VXSC VAD
UNIT/R/
VAD VSL1
STADR
STORE VGVECT # VG = (DRDOT)R + (DVDOT)L + (DZDOT)Z.
DLOAD DMP # LOAD TGO
TGO # TGO GEFF
GEFF
VXSC VSL1
UNIT/R/ # TGO GEFF UR
BVSU
VGVECT # COMPENSATED FOR GEFF
STORE VGVECT # STORE FOR DOWNLINK
MXV VSL1 # GET VGBODY FOR N85 DISPLAY
XNBPIP
STOVL VGBODY
VGVECT
ABVAL BOFF # MAGNITUDE OF VGVECT
FLRCS # IF FLRCS=0,D0 NORMAL GUIDANCE
MAINENG
DDV # USE TGO=VG/AT WITH RCS
AT/RCS
STCALL TGO # THIS WILL BE USED ON NEXT CYCLE
ASCTERM2
MAINENG DDV PUSH # VG/VE IN PDL(0) (2)
VE
DMP BDSU # 1 - KT VG/VE
KT1
NEARONE
DMP DMP # TBUP VG(1-KT VG/VE)/VE (0)
TBUP # = TGO
DSU # COMPENSATE FOR TAILOFF
TTO
STORE TGO
SR DCOMP
11D
STODL TTOGO # TGO *2(-28) CS
TGO
BON DSU
IDLEFLAG
T2TEST
4SEC(17) # ( TGO - 4 )*2(-17) CS.
BMN
ENGOFF
T2TEST DLOAD
TGO
DSU BMN # IF TGO - T2 NEG., GO TO CMPONENT
# Page 847
T2A
CMPONENT
DLOAD DSU
TBUP
TGO
DDV CALL # 1- TGO/TBUP
TBUP
LOGSUB
SL PUSH # -L IN PDL(0) (2)
5
BDDV BDSU # -TGO/L*2(-17)
TGO
TBUP # TBUP + TGO/L = D12*2(-17)
PUSH BON # STORE IN PDL(2) (4)
FLPC # IF FLPC = 1, GO TO CONST
NORATES
DLOAD DSU
TGO
T3
BPL SET # FLPC=1
RATES
FLPC
NORATES DLOAD
HI6ZEROS
STORE PRATE # B = 0
STORE YRATE # D = 0
GOTO
CONST # GO TO CONST
RATES DLOAD DSU
TGO
02D # TGO - D12 = D21*2(-17)
PUSH SL1 # IN PDL(4) (6)
BDSU SL3 # (1/2TGO - D21)*2(-13) = E * 2(-13)
TGO # (8)
PDDL DMP # IN PDL(6)
TGO
RDOT # RDOT TGO * 2(-24)
DAD DSU # R + RDOT TGO
/R/MAG # R + RDOT TGO - RCO
RCO # MPAC = -DR *2(-24).
PDDL DMP # -DR IN PDL(8) (10)
DRDOT
04D # D21 DRDOT*2(-24)
DAD SL2 # (D21 DRDOT-DR)*2(-22) (8)
DDV DDV
06D # (D21 DRDOT-DR)/E*2(-9)
TGO
STORE PRATE # B * 2(8)
BMN DLOAD # B>0 NOT PERMITTED
CHKBMAG
#Page 848
HI6ZEROS
STCALL PRATE
PROK
CHKBMAG SR4 DDV # B*2(4)
TBUP # (B / TAU) * 2(21)
DSU BPL
PRLIMIT # ( B / TAU ) = 2(21) MAX.
PROK
DLOAD DMP
PRLIMIT
TBUP # B MAX. * 2(4)
SL4 # BMAX*2(8)
STORE PRATE
PROK DLOAD
TGO
DMP DAD # YDOT TGO
YDOT
Y # Y + YDOT TGO
DSU PDDL # Y + YDOT TGO - YCO
YCO # MPAC = - DY*(-24.) IN PDL(8) (10)
DYDOT
DMP DAD # D21 DYDOT - DY (8)
04D
SL2 DDV # (D21 DYDOT - DY)/E*2(-9)
DDV SETPD # (D21 DYDOT - DY)/E TGO*2(8)
TGO # = D*2(8)
04
STORE YRATE
CONST DLOAD DMP # LOAD B*2(8)
PRATE # B D12*2(-9)
02D
PDDL DDV # D12 B IN PDL(4) (6)
DRDOT # LOAD DRDOT*2(-7)
00D # -DRDOT/L*2(-7)
SR2 DSU # (-DRDOT/L-D12 B)=A*2(-9) (4)
STADR
STODL PCONS
YRATE # D*2(8)
DMP PDDL # D12 D,EXCH WITH -L IN PDL(0) (2,2)
BDDV SR2 # -DYDOT/L*2(-9)
DYDOT
DSU # (-DYDOT/L-D12 D)=C*2(-9)
00D
STORE YCONS
CMPONENT SETPD DLOAD
00D
100CS
DMP
PRATE # B(T-T0)*2(-9)
DAD DDV # (A+B(T-T0))*2(-9)
# Page 849
PCONS # (A+B(T-T0))/TBUP*2(8)
TBUP
SL1 DSU
GEFF # ATR*2(9)
STODL ATR
100CS
DMP DAD
YRATE
YCONS # (C+D(T-T0))*2(-9)
DDV SL1
TBUP
STORE ATY # ATY*2(9)
VXSC PDDL # ATY UY*2(8) (6)
LAXIS
ATR
VXSC VAD
UNIT/R/
VSL1 PUSH # AH*2(9) IN PDL(0) (6)
ABVAL PDDL # AH(2) IN PDL(34)
AT # AHMAG IN PDL(6) (8)
DSQ DSU # (AT(2)-AH(2))*2(18)
34D # =ATP2*2(18)
PDDL PUSH # (12)
AT
DSQ DSU # (AT(2)KR(2)-AH(2))*2(18) (10)
34D # =ATP3*2(18)
BMN DLOAD # IF ATP3 NEG,GO TO NO-ATP
NO-ATP # LOAD ATP2, IF ATP3 POS
8D
SQRT GOTO # ATP*2(9)
AIMER
NO-ATP DLOAD BDDV # KR AT/AH = KH (8)
6D
VXSC # KH AG*2(9)
00D
STODL 00D # STORE NEW AH IN PDL(0)
HI6ZEROS
AIMER SIGN
DZDOT
STORE ATP
VXSC
ZAXIS1 # ATP ZAXIS *2(8).
VSL1 VAD # AT*2(0)
00D
STORE UNFC/2 # WILL BE OVERWRITTEN IF IN VERT. RISE.
SETPD BON
00D
FLPI
P12RET
BON
# Page 850
FLVR
CHECKALT
MAINLINE VLOAD VCOMP
UNIT/R/
STODL UNWC/2
TXO
DSU BPL
PIPTIME
ASCTERM
BON
ROTFLAG
ANG1CHEK
CLRXFLAG CLEAR CLEAR
NOR29FLG # START r29 IN ASCENT PHASE.
XOVINFLG # ALLOW X-AXIS OVERRIDE
ASCTERM EXIT
CA FLAGWRD9
MASK FLRCSBIT
CCS A
TCF ASCTERM3
TC INTPRET
CALL
FINDCDUW -2
ASCTERM1 EXIT
+1 CA FLAGWRD9 # INSURE THAT THE NOUN 63 DISPLAY IS
MASK FLRCSBIT # BYPASSED IF WE ARE IN THE RCS TRIMMING
CCS A # MODE OF OPERATION
TCF ASCTERM3
CA FLAGWRD8 # BYPASS DISPLAYS IF ENGINE FAILURE IS
MASK FLUNDBIT # INDICATED.
CCS A
TCF ASCTERM3
CAF V06N63*
TC BANKCALL
CADR GODSPR
TCF ASCTERM3
ASCTERM2 EXIT
ASCTERM3 TCF ENDOFJOB
ASCTERM4 EXIT
INHINT
TC IBNKCALL # NO GUIDANCE THIS CYCLE -- HENCE ZERO
CADR ZATTEROR # THE DAP COMMANDED ERRORSss.
TCF ASCTERM1 +1
CHECKALT DLOAD DSU
/R/MAG
/LAND/
DSU BMN # IF H LT 25K CHECK Z AXIS ORIENTATION
25KFT
CHECKYAW
# Page 851
EXITVR CLEAR BON
FLVR
ROTFLAG
MAINLINE
DLOAD DAD
PIPTIME
10SECS
STCALL TXO
MAINLINE
EXITVR1 CLRGO
ROTFLAG
EXITVR
SETLOC ASENT1
BANK
COUNT* $$/ASENT
ANG1CHEK VLOAD DOT
UNFC/2
XNBPIP
DSU BPL
COSTHET1
OFFROT
VLOAD DOT
XNBPIP
UNIT/R/
DSU BMN
COSTHET2
KEEPVR1
OFFROT CLRGO
ROTFLAG
CLRXFLAG
BANK 7
SETLOC ASENT2
BANK
COUNT* $$/ASENT
SETXFLAG = CHECKYAW
CHECKYAW SET
XOVINFLG # PROHIBIT X-AXIS OVERRRIDE
DLOAD VXSC
ATY
LAXIS
PDDL VXSC
ATP
ZAXIS1
VAD UNIT
PUSH DOT
# Page 852
YNBPIP
ABS DSU
SIN5DEG
BPL DLOAD
KEEPVR
RDOT
DSU BPL
40FPS
EXITVR1
GOTO
KEEPVR
BANK 5
SETLOC ASENT3
BANK
COUNT* $$/ASENT
SIN5DEG 2DEC 0.08716 B-2
40FPS 2DEC 0.12192 B-7
BANK 14
SETLOC ASENT4
BANK
COUNT* $$/ASENT
KEEPVR VLOAD STADR # RECALL LOSVEC FROM PUSHLIST
STORE UNWC/2
KEEPVR1 VLOAD
UNIT/R/
STCALL UNFC/2
ASCTERM
ENGOFF RTB
LOADTIME
DSU DAD
PIPTIME
TTOGO
DCOMP EXIT
TC TPAGREE # FORCH SIGN AGREEMENT ON MPAC, MPAC +1.
CAF EBANK7
TS EBANK
EBANK= TGO
INHINT
CCS MPAC +1
TCF +3 # C(A) = DT - 1 BIT
TCF +2 # C(A) = 0
CAF ZERO # C(A) = 0
AD BIT1 # C(A) = 1 BIT OR DT.
# Page 853
TS ENGOFFDT
TC TWIDDLE
ADRES ENGOFF1
TC PHASCHNG
OCT 47014
-GENADR ENGOFFDT
EBANK= TGO
2CADR ENGOFF1
TC INTPRET
SET GOTO
IDLEFLAG # DISABLE DELTA-V MONITOR
T2TEST
ENGOFF1 TC IBNKCALL # SHUT OFF THE ENGINE.
CADR ENGINOF2
CAF PRIO17 # SET UP A JOB FOR THE ASCENT GUIDANCE
TC FINDVAC # POSTBURN LOGIC.
EBANK= WHICH
2CADR CUTOFF
TC PHASCHNG
OCT 07024
OCT 17000
EBANK= TGO
2CADR CUTOFF
TCF TASKOVER
CUTOFF TC UPFLAG # SET FLRCS FLAG.
ADRES FLRCS
-5 CAF V16N63
TC BANKCALL
CADR GOFLASH
TCF +3
TCF CUTOFF1
TCF -5
+3 TC POSTJUMP
CADR TERMASC
CUTOFF1 INHINT
TC IBNKCALL # ZERO ATTITUDE ERRORS BEFORE REDUCINT DB.
CADR ZATTEROR
TC IBNKCALL
CADR SETMINDB
TC POSTJUMP
CADR CUTOFF2
# Page 854
V16N63 VN 1663
BANK 30
SETLOC ASENT5
BANK
COUNT* $$/ASENT
CUTOFF2 TC PHASCHNG
OCT 04024
CAF V16N85C
TC BANKCALL
CADR GOFLASH
TCF TERMASC
TCF +2 # PROCEED
TCF CUTOFF2
TERMASC TC PHASCHNG
OCT 04024
INHINT # RESTORE DEADBAND DESIRED BY ASTRONAUT.
TC IBNKCALL
CADR RESTORDB
TC DOWNFLAG # DISALLOW ABORTS AT THIS TIME.
ADRES LETABORT
TCF GOTOP00H
V16N85C VN 1685
BANK 27
SETLOC ASENT1
BANK
COUNT* $$/ASENT
YCOMP VLOAD DOT
UNIT/R/
QAXIS
SL2 DMP
RCO
STORE Y
RVQ
BANK 30
SETLOC ASENT
BANK
# Page 855
100CS EQUALS 2SEC(18)
T2A EQUALS 2SEC(17)
4SEC(17) 2DEC 400 B-17
2SEC(17) 2DEC 200 B-17
T3 2DEC 1000 B-17
6SEC(18) 2DEC 600 B-18
BIT4H OCT 10
2SEC(9) 2DEC 200 B-9
V06N63* VN 0663
V06N76 VN 0676
V06N33A VN 0633
BANK 33
SETLOC ASENT6
BANK
COUNT* $$/ASENT
KT1 2DEC 0.5000
PRLIMIT 2DEC -.0639 # (B/TBUP)MIN=-.1FT.SEC(-3)
MINABDV 2DEC .0356 B-5 # 10 PERCENT BIGGER THAN GRAVITY
1/DV0 = MASS1
# Page 856
# THE LOGARITHM SUBROUTINE
BANK 24
SETLOC FLOGSUB
BANK
# INPUT ..... X IN MPAC
# OUTPUT ..... -LOG(X) IN MPAC
LOGSUB NORM BDSU
MPAC +6
NEARONE
EXIT
TC POLY
DEC 6
2DEC .0000000060
2DEC -.0312514377
2DEC -.0155686771
2DEC -.0112502068
2DEC -.0018545108
2DEC -.0286607906
2DEC .0385598563
2DEC -.0419361902
CAF ZERO
TS MPAC +2
EXTEND
DCA CLOG2/32
DXCH MPAC
DXCH BUF +1
CA MPAC +6
TC SHORTMP
DXCH MPAC +1
DXCH MPAC
DXCH BUF +1
DAS MPAC
TC INTPRET
DCOMP RVQ
CLOG2/32 2DEC .0216608494

File diff suppressed because it is too large Load Diff

1027
ATTITUDE_MANEUVER_ROUTINE.s Normal file

File diff suppressed because it is too large Load Diff

499
AUTOMATIC_MANEUVERS.s Normal file
View File

@ -0,0 +1,499 @@
# Copyright: Public domain.
# Filename: AUTOMATIC_MANEUVERS.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1025-1036
# Mod history: 2009-05-13 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1025
BANK 21
SETLOC DAPS3
BANK
COUNT 21/DAPAM
EBANK= KMPAC
AHFNOROT EXTEND
READ CHAN31
MASK BIT14
EXTEND
BZMF FREECONT
CA RCSFLAGS # SEE IF RATE FILTER HAS BEEN INITIALIZED
MASK BIT14
CCS A # IF SO, PROCEED WITH ATTITUDE CONTROL
TCF REINIT # IF NOT, RECYCLE TO INITIALIZE FILTER
# AUTOMATIC CONTROL YET
EXTEND
READ CHAN31
MASK BIT13
EXTEND
BZMF HOLDFUNC
AUTOCONT CA HOLDFLAG # IF HOLDFLAG IS +, GO TO GRABANG.
EXTEND # OTHERWISE, GO TO ATTHOLD.
BZMF ATTHOLD
TCF GRABANG
# MINIMUM IMPULSE CONTROL
FREECONT CAF ONE
TS HOLDFLAG # RESET HOLDFLAG
# INHIBIT AUTOMATIC STEERING
EXTEND
READ CHAN32
TS L
COM
MASK MANROT
MASK CHANTEMP
LXCH CHANTEMP
TC STICKCHK
INDEX RMANNDX
CA MINTAU # MINTAU +0
TS TAU # +1 +14MS MINIMUM IMPULSE
INDEX PMANNDX # +2 -14MS TIME
CA MINTAU # +3 +0
TS TAU1
INDEX YMANNDX
CA MINTAU
# Page 1026
TS TAU2
TCF T6PROGM
MINTAU DEC 0
DEC 23 # = 14MS
DEC -23 # = -14MS
DEC 0
# Page 1027
# CALCULATION OF ATTITUDE ERRORS:
# _ * _ _ _
# AK = AMGB (CDUX - THETADX) + BIAS
#
# I.E., *AK * * 1 SIN(PSI) 0 ** CDUX - THETADX * *BIAS *
# * * * ** * * *
# *AK1* = * 0 COS(PSI)COS(PHI) SIN(PHI)** CDUY - THETADY * + *BIAS1*
# * * * ** * * *
# *AK2* * 0 -COS(PSI)SIN(PHI) COS(PHI)** CDUZ - THETADZ * *BIAS2*
#
# THE BIASES ARE ADDED ONLY WHILE PERFORMING AUTOMATIC MANEUVERS (ESP KALCMANU) TO PROVIDE ADDITIONAL LEAD
# AND PREVENT OVERSHOOT WHEN STARTING AN AUTOMATIC MANEUVER. NORMALLY THE REQUIRED LEAD IS ONLY 1-2 DEGREES.
# BUT DURING HIGH RATE MANEUVERS IT CAN BE AS MUCH AS 7 DEGREES. THE BIASES ARE COMPUTED BY KALCMANU AND REMAIN
# FIXED UNTIL THE MANEUVER IS COMPLETED AT WHICH TIME THEY ARE RESET TO ZERO.
ATTHOLD CA CDUX
EXTEND
MSU THETADX
TS ERRORX
CA CDUY
EXTEND
MSU THETADY
TS T5TEMP
EXTEND
MP AMGB1
ADS ERRORX
CA T5TEMP
EXTEND
MP AMGB4
TS ERRORY
CA T5TEMP
EXTEND
MP AMGB7
TS ERRORZ
CA CDUZ
EXTEND
MSU THETADZ
TS T5TEMP
EXTEND
MP AMGB5
ADS ERRORY
CA T5TEMP
EXTEND
MP AMGB8
ADS ERRORZ
CS HOLDFLAG
EXTEND
# Page 1028
BZMF JETS
CA BIAS # AD BIASES ONLY IF PERFORMING AUTOMATIC
ADS ERRORX
CA BIAS1
ADS ERRORY
CA BIAS2
ADS ERRORZ
TCF JETS
HOLDFUNC CCS HOLDFLAG
TCF +3
TCF ATTHOLD
TCF +1
GRABANG CAF ZERO # ZERO WBODYS AND BIASES
TS WBODY
TS WBODY +1
TS WBODY1
TS WBODY1 +1
TS WBODY2
TS WBODY2 +1
TS BIAS
TS BIAS1
TS BIAS2
CA RCSFLAGS
MASK OCT16000
EXTEND # IS RATE DAMPING COMPLETED
BZF ENDDAMP # IF SO, GO TO ENDDAMP
CAF ZERO # OTHERWISE, ZERO ERRORS
TS ERRORX
TS ERRORY
TS ERRORZ
TCF JETS
ENDDAMP TS HOLDFLAG # SET HOLDFLAG +0
EXTEND
DCA CDUX # PICK UP CDU ANGLES FOR ATTITUDE HOLD
DXCH THETADX # REFERENCES
CA CDUZ
TS THETADZ
TCF ATTHOLD
# Page 1029
# JET SWITCHING LOGIC AND CALCULATION OF REQUIRED ROTATION COMMANDS
#
# DETERMINE THE LOCATION OF THE RATE ERROR AND THE ATTITUDE ERROR RELATIVE TO THE SWITCHING LOGIC IN THE PHASE
# PLANE.
#
# COMPUTE THE CHANGE IN RATE CORRESPONDING TO THE ATTITUDE ERROR NECESSARY TO DRIVE THE S/C INTO THE
# APPROPRIATE DEADZONE.
#
# .
# R22 RATE . ERROR
# WL+H .
# ********************************* . ***** SWITCH LINES ENCLOSING DEADZONES
# R23 WL * .
# ----------------------------------* . ----- DESIRED RATE LINES
# R23 WL-H - *.
# ****************** - . R20, R21, R22, ETC REGIONS IN PHASE
# * - .* R18 R20 R21 PLANE FOF COMPUTING DESIRED RESPONSE
# * . *
# *- . *
# R22 R24*- R23 . *
# * . *
# * . *
# + -ADB . * AF ATTITUDE
# ........................+--+---------------+--+........................
# AF * . +ADB + ERROR
# * . *
# * . -*
# * . -*
# * . -*
# * . *
# *. - *
# . - *****************
# .*-
# . * --------------------------------
# .
# .
# FIG. 1 PHASE PLANE SWITCHING LOGIC
#
# CONSTANTS FOR JET SWITCHING LOGIC
WLH/SLOP DEC .00463 # = WL+H/SLOPE = .83333 DEG $180
WL-H/SLP DEC .00277 # = WL-H/SLOPE = .5 DEG $180
WLH 2DEC .0011111111 # = WL+H = 0.5 DEG/SEC $450
WLMH 2DEC .0006666666 # = WL-H = 0.3 DEG/SEC $450
WL 2DEC .0008888888 # = WL = 0.4 DEG/SEC $450
# Page 1030
SLOPE2 DEC .32 # = 0.8 DEG/SEC/DEG $450/180
JETS CA ADB
AD FOUR # AF = FLAT REGION = .044 DEG
TS T5TEMP # ADB+AF
CAF TWO
JLOOP TS SPNDX
DOUBLE
TS DPNDX
EXTEND
INDEX A
DCA ADOT
DXCH EDOT
CA HOLDFLAG # HOLDFLAG = +0 MEANS THAT DAP IS IN
EXTEND # ATTITUDE HOLD AND RATE DAMPING IS OVER.
BZF INHOLD # IF THIS IS THE CASE, BYPASS ADDITION
# OF WBODY AND GO TO INHOLD
EXTEND
INDEX DPNDX
DCS WBODY
DAS EDOT # = ADOT-WBODY
INHOLD INDEX SPNDX
CA ERRORX
TS AERR # AERR = BIAS + AK
CCS EDOT
TCF POSVEL
TCF SIGNCK1
TCF NEGVEL
SIGNCK1 CCS EDOT +1
TCF POSVEL
TCF POSVEL
TCF NEGVEL
TCF NEGVEL
POSVEL EXTEND
DCA EDOT
DXCH EDOTVEL
CA T5TEMP
TS ADBVEL # +(ADB+AF)
CA AERR
TS AERRVEL
TC J6.
NEGVEL EXTEND
DCS EDOT
DXCH EDOTVEL
CS T5TEMP
TS ADBVEL # -(ADB+AF)
CS AERR
TS AERRVEL
J6. EXTEND
# Page 1031
SU ADB
AD WLH/SLOP
EXTEND
BZMF J8
CS T5TEMP # (ADB+AF)
AD AERRVEL
EXTEND
BZMF +2
TCF J7
EXTEND
DCS EDOTVEL
EXTEND
DV SLOPE
EXTEND
SU AERRVEL
AD ADB
EXTEND
BZMF J18
TCF J23
J7 CS WL-H/SLP
EXTEND
SU T5TEMP # (ADB+AF)
AD AERRVEL
EXTEND
BZMF J20
TCF J21
J8 EXTEND
DCS WLH
DXCH WTEMP
EXTEND
DCA EDOTVEL
DAS WTEMP
CCS WTEMP
TCF J22
TCF SIGNCK2
TCF NJ22
SIGNCK2 CCS WTEMP +1
TCF J22
TCF J22
TCF NJ22
NJ22 EXTEND
DCA EDOTVEL
EXTEND
DV SLOPE
AD T5TEMP # (ADB+AF)
AD AERRVEL
# Page 1032
CCS A
TCF J23
TCF J23
TCF +2
TCF J23
EXTEND
DCS WLMH # WL - H
DXCH WTEMP
EXTEND
DCA EDOTVEL
DAS WTEMP
CCS WTEMP
TCF J23
TCF SIGNCK3
TCF NJ23
SIGNCK3 CCS WTEMP +1
TCF J23
TCF J23
TCF NJ23
NJ23 CA AERRVEL
AD T5TEMP # (ADB+AF)
AD WL-H/SLP
CCS A
TCF J24
TCF J24
TCF J22
TCF J22
J18 EXTEND
DCS EDOT
DXCH KMPAC
TCF JTIME
J20 CS AERR
AD ADBVEL
EXTEND
MP SLOPE2 # (HYSTERESIS SLOPE)
DXCH KMPAC
EXTEND
DCS EDOT
DAS KMPAC
TCF JTIME
J21 CCS EDOT
TCF JP
TCF SIGNCK4
TCF JN
SIGNCK4 CCS EDOT +1
# Page 1033
TCF JP
TCF JP
TCF JN
JN EXTEND
DCS EDOT
DXCH KMPAC
EXTEND
DCA WL
DAS KMPAC
TCF JTIME
JP EXTEND
DCS EDOT
DXCH KMPAC
EXTEND
DCS WL
DAS KMPAC
TCF JTIME
J22 CCS EDOT
TCF JN
TCF SIGNCK5
TCF JP
SIGNCK5 CCS EDOT +1
TCF JN
TCF JN
TCF JP
TCF JP
J23 INDEX SPNDX
CS BIT13 # RESET RATE DAMPING FLAG
MASK RCSFLAGS # BIT13 FOR ROLL (SPNDX = 0)
TS RCSFLAGS # BIT12 FOR PITCH (SPNDX = 1)
# BIT11 FOR YAW (SPNDX = 2)
INDEX SPNDX
CAF OCT01400 # IS THERE TO BE A FORCED FIRING ON THIS
MASK RCSFLAGS # AXIS
EXTEND
BZF DOJET +2 # NO, GO TO DOJET +2 AND DO NOTHING
TCF J18 # YES, GO TO J18 AND FORCE A FIRING
J24 CS AERR
EXTEND
SU ADBVEL
EXTEND
MP SLOPE2 # (HYSTERESIS SLOPE)
DXCH KMPAC
EXTEND
# Page 1034
DCS EDOT
DAS KMPAC
# Page 1035
# COMPUTE THE JET ON TIME NECESSARY TO ACCOMPLISH THE DESIRED CHANGE IN RATE, I.E.,
#
# T = J/M(DELTA W)
# J
#
# DELTA W = DESIRED CHANGE IN S/C ANGULAR RATE AS DETERMINED BY THE
# SWITCHING LOGIC, AT THIS POINT STORED IN KMPAC.
#
# J/M = S/C INERTIA TO TORQUE RATIO SCALED BY
# (57.3/450)(B24/1600)(1/.8)
# FOR 1 JET OPERATION (M = 700 FT-LB).
# I.E., J/M = J(SLUG-FTFT) x 0.00000085601606
#
# THE CORRESPONDING COMPUTER VARIABLES ESTABLISHED BY
# KEYBOARD ENTRY ARE
# J/M (ROLL)
# J/M1 (PITCH)
# J/M2 (YAW)
#
# T = JET-ON TIME SCALED 16384/1600 SEC
# J
#
# THE COMPUTER VARIABLES ARE
# TAU (ROLL)
# TAU1 (PITCH)
# TAU2 (YAW)
JTIME INDEX SPNDX # PICK UP S/C INERTIA/TORQUE RATIO
CA J/M # SCALED (57.3/450)(B24/1600)
TC SMALLMP # FOR 1-JET OPERATION
CA BIT11
TC SMALLMP
CCS KMPAC
TCF +4
TCF TAUNORM
TCF +4
TCF TAUNORM
CA POSMAX
TCF DOJET
CA NEGMAX
TCF DOJET
TAUNORM CA KMPAC +1
DOJET INDEX SPNDX
TS TAU
CCS SPNDX
TCF JLOOP
TCF T6PROG
# Page 1036
ZEROCMDS CAF ZERO
TS TAU
TS TAU1
TS TAU2
T6PROG EXTEND # WHEN THE ROTATION COMMANDS (TAUS)
DCA JETADDR # HAVE BEEN DETERINED
DXCH T5LOC # RESET T5LOC FOR PHASE3
TCF RESUME
EBANK= KMPAC
JETADDR 2CADR JETSLECT

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
# Copyright: Public domain. # Copyright: Public domain.
# Filename: CM_BODY_ATTITUDE.s # Filename: CM_BODY_ATTITUDE.agc
# Purpose: Part of the source code for Comanche, build 055. It # Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's # is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11. # (CM) Apollo Guidance Computer (AGC), Apollo 11.

1275
CM_ENTRY_DIGITAL_AUTOPILOT.s Normal file

File diff suppressed because it is too large Load Diff

1922
CONIC_SUBROUTINES.s Normal file

File diff suppressed because it is too large Load Diff

73
CONTRACT_AND_APPROVALS.s Normal file
View File

@ -0,0 +1,73 @@
# Copyright: Public domain.
# Filename: CONTRACT_AND_APPROVALS.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Mod history: 2009-05-06 RSB Transcribed from page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
# Page 1
#************************************************************************
# *
# THIS AGC PROGRAM SHALL ALSO BE REFERRED TO AS: *
# *
# *
# COLOSSUS 2A *
# *
# *
# THIS PROGRAM IS INTENDED FOR USE IN THE CM AS SPECIFIED *
# IN REPORT R-577. THIS PROGRAM WAS PREPARED UNDER DSR *
# PROJECT 55-23870, SPONSORED BY THE MANNED SPACECRAFT *
# CENTER OF THE NATIONAL AERONAUTICS AND SPACE *
# ADMINISTRATION THROUGH CONTRACT NAS 9-4065 WITH THE *
# INSTRUMENTATION LABORATORY, MASSACHUSETTS INSTITUTE OF *
# TECHNOLOGY, CAMBRIDGE, MASS. *
# *
#************************************************************************
# SUBMITTED: MARGARET H. HAMILTON DATE: 28 MAR 69
# M.H.HAMILTON, COLOSSUS PROGRAMMING LEADER
# APOLLO GUIDANCE AND NAVIGATION
# APPROVED: DANIEL J. LICKLY DATE: 28 MAR 69
# D.J.LICKLY, DIRECTOR, MISSION PROGRAM DEVELOPMENT
# APOLLO GUIDANCE AND NAVIGATION PROGRAM
# APPROVED: FRED H. MARTIN DATE: 28 MAR 69
# FRED H. MARTIN, COLOSSUS PROJECT MANAGER
# APOLLO GUIDANCE AND NAVIGATION PROGRAM
# APPROVED: NORMAN E. SEARS DATE: 28 MAR 69
# N.E. SEARS, DIRECTOR, MISSION DEVELOPMENT
# APOLLO GUIDANCE AND NAVIGATION PROGRAM
# APPROVED: RICHARD H. BATTIN DATE: 28 MAR 69
# R.H. BATTIN, DIRECTOR, MISSION DEVELOPMENT
# APOLLO GUIDANCE AND NAVIGATION PROGRAM
# APPROVED: DAVID G. HOAG DATE: 28 MAR 69
# D.G. HOAG, DIRECTOR
# APOLLO GUIDANCE AND NAVIGATION PROGRAM
# APPROVED: RALPH R. RAGAN DATE: 28 MAR 69
# R.R. RAGAN, DEPUTY DIRECTOR
# INSTRUMENTATION LABORATORY

558
CONTROLLED_CONSTANTS.s Normal file
View File

@ -0,0 +1,558 @@
# Copyright: Public domain.
# Filename: CONTROLLED_CONSTANTS.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
#
# Assembler: yaYUL
# Contact: Jim Lawton <jim.lawton@gmail.com>
# Website: www.ibiblio.org/apollo.
# Pages: 038-053
# Mod history: 2009-05-16 JVL Transcribed from page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-061
# 16:27 JULY 14, 1969
# Page 38
# DPS AND APS ENGINE PARAMETERS
SETLOC P40S
BANK
COUNT* $$/P40
# *** THE ORDER OF THE FOLLOWING SIX CONSTANTS MUST NOT BE CHANGED ***
FDPS 2DEC 4.3670 B-7 # 9817.5 LBS FORCE IN NEWTONS
MDOTDPS 2DEC 0.1480 B-3 # 32.62 LBS/SEC IN KGS/CS
DTDECAY 2DEC -38
FAPS 2DEC 1.5569 B-7 # 3500 LBS FORCE IN NEWTONS
MDOTAPS 2DEC 0.05135 B-3 # 11.32 LBS/SEC IN KGS/CS
ATDECAY 2DEC -10
# ********************************************************************
FRCS4 2DEC 0.17792 B-7 # 400 LBS FORCE IN NEWTONS
FRCS2 2DEC 0.08896 B-7 # 200 LBS FORCE IN NEWTONS
SETLOC P40S1
BANK
COUNT* $$/P40
# *** APS IMPULSE DATA FOR P42 ***************************************
K1VAL 2DEC 124.55 B-23 # 2800 LB-SEC
K2VAL 2DEC 31.138 B-24 # 700 LB-SEC
K3VAL 2DEC 1.5569 B-10 # FAPS (3500 LBS THRUST)
# ********************************************************************
S40.136 2DEC .4671 B-9 # .4671 M NEWTONS (DPS)
S40.136_ 2DEC .4671 B+1 # S40.136 SHIFTED LEFT 10.
SETLOC ASENT1
BANK
COUNT* $$/P70
(1/DV)A 2DEC 15.20 B-7 # 2 SECONDS WORTH OF INITIAL ASCENT
# Page 39
# STAGE ACCELERATION -- INVERTED (M/CS)
# 1) PREDICATED ON A LIFTOFF MASS OF
# 4869.9 KG (SNA-8-D-027 7/11/68)
# 2) PREDICATED ON A CONTRIBUTION TO VEH-
# ICLE ACCELERATION FROM RCS THRUSTERS
# EQUIV. TO 1 JET ON CONTINUOUSLY.
K(1/DV) 2DEC 436.70 B-9 # DPS ENGINE THRUST IN NEWTONS / 100 CS.
(AT)A 2DEC 3.2883 E-4 B9 # INITIAL ASC. STG. ACCELERATION ** M/CS.
# ASSUMPTIONS SAME AS FOR (1/DV)A.
(TBUP)A 2DEC 91902 B-17 # ESTIMATED BURN-UP TIME OF THE ASCENT STG.
# ASSUMPTIONS SAME AS FOR (1/DV)A WITH THE
# ADDITIONAL ASSUMPTION THAT NET MASS-FLOW
# RATE = 5.299 KG/SEC = 5.135 (APS) +
# .164 (1 RCS JET).
SETLOC ASENT
BANK
COUNT* $$/ASENT
AT/RCS 2DEC .0000785 B+10 # 4 JETS IN A DRY LEM
SETLOC SERVICES
BANK
COUNT* $$/SERV
# *** THE ORDER OF THE FOLLOWING TWO CONSTANTS MUST NOT BE CHANGED *******
APSVEX DEC -3030 E-2 B-5 # 9942 FT/SEC IN M/CS.
DPSVEX DEC* -2.95588868 E+1 B-05* # VE (DPS) +2.95588868E+ 3
# ************************************************************************
SETLOC F2DPS*31
BANK
COUNT* $$/F2DPS
TRIMACCL 2DEC* +3.50132708 E-5 B+08* # A (T) +3.50132708E- 1
# Page 40
# THROTTLING AND THRUST DETECTION PARAMETERS
SETLOC P40S
BANK
COUNT* $$/P40
THRESH1 DEC 24
THRESH3 DEC 12
HIRTHROT = BIT13
SETLOC FFTAG5
BANK
COUNT* $$/P40
THRESH2 DEC 308
SETLOC FTHROT
BANK
COUNT* $$/THROT
FMAXODD DEC +3841 # FSAT +4.81454413 E+4
FMAXPOS DEC +3467 # FMAX +4.34546769 E+4
THROTLAG DEC +20 # TAU (TH) +1.99999999 E-1
SCALEFAC 2DEC* +7.97959872 E+2 B-16* # BITPERF +7.97959872 E-2
SETLOC F2DPS*32
BANK
COUNT* $$/F2DPS
DPSTHRSH DEC 36 # (THRESH1 + THRESH3 FOR P63)
# Page 41
# LM HARDWARE-RELATED PARAMETERS
SETLOC RADARUPT
BANK
COUNT* $$/RRUPT
LVELBIAS DEC -12288 # LANDING RADAR BIAS FOR 153.6 KC.
RDOTBIAS 2DEC 17000 # BIAS COUNT FOR RR RANGE RATE.
SETLOC LRS22
BANK
COUNT* $$/LRS22
RDOTCONV 2DEC -.0019135344 B7 # CONVERTS RR RDOT READING TO M/CS AT 2(7)
RANGCONV 2DEC 2.859024 B-3 # CONVERTS RR RANGE READING TO M. AT 2(-29
SETLOC SERVICES
BANK
COUNT* $$/SERV
HBEAMANT 2DEC -.4687018041 # RANGE BEAM IN LR ANTENNA COORDINATES.
2DEC 0
2DEC -.1741224271
HSCAL 2DEC -.3288792 # SCALES 1.079 FT/BIT TO 2(22)M.
# ***** THE SEQUENCE OF THE FOLLOWING CONSTANTS MUST BE PRESERVED *********
VZSCAL 2DEC +.5410829105 # SCALES .8668 FT/SEC/BIT TO 2(18) M/CS.
VYSCAL 2DEC +.7565672446 # SCALES 1.212 FT/SEC/BIT TO 2(18) M/CS.
VXSCAL 2DEC -.4020043770 # SCALES -.644 FT/SEC/BIT TO 2(18) M/CS.
# *************************************************************************
KPIP DEC .0512 # SCALES DELV TO UNITS OF 2(5) M/CS.
KPIP1 2DEC .0128 # SCALES DELV TO UNITS OF 2(7) M/CS.
KPIP2 2DEC .0064 # SCALES DELV TO UNITS OF 2(8) M/CS.
# Page 42
ALTCONV 2DEC 1.399078846 B-4 # CONVERTS M*2(-24) TO BIT UNITS *2(-28).
ARCONV1 2DEC 656.167979 B-10 # CONV. ALTRATE COMP. TO BIT UNITS<
SETLOC R10
BANK
COUNT* $$/R10
ARCONV OCT 24402 # 656.1679798B-10 CONV ALTRATE TO BIT UNIT
ARTOA DEC .1066098 B-1 # .25/2.345 B-1 4X/SEC CYCLE RATE.
ARTOA2 DEC .0021322 B8 # (.5)/(2.345)(100)
VELCONV OCT 22316 # 588.914 B-10 CONV VEL. TO BIT UNITS.
KPIP1(5) DEC .0512 # SCALES DELV TO M/CS*2(-5).
MAXVBITS OCT 00547 # MAX. DISPLAYED VELOCITY 199.9989 FT/SEC.
SETLOC DAPS3
BANK
COUNT* $$/DAPAO
TORKJET1 DEC .03757 # 550 / .2 SCALED AT (+16) 64 / 180
# Page 43
# PARAMETERS RELATING TO MASS, INERTIA, AND VEHICLE DIMENSIONS
SETLOC FRANDRES
BANK
COUNT* $$/START
FULLAPS DEC 5050 B-16 # NOMINAL FULL ASCENT MASS -- 2(16) KG.
SETLOC LOADDAP1
BANK
COUNT* $$/R03
MINLMD DEC -2850 B-16 # MIN. DESCENT STAGE MASS -- 2(16) KG.
MINMINLM DEC -2200 B-16 # MIN ASCENT STAGE MASS -- 2(16) KG.
MINCSM = BIT11 # MIN CSM MASS (OK FOR 1/ACCS) = 9050 LB
SETLOC DAPS3
BANK
COUNT* $$/DAPAD
LOASCENT DEC 2200 B-16 # MIN ASCENT LEM MASS -- 2(16) KG.
HIDESCNT DEC 15300 B-16 # MAX DESCENT LEM MASS -- 2(16) KG.
LODESCNT DEC 1750 B-16 # MIN DESCENT STAGE (ALONE) -- 2(16) KG.
# Page 44
# PHYSICAL CONSTANTS ( TIME - INVARIANT )
SETLOC IMU2
BANK
COUNT* $$/P07
OMEG/MS 2DEC .24339048
SETLOC R30LOC
BANK
COUNT* $$/R30
# *** THE ORDER OF THE FOLLOWING TWO CONSTANTS MUST BE PRESERVED ***********
1/RTMUM 2DEC* .45162595 E-4 B14*
1/RTMUE 2DEC* .50087529 E-5 B17*
# **************************************************************************
SETLOC P40S1
BANK
COUNT* $$/S40.9
EARTHMU 2DEC* -3.986032 E10 B-36* # M(3)/CS(2)
SETLOC ASENT1
BANK
COUNT* $$/P12
MUM(-37) 2DEC* 4.9027780 E8 B-37*
MOONRATE 2DEC* .26616994890062991 E-7 B+19* # RAD/CS.
SETLOC SERVICES
BANK
COUNT* $$/SERV
# *** THE ORDER OF THE FOLLOWING TWO CONSTANTS MUST BE PRESERVED ***********
-MUDT 2DEC* -7.9720645 E+12 B-44*
-MUDT1 2DEC* -9.8055560 E+10 B-44*
# **************************************************************************
-MUDTMUN 2DEC* -9.8055560 E+10 B-38*
RESQ 2DEC* 40.6809913 E12 B-58*
# Page 45
20J 2DEC 3.24692010 E-2
2J 2DEC 3.24692010 E-3
SETLOC P50S1
BANK
COUNT* $$/LOSAM
RSUBEM 2DEC 384402000 B-29
RSUBM 2DEC 1738090 B-29
RSUBE 2DEC 6378166 B-29
ROE 2DEC .00257125
SETLOC CONICS1
BANK
COUNT* $$/LT-LG
ERAD 2DEC 6373338 B-29 # PAD RADIUS
504RM 2DEC 1738090 B-29 # METERS B-29 (EQUATORIAL MOON RADIUS)
SETLOC CONICS1
BANK
COUNT* $$/CONIC
# *** THE ORDER OF THE FOLLOWING CONSTANTS MUST BE PRESERVED **************
MUTABLE 2DEC* 3.986032 E10 B-36* # MUE
2DEC* .25087606 E-10 B+34* # 1/MUE
2DEC* 1.99650495 E5 B-18* # SQRT(MUE)
2DEC* .50087529 E-5 B+17* # 1/SQRT(MUE)
2DEC* 4.902778 E8 B-30* # MUM
2DEC* .203966 E-8 B+28* # 1/MUM
2DEC* 2.21422176 E4 B-15* # SQRT(MUM)
2DEC* .45162595 E-4 B+14* # 1/SQRT(MUM)
# *************************************************************************
# Page 46
SETLOC INTINIT
BANK
COUNT* $$/INTIN
OMEGMOON 2DEC* 2.66169947 E-8 B+23*
SETLOC ORBITAL2
BANK
COUNT* $$/ORBIT
# *** THE ORDER OF THE FOLLOWING CONSTANTS MUST NOT BE CHANGED ************
2DEC* 1.32715445 E16 B-54*
MUM 2DEC* 4.9027780 E8 B-30*
MUEARTH 2DEC* 3.986032 E10 B-36*
2DEC 0
J4REQ/J3 2DEC* .4991607391 E7 B-26*
2DEC -176236.02 B-25
2J3RE/J2 2DEC* -.1355426363 E5 B-27*
2DEC* .3067493316 E18 B-60*
J2REQSQ 2DEC* 1.75501139 E21 B-72*
3J22R2MU 2DEC* 9.20479048 E16 B-58*
# *************************************************************************
SETLOC TOF-FF1
BANK
COUNT* $$/TFF
1/RTMU 2DEC* .5005750271 E-5 B17* # MODIFIED EARTH MU
SETLOC SBAND
BANK
COUNT* $$/R05
REMDIST 2DEC 384402000 B-29 # MEAN DISTANCE BETWEEN EARTH AND MOON.
# Page 47
# PHYSICAL CONSTANTS (TIME - VARIANT)
SETLOC STARTAB
BANK
COUNT* $$/STARS
2DEC +.8342971408 B-1 # STAR 37 X
2DEC -.2392481515 B-1 # STAR 37 Y
2DEC -.4966976975 B-1 # STAR 37 Z
2DEC +.8139832631 B-1 # STAR 36 X
2DEC -.5557243189 B-1 # STAR 36 Y
2DEC +.1691204557 B-1 # STAR 36 Z
2DEC +.4541086270 B-1 # STAR 35 X
2DEC -.5392368197 B-1 # STAR 35 Y
2DEC +.7092312789 B-1 # STAR 35 Z
2DEC +.3201817378 B-1 # STAR 34 X
2DEC -.4436021946 B-1 # STAR 34 Y
2DEC -.8370786986 B-1 # STAR 34 Z
2DEC +.5520184464 B-1 # STAR 33 X
2DEC -.7933187400 B-1 # STAR 33 Y
2DEC -.2567508745 B-1 # STAR 33 Z
2DEC +.4537196908 B-1 # STAR 32 X
2DEC -.8779508801 B-1 # STAR 32 Y
2DEC +.1527766153 B-1 # STAR 32 Z
2DEC +.2069525789 B-1 # STAR 31 X
2DEC -.8719885748 B-1 # STAR 31 Y
2DEC -.4436288486 B-1 # STAR 31 Z
2DEC +.1217293692 B-1 # STAR 30 X
2DEC -.7702732847 B-1 # STAR 30 Y
# Page 48
2DEC +.6259880410 B-1 # STAR 30 Z
2DEC -.1124304773 B-1 # STAR 29 X
2DEC -.9694934200 B-1 # STAR 29 Y
2DEC +.2178116072 B-1 # STAR 29 Z
2DEC -.1146237858 B-1 # STAR 28 X
2DEC -.3399692557 B-1 # STAR 28 Y
2DEC -.9334250333 B-1 # STAR 28 Z
2DEC -.3516499609 B-1 # STAR 27 X
2DEC -.8240752703 B-1 # STAR 27 Y
2DEC -.4441196390 B-1 # STAR 27 Z
2DEC -.5326876930 B-1 # STAR 26 X
2DEC -.7160644554 B-1 # STAR 26 Y
2DEC +.4511047742 B-1 # STAR 26 Z
2DEC -.7861763936 B-1 # STAR 25 X
2DEC -.5217996305 B-1 # STAR 25 Y
2DEC +.3311371675 B-1 # STAR 25 Z
2DEC -.6898393233 B-1 # STAR 24 X
2DEC -.4182330640 B-1 # STAR 24 Y
2DEC -.5909338474 B-1 # STAR 24 Z
2DEC -.5812035376 B-1 # STAR 23 X
2DEC -.2909171294 B-1 # STAR 23 Y
2DEC +.7599800468 B-1 # STAR 23 Z
2DEC -.9170097662 B-1 # STAR 22 X
2DEC -.3502146628 B-1 # STAR 22 Y
2DEC -.1908999176 B-1 # STAR 22 Z
# Page 49
2DEC -.4523440203 B-1 # STAR 21 X
2DEC -.0493710140 B-1 # STAR 21 Y
2DEC -.8904759346 B-1 # STAR 21 Z
2DEC -.9525211695 B-1 # STAR 20 X
2DEC -.0593434796 B-1 # STAR 20 Y
2DEC -.2986331746 B-1 # STAR 20 Z
2DEC -.9656605484 B-1 # STAR 19 X
2DEC +.0525933156 B-1 # STAR 19 Y
2DEC +.2544280809 B-1 # STAR 19 Z
2DEC -.8608205219 B-1 # STAR 18 X
2DEC +.4636213989 B-1 # STAR 18 Y
2DEC +.2098647835 B-1 # STAR 18 Z
2DEC -.7742591356 B-1 # STAR 17 X
2DEC +.6152504197 B-1 # STAR 17 Y
2DEC -.1482892839 B-1 # STAR 17 Z
2DEC -.4657947941 B-1 # STAR 16 X
2DEC +.4774785033 B-1 # STAR 16 Y
2DEC +.7450164351 B-1 # STAR 16 Z
2DEC -.3612508532 B-1 # STAR 15 X
2DEC +.5747270840 B-1 # STAR 15 Y
2DEC -.7342932655 B-1 # STAR 15 Z
2DEC -.4118589524 B-1 # STAR 14 X
2DEC +.9065485360 B-1 # STAR 14 Y
2DEC +.0924226975 B-1 # STAR 14 Z
2DEC -.1820751783 B-1 # STAR 13 X
# Page 50
2DEC +.9404899869 B-1 # STAR 13 Y
2DEC -.2869271926 B-1 # STAR 13 Z
2DEC -.0614937230 B-1 # STAR 12 X
2DEC +.6031563286 B-1 # STAR 12 Y
2DEC -.7952489957 B-1 # STAR 12 Z
2DEC +.1371725575 B-1 # STAR 11 X
2DEC +.6813721061 B-1 # STAR 11 Y
2DEC +.7189685267 B-1 # STAR 11 Z
2DEC +.2011399589 B-1 # STAR 10 X
2DEC +.9690337941 B-1 # STAR 10 Y
2DEC -.1432348512 B-1 # STAR 10 Z
2DEC +.3507315038 B-1 # STAR 9 X
2DEC +.8926333307 B-1 # STAR 9 Y
2DEC +.2831839492 B-1 # STAR 9 Z
2DEC +.4105636020 B-1 # STAR 8 X
2DEC +.4988110001 B-1 # STAR 8 Y
2DEC +.7632988371 B-1 # STAR 8 Z
2DEC +.7032235469 B-1 # STAR 7 X
2DEC +.7075846047 B-1 # STAR 7 Y
2DEC +.0692868685 B-1 # STAR 7 Z
2DEC +.5450107404 B-1 # STAR 6 X
2DEC +.5314955466 B-1 # STAR 6 Y
2DEC -.6484410356 B-1 # STAR 6 Z
2DEC +.0130968840 B-1 # STAR 5 X
2DEC +.0078062795 B-1 # STAR 5 Y
# Page 51
2DEC +.9998837600 B-1 # STAR 5 Z
2DEC +.4917678276 B-1 # STAR 4 X
2DEC +.2204887125 B-1 # STAR 4 Y
2DEC -.8423473935 B-1 # STAR 4 Z
2DEC +.4775639450 B-1 # STAR 3 X
2DEC +.1166004340 B-1 # STAR 3 Y
2DEC +.8708254803 B-1 # STAR 3 Z
2DEC +.9342640400 B-1 # STAR 2 X
2DEC +.1735073142 B-1 # STAR 2 Y
2DEC -.3115219339 B-1 # STAR 2 Z
2DEC +.8748658918 B-1 # STAR 1 X
2DEC +.0260879174 B-1 # STAR 1 Y
2DEC +.4836621670 B-1 # STAR 1 Z
CATLOG DEC 6970
# *******************************************************************************
SETLOC EPHEM1
BANK
COUNT* $$/EPHEM
KONMAT 2DEC 1.0 B-1 # ********************
2DEC 0 # *
2DEC 0 # *
2DEC 0 # *
2DEC .91745 B-1 # K1 COS(OBL) *
2DEC -.03571 B-1 # K2 SIN(OBL)SIN(IM) *
2DEC 0 # *
2DEC .39784 B-1 # K3 SIN(OBL) *
# Page 52
2DEC .082354 B-1 # K4 COS(OBL)SIN(IM) *
CSTODAY 2DEC 8640000 B-33 # * NOTE: *
RCB-13 OCT 00002 # * TABLES CONTAIN *
OCT 00000 # * CONSTANTS FOR *
RATESP 2DEC .03660098 B+4 # LOMR * 1969 - 1970 *
2DEC .00273779 B+4 # LOSR
2DEC -.00014719 B+4 # LONR
2DEC .815282336 # LOMO
2DEC .274674910 # LOSO
2DEC .986209499 # LONO
VAL67 2DEC* .01726666666 B+1* # AMOD
2DEC .530784445 # AARG
2DEC .036291712 B+1 # 1/27
2DEC .003505277 B+1 # BMOD
2DEC .585365625 # BARG
2DEC .03125 B+1 # 1/32
2DEC .005325277 B+1 # CMOD
2DEC -.01106341036 # CARG
2DEC .002737925 B+1 # 1/365
# ********************************************************************************
SETLOC PLANTIN2
BANK
COUNT* $$/LUROT
COSI 2DEC .99964173 B-1 # COS (5521.5 SEC.) B-1
SINI 2DEC .02676579 B-1 # SIN (5521.5 SEC.) B-1
NODDOT 2DEC -.457335121 E-2 # REV/CSEC B+28 = -1.07047011 E-8 RAD/SEC
FDOT 2DEC .570863327 # REV/CSEC B+27 = 2.67240410 E-6 RAD/SEC
# Page 53
BDOT 2DEC -3.07500686 E-8 # REV/CSEC B+28 = -7.19757301 E-14 RAD/SEC
NODIO 2DEC .986209434 # REVS B-D = 6.19653663041 RAD
FSUBO 2DEC .829090536 # REVS B-D = 5.20932947829 RAD
BSUBO 2DEC .0651201393 # REVS B-D = 0.40916190299 RAD
WEARTH 2DEC .973561595 # REV/CSEC B+23 = 7.29211494 E-5 RAD/SEC

418
CSM_GEOMETRY.s Normal file
View File

@ -0,0 +1,418 @@
# Copyright: Public domain.
# Filename: CSM_GEOMETRY.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 285-296
# Mod history: 2009-05-08 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 285
BANK 22
SETLOC COMGEOM1
BANK
# THIS ROUTINE TAKES THE SHAFT AND TRUNNION ANGLES AS READ BY THE CM OPTICAL SYSTEM AND CONVERTS THEM INTO A UNIT
# VECTOR REFERENCED TO THE NAVIGATION BASE COORDINATE SYSTEM AND COINCIDENT WTIH THE SEXTANT LINE OF SIGHT.
#
# THE INPUTS ARE: 1) THE SEXTAND SHAFT AND TRUNNION ANGLES ARE STORED SP IN LOCATIONS 3 AND 5 RESPECTIVELY OF THE
# MARK VAC AREA. 2) THE COMPLEMENT OF THE BASE ADDRESS OF THE MARK VAC AREA IS STORED SP AT LOCATION X1 OF YOUR
# JOB VAC AREA.
#
# THE OUTPUT IS A HALF-UNIT VECTOR IN NAVIGATION BASE COORDINATES AND STORED AT LOCATION 32D OF THE VAC AREA. THE
# OUTPUT IS ALSO AVAILABLE AT MPAC.
COUNT 23/GEOM
SXTNB SLOAD* RTB # PUSHDOWN 00,02,04,(17D-19D),32D-36D
5,1 # TRUNNION = TA
CDULOGIC
RTB PUSH
SXTLOGIC
SIN SL1
PUSH SLOAD* # PD2 = SIN(TA)
3,1 # SHAFT = SA
RTB PUSH # PD4 = SA
CDULOGIC
COS DMP
2
STODL STARM # COS(SA)SIN(TA)
SIN DMP
STADR
STODL STARM +2 # SIN(SA)SIN(TA)
COS
STOVL STARM +4
STARM # STARM = 32D
MXV VSL1
NB1NB2
STORE 32D
RVQ
SXTLOGIC CAF 10DEGS- # CORRECT FOR 19.775 DEGREE OFFSET
ADS MPAC
CAF QUARTER
TC SHORTMP
TC DANZIG
# Page 286
# CALCSXA COMPUTES THE SEXTANT SHAFT AND TRUNNION ANGLES REQUIRED TO POSITION THE OPTICS SUCH THAT A STAR LINE-
# OF-SIGHT LIES ALONG THE STAR VECTOR. THE ROUTINE TAKES THE GIVEN STAR VECTOR AND EXPRESSES IT AS A VECTOR REF-
# ERENECED TO THE OPTICS COORDINATE SYSTEM. IN ADDITION IT SETS UP THREE UNIT VECTORS DEFINING THE X, Y, AND Z AXES
# REFERENCED TO THE OPTICS COORDINATE SYSTEM.
#
# THE INPUTS ARE: 1) THE STAR VECTOR REFERRED TO THE PRESENT STABLE MEMMBER COORDINATES STORED AT STAR. 2) SAME ANGLE
# INPUT AS *SMNB*, I.E., SINES AND COSINES OF THE CDU ANGLES, IN THE ORDER Y Z X, AT SINCDU AND COSCDU. A CALL
# TO CDUTRIG WILL PROVIDE THIS INPUT.
#
# THE OUTPUT ARE THE SEXTANT SHAFT AND TRUNNION ANGLES STORED DP AT SAC AND PAC RESPECTIVELY. (LOW ORDER PART
# EQUAL TO ZERO).
CALCSXA ITA VLOAD # PUSHDOWN 00-26D, 28D, 30D, 32D-36D
28D
STAR
CALL
*SMNB*
MXV VSL1
NB2NB1
STOVL STAR
HIUNITX
STOVL XNB1
HIUNITY
STOVL YNB1
HIUNITZ
STCALL ZNB1
SXTANG1
# Page 287
# SXTANG COMPUTES THE SEXTANT SHAFT AND TRUNNION ANGLES REQUIRED TO POSITION THE OPTICS SUCH THAT A STAR LINE-OF-
# SIGHT LIES ALONG THE STAR VECTOR.
#
# THE INPUTS ARE: 1) THE STAR VECTOR REFERRED TO ANY COORDINATE SYSTEM STORED AT STAR. 2) THE NAVIGATION BASE
# COORDINATES REFERRED TO THE SAME COORDINATE SYSTEM. THESE THREE HALF-UNIT VECTORS ARE STROED AT XNB, YNB,AND
# ZNB.
#
# THE OUTPUTS ARE THE SEXTANT SHAFT AND TRUNNION ANGLES STORED DP AT SAC AND PAC RESPECTIVELY. (LOW ORDER PART
# EQUAL TO ZERO).
SXTANG ITA RTB # PUSHDOWN 16D,18D,22D-26D,28D
28D
TRANSP1 # EREF WRT NB2
VLOAD MXV
XNB
NB2NB1
VSL1
STOVL XNB1
YNB
MXV VSL1
NB2NB1
STOVL YNB1
ZNB
MXV VSL1
NB2NB1
STORE ZNB1
RTB RTB
TRANSP1
TRANSP2
SXTANG1 VLOAD VXV
ZNB1
STAR
BOV
+1
UNIT BOV
ZNB=S1
STORE PDA # PDA = UNIT(ZNB X S)
DOT DCOMP
XNB1
STOVL SINTH # SIN(SA) = PDA . -XNB
PDA
DOT
YNB1
STCALL COSTH # COS(SA) = PDA . YNB
ARCTRIG
# Page 288
RTB
1STO2S
STOVL SAC
STAR
BOV
+1
DOT SL1
ZNB1
ACOS
BMN SL2
SXTALARM # TRUNNION ANGLE NEGATIVE
BOV DSU
SXTALARM # TRUNNION ANGLE GREATER THAN 90 DEGREES
20DEG-
RTB
1STO2S
STORE PAC # FOR FLIGHT USE, CULTFLAG IS ON IF
CLRGO # TRUNION IS GREATER THAN 90 DEG
CULTFLAG
28D
SXTALARM SETGO # ALARM HAS BEEN REMOVED FROM THIS
CULTFLAG
28D # SUBROUTINE, ALARM WILL BE SET BY MPI
ZNB=S1 DLOAD
270DEG
STODL SAC
20DEGS-
STORE PAC
CLRGO
CULTFLAG
28D
# Page 289
# THESE TWO ROUTINES COMPUTE THE ACTUAL STATE VECTOR FOR LM, CSM BY ADDING
# THE CONIC R,V AND THE DEVIATIONS R,V. THE STATE VECTORS ARE CONVERTED TO
# METERS B-29 AND METERS/CSEC B-7 AND STORED APPROPRIATELY IN RN,VN OR
# R-OTHER, V-OTHER FOR DOWNLINK. THE ROUTINES NAMES ARE SWITCHED IN THE
# OTHER VEHICLES COMPUTER.
#
# INPUT
# STATE VECTOR IN TEMPORARY STORAGE AREA
# IF STATE VECTOR IS SCALED POS B27 AND VEL B5
# SET X2 TO +2
# IF STATE VECTOR IS SCALED POS B29 AND VEL B7
# SET X2 TO 0
#
# OUTPUT
# R(T) IN RN, V(T) IN VN, T IN PIPTIME
# OR
# R(T) IN R-OTHER, V(T) IN V-OTHER (T IS DEFINED BY T-OTHER)
BANK 23
SETLOC COMGEOM2
BANK
COUNT 10/GEOM
SVDWN1 BOF RVQ # SW=1=AVETOMID DOING W-MATRIX INTEG
AVEMIDSW
+1
VLOAD VSL*
TDELTAV
0 -7,2
VAD VSL*
RCV
0,2
STOVL RN
TNUV
VSL* VAD
0 -4,2
VCV
VSL*
0,2
STODL VN
TET
STORE PIPTIME
RVQ
SVDWN2 VLOAD VSL*
TDELTAV
0 -7,2
VAD VSL*
RCV
# Page 290
0,2
STOVL R-OTHER
TNUV
VSL* VAD
0 -4,2
VCV
VSL*
0,2
STORE V-OTHER
RVQ
# Page 291
# SUBROUTINE TO COMPUTE THE NATURAL LOG OF C(MPAC, MPAC +1).
#
# ENTRY: CALL
# LOG
#
# SUBROUTINE RETURNS WITH -LOG IN DP MPAC.
#
# EBANK IS ARBITRARY.
BANK 14
SETLOC POWFLIT2
BANK
COUNT 23/GEOM
LOG NORM BDSU # GENERATES LOG BY SHIFTING ARG
MPAC +3 # UNTIL IT LIES BETWEEN .5 AND 1.
NEARLY1 # THE LOG OF THIS PART IS FOUND AND THE
EXIT # LOG OF THE SHIFTED PART IS COMPUTED
TC POLY # AND ADDED IN. SHIFT COUNT STORED
DEC 2 # (N-1, SUPPLIED BY SMERZH)
2DEC 0 # IN MPAC +3.
2DEC .031335467
2DEC .0130145859
2DEC .0215738898
CAF ZERO
TS MPAC +2
EXTEND
DCA CLOG2/32
DXCH MPAC
DXCH MPAC +3
COM # LOAD POSITIVE SHIFT COUNT IN A.
TC SHORTMP # MULTIPLY BY SHIFT COUNT.
DXCH MPAC +1
DXCH MPAC
DXCH MPAC +3
DAS MPAC
TC INTPRET # RESULT IN MPAC, MPAC +1
RVQ
NEARLY1 2DEC .999999999
# Page 292
CLOG2/32 2DEC .0216608494
# Page 293
# SUBROUTINE NAME: EARTH ROTATOR (EARROT1 OR EARROT2) DATE: 15 FEB 67
# MOD NO: N +1 LOG SECTION: POWERED FLIGHT SUBROS
# MOD BY: ENTRY GROUP (BAIRNSFATHER)
#
# FUNCTIONAL DESCRIPTION: THIS ROUTINE PROJECTS THE INITIAL EARTH TARGET VECTOR RTINIT AHEAD THROUGH
# THE ESTIMATED TIME OF FLIGHT. INITIAL CALL RESOLVES THE INITIAL TARGET VECTOR RTINIT INTO EASTERLY
# AND NORMAL COMPONENTS RTEAST AND RTNORM. INITIAL AND SUBSEQUENT CALLS ROTATE THIS VECTOR
# ABOUT THE (FULL) UNIT POLAR AXIS UNITW THROUGH THE ANGLE WIE DTEAROT TO OBTAIN THE ROTATED
# TARGET VECTOR RT. ALL VECTORS EXCEPT UNITW ARE HALF UNIT.
# THE EQUATIONS ARE:
# _ _ _ _
# RT = RTINIT + RTNORM (COS(WT) - 1) + RTEAST SIN(WT)
#
# WHERE WT = WIE DTEAROT
#
# RTINIT = INITIAL TARGET VECTOR
# _ _ _
# RTEAST = UNITW * RTINIT
# _ _ _
# RTNORM = RTEAST * UNITW
#
# FOR CONTINUOUS UPDATING, ONLY ONE ENTRY TO EARROT1 IS REQUIRED, WITH SUBSEQUENT ENTRIES AT EARROT2.
#
# CALLING SEQUENCE: FIRST CALL SUBSEQUENT CALL
# STCALL DTEAROT STCALL DTEAROT
# EARROT1 EARROT2
# C(MPAC) UNSPECIFIED C(MPAC) = DTEAROT
# PUSHLOC = PDL+0, ARBITRARY. 6 LOCATIONS USED.
#
# SUBROUTINES USED: NONE
#
# NORMAL EXIT MODES: RVQ
#
# ALARMS: NONE
#
# OUTPUT: RTEAST (-1) .5 UNIT VECTOR EAST, COMPNT OF RTINIT LEFT BY FIRST CALL
# RTNORM (-1) .5 UNIT VECTOR NORML, COMPNT OF RTINIT LEFT BY FIRST CALL
# RT (-1) .5 UNIT TARGET VECTOR, ROTATED LEFT BY ALL CALLS
# DTEAROT (-28) CS MAY BE CHANGED BY EARROT2, IF OVER 1 DAY
#
# ERASABLE INITIALIZATION REQUIRED:
# UNITW (0) UNIT POLAR VECTOR PAD LOADED
# RTINIT (-1) .5 UNIT INITIAL TARGET VECTOR LEFT BY ENTRY
# DTEAROT (-28) CS TIME OF FLIGHT LEFT BY CALLER
#
# DEBRIS: QPRET, PDL+0 ... PDL+5
# Page 294
EBANK= RTINIT
EARROT1 VLOAD VXV
UNITW # FULL UNIT VECTOR
RTINIT # .5 UNIT
STORE RTEAST # .5 UNIT
VXV
UNITW # FULL UNIT
STODL RTNORM # .5 UNIT
DTEAROT # (-28) CS
EARROT2 BOVB DDV
TCDANZIG # RESET OVFIND, IF ON
1/WIE
BOV PUSH
OVERADAY
COS DSU
HIDPHALF
VXSC PDDL # XCH W PUSH LIST
RTNORM # .5 UNIT
SIN VXSC
RTEAST # .5 UNIT
VAD VSL1
VAD UNIT # INSURE THAT RT IS "UNIT".
RTINIT # .5 UNIT
STORE RT # .5 UNIT TARGET VECTOR
RVQ
OVERADAY DLOAD SIGN
1/WIE
DTEAROT
BDSU
DTEAROT
STORE DTEAROT
GOTO
EARROT2
#WIE 2DEC .1901487997
1/WIE 2DEC 8616410
NB2NB1 2DEC +.8431756920 B-1
2DEC 0
2DEC -.5376381241 B-1
# Page 295
ZERINFLT 2DEC 0
HALFNFLT 2DEC .5
2DEC 0
2DEC +.5376381241 B-1
2DEC 0
2DEC +.8431756920 B-1
NB1NB2 2DEC +.8431756920 B-1
2DEC 0
2DEC +.5376381241 B-1
2DEC 0
2DEC .5
2DEC 0
2DEC -.5376381241 B-1
2DEC 0
2DEC +.8431756920 B-1
# Page 296
10DEGS- DEC 3600
270DEG OCT 60000 # SHAFT 270 DEGREES 25 COMP.
OCT 00000
20DEGS- DEC -07199
DEC -00000
20DEG- DEC 03600
DEC 00000

481
DAPIDLER_PROGRAM.s Normal file
View File

@ -0,0 +1,481 @@
# Copyright: Public domain.
# Filename: DAPIDLER_PROGRAM.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1410-1420
# Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
# from the Luminary131/ file of the same
# name, using Luminary099 page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 1410
# THE DAPIDLER PROGRAM IS STARTED BY FRESH START AND RESTART. THE DAPIDLER PROGRAM IS DONE 10 TIMES
# PER SECOND UNTIL THE ASTRONAUT DESIRES THE DAP TO WAKE UP, AND THE IMU AND CDUS ARE READY FOR USE BY THE DAP.
# THE NECESSARY INITIALIZATION OF THE DAP IS DONE BY THE DAPIDLER PROGRAM.
BANK 16
SETLOC DAPS1
BANK
EBANK= AOSQ
COUNT* $$/DAPID
CHEKBITS EXTEND
READ CHAN31 # IF BOTH BIT13 AND BIT14 ARE ONE, THEN
COM # THE MODE SELECT SWITCH IS IN THE OFF
MASK BIT13-14 # POSITION, AND SO THE DAP SHOULD BE OFF,
EXTEND # WITH NO ATTITUDE ERROR DISPLAY.
BZF MOREIDLE
CS IMODES33
MASK BIT6
CCS A
TCF JUMPDSP
CS RCSFLAGS # IMU NOT USABLE. SET UP INITIALIZATION
MASK BIT3 # FLAG FOR ATT ERROR DISPLAY ROUTINE.
ADS RCSFLAGS
TCF SHUTDOWN
CHEKMORE CAF BIT10 # BIT 10 OF 30 IS PGNCS CONTROL OF S/C
EXTEND
RAND CHAN30 # BITS IN 30 ARE INVERTED
CCS A
TCF MOREIDLE
RETURN
# Page 1411
# DAPIDLER ENTRY.
DAPIDLER LXCH BANKRUPT # INTERRUPT LEAD INS (CONTINUED)
EXTEND
QXCH QRUPT
CA RCSFLAGS
MASK BIT13
CCS A # CHECK IF 1/ACCJOB HAS BEEN SET UP SINCE
TCF CHECKUP # THE LAST FRESH START OR RESTART.
CA BIT13
ADS RCSFLAGS # BIT 13 IS 1.
CAF PRIO27
TC NOVAC # SET UP JOB TO DO A LITTLE INITIALIZATION
EBANK= AOSQ # AND EXECUTE 1/ACCS.
2CADR 1/ACCSET # (WILL BRANCH TO MOREIDLE ON ACCSOKAY)
CHECKUP TC CHEKBITS # CHECK TO SEE IF LM DAP IS TO GO ON AND
# DO ERROR DISPLAY.
CAE DAPBOOLS # IF 1/ACCS HAS NOT BEEN COMPLETED, IDLE.
MASK ACCSOKAY # NOTE: ONLY FRESH START AND RESTART
EXTEND # KNOCK THIS BIT DOWN.
BZF MOREIDLE
STARTDAP TC IBNKCALL # ZERO ATTITUDE ERROR AND DESIRED RATES.
FCADR ZATTEROR
CAF ZERO # ************ INITIALIZE: *************
TS TJP
TS TJU
TS TJV
TS OMEGAP # RATES IN BODY (PILOT) COORDINATES.
TS OMEGAQ
TS OMEGAR
TS TRAPEDP
TS TRAPEDQ
TS TRAPEDR
TS AOSQ # OFFSET ACCELERATION ESTIMATES.
TS AOSQ +1
TS AOSR
TS AOSR +1
TS ALPHAQ # COPIES OF OFFSET ESTIMATES FOR DOWNLIST.
TS ALPHAR
TS NEGUQ
TS NEGUR
TS AOSQTERM # QRAXIS RATE DERIVATION TERMS AND KALMAN
TS AOSRTERM # FILTER INITIALIZATION TERMS.
TS QACCDOT # DESCENT ACCELERATION DERIVATIVE EST.
TS RACCDOT
# Page 1412
TS ALLOWGTS # AOSTASK FLAG FOR QRAXIS RCS CONTROL USE.
TS COTROLER # DO TRYGTS ON FIRST PASS (WILL GO TO RCS)
TS INGTS # RECOGNIZE FIRST GTS PASS AS SUCH.
TS QGIMTIMR # STOP GIMBAL DRIVES. (PROBABLY WOULD BE
TS RGIMTIMR # GOOD ENOUGH JUST TO INACTIVATE TIMERS)
TS OLDPMIN # MINIMUM IMPULSE MODE ERASABLES
TS OLDQRMIN
TS PJETCTR # INITIALIZE DOCKED JET INHIBITION
TS UJETCTR # COUNTERS
TS VJETCTR
CALLGMBL EQUALS BIT5 # RCSFLAGS INITIALIZATION.
CS MANFLAG
MASK RCSFLAGS # NEGUQ(R) HAVE BEEN GENERATED.
TS RCSFLAGS
# SET UP "OLD" MEASURED CDU ANGLES:
EXTEND
DCA CDUX # OLDXFORP AND OLDYFORP
DXCH OLDXFORP
CA CDUZ
TS OLDZFORQ
CS RCSFLAGS
MASK BIT12
ADS RCSFLAGS # BIT 12 SET TO 1.
CA FOUR
TS SKIPU
TS SKIPV
CA POSMAX
TS TIME6
TS T6NEXT
TS T6FURTHA
CA ZERO
TS T6NEXT +1
TS T6FURTHA +1
TS NXT6ADR
TS NEXTP
TS NEXTU
TS NEXTV
CS TEN
TS DAPZRUPT # JASK NOT IN PROGRESS, INITIALIZE NEG.
CA TWO
TS NPTRAPS
TS NQTRAPS
TS NRTRAPS
EXTEND
DCA PAXADIDL
DXCH T5ADR
SETTIME5 CAF MS100
TS TIME5
# Page 1413
TCF RESUME
EBANK= AOSQ
IDLERADR 2CADR DAPIDLER
MOREIDLE TC IBNKCALL # CALCULATE Q,R-AXES ATTITUDE ERRORS.
CADR QERRCALC
TC IBNKCALL
CADR CALCPERR # CALCULATE P AXIS ATTITUDE ERRORS.
SHUTDOWN EXTEND
DCA IDLERADR
DXCH T5ADR
CAF ZERO # KILL ANY POSSIBLE JET REQUESTS
TS NEXTP
TS NEXTU
TS NEXTV
EXTEND # COMMAND JETS OFF.
WRITE CHAN5
EXTEND
WRITE CHAN6
CS BGIM23 # TURN TRIM GIMBAL OFF
EXTEND
WAND CHAN12
TCF SETTIME5 # RETURN IN 100 MSEC.
MANFLAG OCT 03021
BGIM23 OCTAL 07400
EBANK= OMEGAP
PAXADIDL 2CADR PAXIS
MS100 = OCT37766
COSMG = ITEMP1
JUMPDSP EXTEND # TRANSFER TO BANK 20
DCA DSPCADR # FOR ATTITUDE ERROR DISPLAYS
DTCB
EBANK= AK
DSPCADR 2CADR ALTDSPLY
# Page 1414
BANK 20
SETLOC DAPS3
BANK
COUNT* $$/NEEDL
# PROGRAM: ALTDSPLY
# MOD 0. 6 DEC 1967
# AUTHOR: CRAIG WORK, DON KEENE, MIT IL
# MOD 3 BY DON KEENE AUG 1, 1968 -- MOVED PROGRAM TO BANK 20
#
# PROGRAM DESCRIPTION:
# ALTDSPLY REVERSES THE DSPLYALT BIT OF RCSFLAGS EACH TIME IT IS CALLED, WHICH IS PRESUMABLY EVERY 100 MS.
# IF THE REVERSED BIT IS ONE, NEEDLER IS CALLED TO DISPLAY ATTITUDE ERRORS. IF THE BIT IS ZERO, THE ATTITUDE ERR-
# ORS ARE CALCULATED AS 1) DAP FOLLOWING ERRORS, IF NEEDLFLG = 0, AND 2) TOTAL ATTITUDE ERRORS FOR NEEDLFLG = 1.
#
#
# WARNING: ALTDSPLY MAY ONLY BE CALLED WITH INTERRUPT INHIBITED
#
# WARNING: EBANK MUST BE SET TO 6 WHEN USING THIS ROUTINE.
#
# INPUT: RCSFLAGS AND 1) IF NEEDLFLG = 0, INPUT PERROR, QERROR, RERROR.
# 2) IF NEEDLFLG = 1, INPUT CPHI,CTHETA,CPSI,CDUX,CDUY,CDUZ,M11,M21,M32,M22,M32. (GPMATRIX)
#
#
# OUTPUTS: RCSFLAGS WITH DSPLYALT REVERSED, AK, AK1, AK2, + NEEDLER OUTPUTS.
#
# ENTRY: TCF ALTDSPLY
#
# EXIT: TCF CHEKMORE
#
# ALARM OR ABORT EXITS: NONE
#
# SUBPROGRAMS CALLED: NEEDLER, OVERSUB2
#
# DEBRIS: A, L, AND NEEDLER DEBRIS.
ALTDSPLY CA RCSFLAGS # INVERT THE DISPLAY ALTERNATION BIT.
TS L
CA DSPLYALT
EXTEND
RXOR LCHAN
TS RCSFLAGS
MASK DSPLYALT
CCS A # IS ALTERNATION FLAG ZERO?
TCF NEEDLER
CAE FLAGWRD0 # NEEDLFLG WILL INDICATE TOTAL OR DAP AT-
# Page 1415
MASK NEEDLBIT # TITUDE ERROR DISPLAY REQUEST.
CCS A
TCF DSPLYTOT # TOTAL ERROR IS NEEDED IN AK, AK +1, AK +2
CS QERROR # YES. DISPLAY ATT ERRORS ON THE -BALL.
TS AK +1 # ERROR COMPLEMENTS ARE INPUT TO NEEDLER.
CS RERROR
TS AK +2
CS PERROR
XCH AK
TCF RETNMORE # DISPLAY THESE THE NEXT TIME THROUGH
# CALCULATE GIMBAL ANGLE TOTAL ERRORS, RESOLVE INTO PILOT AXES, STORE TOTAL ERRORS FOR NEEDLER. Q-AXIS FIRST.
DSPLYTOT EXTEND
QXCH ITEMP1 # SAVE Q FOR CHEKBITS RETURN.
CA CTHETA # DESIRED ATTITUDE, Y-AXIS, 2'S COMP.
EXTEND # SUBTRACT CURRENT ATTITUDE.
MSU CDUY # DIFFERENCE SCALED AT PI, 1'S COMP.
TS AK # SAVE FOR R-ERROR CALCULATION.
EXTEND
MP M21 # (CTHETA-CDUY)*M21 SCALED AT PI RADIANS.
XCH AK +1 # STORE FIRST TERM OF Q ERROR.
CA CPSI # DESIRED ATTITUDE, Z-AXIS, 2'S COMP.
EXTEND # SUBTRACT CURRENT ATTITUDE.
MSU CDUZ # DIFFERENCE SCALED AT PI, 1'S COMP.
TS AK +2 # SAVE Z-AXIS TERM FOR R ERROR CALCULATION
EXTEND
MP M22 # (CPSI-CDUZ)*M22, SCALED AT PI RADIANS.
AD AK +1 # Q ERROR COMPLETE , AT PI RAD.
TC OVERSUB2 # PIN NEEDLES IN CASE OF OVERFLOW
TS AK +1
# R ERROR CALCULATION NEXT.
CA AK # Y-AXIS DIFFERENCE STORED BY Q-AXIS CALC.
EXTEND
MP M31 # (CTHETA-CDUY)*M31, SCALED AT PI RADIANS.
XCH AK +2 # FIRST TERM OF R ERROR.
# Z-AXIS DIFFERENCE, STORED BY A CALC. IS
EXTEND # RECOVERED BY THE EXCHANGE.
MP M32 # (CPSI-CDUZ)*M32, SCALED AT PI RADIANS.
AD AK +2 # R ERROR COMPLETE , AT PI RAD.
TC OVERSUB2 # PIN NEEDLES IN CASE OF OVERFLOW.
TS AK +2
# NOW CALCULATE P ERROR. (NOTE THAT M13 = 1, SCALED AT 1, SO THE MULTIPLICATION IS BY-PASSED.)
# Page 1416
CA AK # Y-AXIS DIFFERENCE STORED BY Q AXIS CALC.
EXTEND
MP M11 # (CTHETA-CDUY)*M11 SCALED AT PI RADIANS.
XCH AK # FIRST TERM OF P ERROR IN AK, AT PI RAD.
CAE CPHI # DESIRED ATTITUDE, X-AXIS, 2'S COMP.
EXTEND # SUBTRACT CURRENT X ATTITUDE.
MSU CDUX # X-AXIS DIFFERENCE, 1'S COMP, AT PI RAD.
# M13 = 1, SO BYPASS THE MULTIPLICATION.
# EXTEND
# MP M13 # (CPHI-CDUX)*M13 SCALED AT PI RADIANS.
AD AK # P ERROR COMPLETE , SCALED AT PI RAD
TC OVERSUB2 # PIN NEEDLES IN CASE OF OVERFLOW.
TS AK
EXTEND
QXCH ITEMP1 # RESTORE Q FOR CHEKBITS RETURN.
TCF RETNMORE # DISPLAY THESE THE NEXT TIME THROUGH
# Page 1417
# FDAI ATTITUDE ERROR DISPLAY SUBROUTINE
#
# PROGRAM DESCRIPTION: D. KEENE 5/24/67
# MOD 1 BY CRAIG WORK, 12 DEC 67
# MOD 2 BY CRAIG WORK, 6 APRIL 68, CONVERTS ATTITUDE ERROR DISPLAY SCALING FROM 16 7/8 DEG. TO 42 3/16 DEGREES.
#
# THIS SUBROUTINE IS USED TO DISPLAY ATTITUDE ERRORS ON THE FDAI VIA THE DIGITAL TO ANALOG CONVERTERS (DACS)
# IN THE CDUS. CARE IS TAKEN TO METER OUT THE APPROPRIATE NUMBER OF PULSES TO THE IMU ERROR COUNTERS AND PREVENT
# OVERFLOW, TO CONTROL THE RELAY SEQUENCING, AND TO AVOID INTERFERENCE WITH THE COARSE ALIGN LOOP WHICH ALSO USES
# THE DACS.
#
# CALLING SEQUENCE:
# DURING THE INITIALIZATION SECTION OF THE USER'S PROGRAM, BIT3 OF RCSFLAGS SHOULD BE SET TO INITIATE THE
# TURN-ON SEQUENCE WITHIN THE NEEDLES PROGRAM:
# CS RCSFLAGS # IN EBANK6
# MASK BIT3
# ADS RCSFLAGS
# THEREAFTER, THE ATTITUDE ERRORS GENERATED BY THE USER SHOULD BE TRANSFERRED TO THE FOLLOWING LOCATIONS IN EBANK6:
# AK SCALED 180 DEGREES NOTE: THESE LOCATIONS ARE SUBJECT
# AK1 SCALED 180 DEGREES TO CHANGE
# AK2 SCALED 180 DEGREES
# FULL SCALED DEFLECTION OF THE NEEDLES CORRESPONDS TO 5 1/16 DEGREES, WHILE 384 BITS IN THE IMU ERROR COUNTER
# CORRESPONDS TO 42 3/16 DEGREES. (DAC MAXIMUM CAPACITY IS 384 BITS.) 46 BITS EFFECTIVELY PIN THE NEEDLES.
#
# A CALL TO NEEDLER WILL THE UPDATE THE DISPLAY:
# INHINT
# TC IBNKCALL # NOTE: EBANK SHOULD BE SET TO E6
# CADR NEEDLER
# RELINT
# THIS PROCESS SHOULD BE REPEATED EACH TIME THE ERRORS ARE UPDATED. AT LEAST 3 PASSES THRU THE PROGRAM ARE
# REQUIRED BEFORE ANYTHING IS ACTUALLY DISPLAYED ON THE ERROR METERS.
# NOTE: EACH CALL TO NEEDLER MUST BE SEPARATED BY AT LEAST 50 MS. TO ASSURE PROPER RELAY SEQUENCING.
#
# ERASABLES USED:
# AK CDUXCMD
# AK1 CDUYCMD
# AK2 CDUZCMD
# EDRIVEX A,L,Q
# EDRIVEY T5TEMP
# EDRIVEZ DINDX
# Page 1418
#
# SWITCHES: RCSFLAGS BITS 3,2
#
# I/O CHANNELS: CHAN12 BIT 4 (COARSE ALIGN -- READ ONLY)
# CHAN12 BIT 6 (IMU ERROR COUNTER ENABLE)
# CHAN14 BIT 13,14,15 (DAC ACTIVITY)
#
# SIGN CONVENTION: AK = THETAC - THETA
# WHERE THETAC = COMMAND ANGLE
# THETA = PRESENT ANGLE
NEEDLER CA RCSFLAGS
MASK SIX
EXTEND
BZF NEEDLES3
MASK BIT3
EXTEND
BZF NEEDLER2 # BIT3 = 0, BIT2 = 1
CS BIT6 # FIRST PASS BIT3 = 1
EXTEND # DISABLE IMU ERROR COUNTER TO ZERO DACS
WAND CHAN12 # MUST WAIT AT LEAST 60 MS BEFORE
NEEDLE11 CS ZERO # ENABLING COUNTERS.
TS AK # ZERO THE INPUTS ON FIRST PASS
TS AK1
TS AK2
TS EDRIVEX # ZERO THE DISPLAY REGISTERS
TS EDRIVEY
TS EDRIVEZ
TS CDUXCMD # ZERO THE OUT COUNTERS
TS CDUYCMD
TS CDUZCMD
CS SIX # RESET RCSFLAGS FOR PASS2
MASK RCSFLAGS
AD BIT2
TS RCSFLAGS
TCF RETNMORE
NEEDLER2 CAF BIT6 # ENABLE IMU ERROR COUNTERS
EXTEND
WOR CHAN12
CS SIX # RESET RCSFLAGS TO DISPLAY ATTITUDE
MASK RCSFLAGS # ERRORS. WAIT AT LEAST 4 MS FOR
TS RCSFLAGS # RELAY CLOSURE.
TCF RETNMORE
NEEDLES3 CAF BIT6 # CHECK TO SEE IF IMU ERROR COUNTER
EXTEND # IS ENABLED
RAND CHAN12
# Page 1419
CCS A # IF NOT, RE-INITIALIZE NEEDLER.
TCF NEEDLES
CS RCSFLAGS # SET UP INITIALIZATION FLAG IN RCSFLAGS.
MASK BIT3
ADS RCSFLAGS
TCF RETNMORE
NEEDLES CAF TWO
DACLOOP TS DINDX
CS ONETENTH # RESCALE INPUTS TO + OR - 1800 DEGREES.
EXTEND
INDEX DINDX
MP AK
TS L
CCS A
CA DACLIMIT
TCF +2
CS DACLIMIT
AD L
TS T5TEMP # OVFLO CHK
TCF +4
INDEX A # ON OVERFLOW LIMIT OUTPUT TO +-384
CAF DACLIMIT
TS L
INDEX DINDX
CS EDRIVEX # CURRENT VALUE OF DAC
AD L
INDEX DINDX
ADS CDUXCMD
INDEX DINDX
LXCH EDRIVEX
CCS DINDX
TCF DACLOOP
CAF 13,14,15
EXTEND
WOR CHAN14 # SET DAC ACTIVITY BITS
TCF RETNMORE
DEC -384
DACLIMIT DEC 16000
DEC 384
ONETENTH OCT 03146 # DECIMAL +0.1, SCALED AT 1.
DSPLYALT EQUALS BIT4 # 100 MS ALTERNATION BIT IN RCSFLAGS
OVERSUB2 TS 7 # RETURNS A UNCHANGED OR LIMITED TO
TC Q # POSMAX OR NEGMAX IF A HAS OVERFLOW
INDEX A
# Page 1420
CS LIMITS # DUPLICATE CODING IN BANK 16
TC Q
RETNMORE EXTEND # RETURN TO CHEKMORE
DCA MORECADR
DTCB
EBANK= AOSQ
MORECADR 2CADR CHEKMORE

176
DAP_INTERFACE_SUBROUTINES.s Normal file
View File

@ -0,0 +1,176 @@
# Copyright: Public domain.
# Filename: DAP_INTERFACE_SUBROUTINES.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1406-1409
# Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
# from the Luminary131/ file of the same
# name, using Luminary099 page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 1406
BANK 20
SETLOC DAPS3
BANK
EBANK= CDUXD
COUNT* $$/DAPIF
# MOD 0 DATE 11/15/66 BY GEORGE W. CHERRY
# MOD 1 1/23/67 MODIFICATION BY PETER ADLER
#
# FUNCTIONAL DESCRIPTION
# HEREIN IS A COLLECTION OF SUBROUTINES WHICH ALLOW MISSION CONTROL PROGRAMS TO CONTROL THE MODE
# AND INTERFACE WITH THE DAP.
#
# CALLING SEQUENCES
# IN INTERRUPT OR WITH INTERRUPT INHIBITED
# TC IBNKCALL
# FCADR ROUTINE
# IN A JOB WITHOUT INTERRUPT INHIBITED
# INHINT
# TC IBNKCALL
# FCADR ROUTINE
# RELINT
#
# OUTPUT
# SEE INDIVIDUAL ROUTINES BELOW
#
# DEBRIS
# A, L, AND SOMETIMES MDUETEMP ODE NOT IN PULSES MODE
# Page 1407
# SUBROUTINE NAMES:
# SETMAXDB, SETMINDB, RESTORDB, PFLITEDB
# MODIFIED: 30 JANUARY 1968 BY P. S. WEISSMAN TO CREATE RESTORDB.
# MODIFIED: 1 MARCH 1968 BY P. S. WEISSMAN TO SAVE EBANK AND CREATE PFLITEDB
#
# FUNCTIONAL DESCRIPTION:
# SETMAXDB -- SET DEADBAND TO 5.0 DEGREES
# SETMINDB -- SET DEADBAND TO 0.3 DEGREE
# RESTORDB -- SET DEADBAND TO MAX OR MIN ACCORDING TO SETTINGS OF DBSELECT BIT OF DAPBOOLS
# PFLITEDB -- SET DEADBAND TO 1.0 DEGREE AND ZERO THE COMMANDED ATTITUDE CHANGE AND COMMANDED RATE
#
# ALL ENTRIES SET UP A NOVAC JOB TO DO 1/ACCS SO THAT THE TJETLAW SWITCH CURVES ARE POSITIONED TO
# REFLECT TEH NEW DEADBAND. IT SHOULD BE NOTED THAT THE DEADBAND REFERS TO THE ATTITUDE IN THE P-, U-, AND V-AXES.
#
# SUBROUTINE CALLED: NOVAC
#
# CALLING SEQUENCE: SAME AS ABOVE
# OR TC RESTORDB +1 FROM ALLCOAST
#
# DEBRIS: A, L, Q, RUPTREG1, (ITEMPS IN NOVAC)
RESTORDB CAE DAPBOOLS # DETERMINE CREW-SELECTED DEADBAND.
MASK DBSELECT
EXTEND
BZF SETMINDB
SETMAXDB CAF WIDEDB # SET 5 DEGREE DEADBAND.
+1 TS DB
EXTEND # SET UP JOB TO RE-POSITION SWITCH CURVES.
QXCH RUPTREG1
CALLACCS CAF PRIO27
TC NOVAC
EBANK= AOSQ
2CADR 1/ACCJOB
TC RUPTREG1 # RETURN TO CALLER.
SETMINDB CAF NARROWDB # SET 0.3 DEGREE DEADBAND.
TCF SETMAXDB +1
PFLITEDB EXTEND # THE RETURN FROM CALLACCS IS TO RUPTREG1.
QXCH RUPTREG1
TC ZATTEROR # ZERO THE ERRORS AND COMMANDED RATES.
CAF POWERDB # SET DB TO 1.0 DEG.
TS DB
TCF CALLACCS # SET UP 1/ACCS AND RETURN TO CALLER.
NARROWDB OCTAL 00155 # 0.3 DEGREE SCALED AT 45.
# Page 1408
WIDEDB OCTAL 03434 # 5.0 DEGREES SCALED AT 45.
POWERDB DEC .02222 # 1.0 DEGREE SCALED AT 45.
ZATTEROR CAF EBANK6
XCH EBANK
TS L # SAVE CALLERS EBANK IN L.
CAE CDUX
TS CDUXD
CAE CDUY
TS CDUYD
CAE CDUZ
TS CDUZD
TCF STOPRATE +3
STOPRATE CAF EBANK6
XCH EBANK
TS L # SAVE CALLERS EBANK IN L.
+3 CAF ZERO
TS OMEGAPD
TS OMEGAQD
TS OMEGARD
TS DELCDUX
TS DELCDUY
TS DELCDUZ
TS DELPEROR
TS DELQEROR
TS DELREROR
LXCH EBANK # RESTORE CALLERS EBANK.
TC Q
# SUBROUTINE NAME: ALLCOAST
# WILL BE CALLED BY FRESH STARTS AND ENGINE OFF ROUTINES.
#
# CALLING SEQUENCE: (SAME AS ABOVE)
#
# EXIT: RETURN TO Q.
#
# SUBROUTINES CALLED: STOPRATE, RESTORDB, NOVAC
#
# ZERO: (FOR ALL AXES) AOS, ALPHA, AOSTERM, OMEGAD, DELCDU, DELEROR
#
# OUTPUT: DRIFTBIT/DAPBOOLS, OE, JOB TO DO 1/ACCS
#
# DEBRIS: A, L, Q, RUPTREG1, RUPTREG2, (ITEMPS IN NOVAC)
ALLCOAST EXTEND # SAVE Q FOR RETURN
QXCH RUPTREG2
# Page 1409
TC STOPRATE # CLEAR RATE INTERFACE. RETURN WITH A=0
LXCH EBANK # AND L=EBANK6. SAVE CALLER'S EBANK.
TS AOSQ
TS AOSQ +1
TS AOSR
TS AOSR +1
TS ALPHAQ # FOR DOWNLIST.
TS ALPHAR
TS AOSQTERM
TS AOSRTERM
LXCH EBANK # RESTORE EBANK (EBANK6 NO LONGER NEEDED)
CS DAPBOOLS # SET UP DRIFTBIT
MASK DRIFTBIT
ADS DAPBOOLS
TC RESTORDB +1 # RESTORE DEADBANK TO CREW-SELECTED VALUE.
TC RUPTREG2 # RETURN.

1485
DISPLAY_INTERFACE_ROUTINES.s Normal file

File diff suppressed because it is too large Load Diff

457
DOWN-TELEMETRY_PROGRAM.s Normal file
View File

@ -0,0 +1,457 @@
# Copyright: Public domain.
# Filename: DOWN-TELEMETRY_PROGRAM.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 1093-1102
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-08 RSB Adapted from Colossus249/ file of same name
# and page images. Corrected various typos
# in the transcription of program comments,
# and these should be back-ported to
# Colossus249.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 1093
# PROGRAM NAME -- DOWN TELEMETRY PROGRAM
# MOD NO. -- 0 TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
# PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
# THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS. REFER TO DOWNLINK
# LISTS LOG SECTION FOR MORE DETAILS. HOWEVER THIS CHANGES WILL NOT AFFECT THE GROUND PROCESSING
# OF DOWN TELEMETRY DATA.
# MOD BY -- KILROY, SMITH, DEWITT
# DATE -- 02 OCT 67
# AUTHORS -- KILROY, SMITH, DWWITT, DEWOLF, FAGIN
# LOG SECTION -- DOWN-TELEMETRY PROGRAM
#
# FUNCTIONAL DESCRIPTION -- THIS ROUTINE IS INITIATED BY TELEMETRY END
# PULSE FROM THE DOWNLINK TELEMETRY CONVERTER. THIS PULSE OCCURS
# AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
# EXECUTED AT THESE RATES. THIS ROUTINE SELECTS THE APPROPRIATE
# AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
# CHANNELS 34 AND 35. THE INFORMATION IS THEN GATED OUT FROM THE
# LGC IN SERIAL FASHION.
#
# THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST. SINCE DOWNRUPTS
# OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
# CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
# OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
#
# CALLING SEQUENCE -- NONE
# PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
# RESULT OF A DOWNRUPT. CONTROL IS RETURNED VIA TCF RESUME WHICH
# IN EFFECT IS A RESUME.
#
# SUBROUTINES CALLED -- NONE
#
# NORMAL EXIT MODE -- TCF RESUME
#
# ALARM OR ABORT EXIT MODE -- NONE
#
# RESTART PROTECTION:
# ON A FRESH START AND RESTART THE `STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
# DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E., CURRENT CONTENTS OF DNLSTADR). THIS HAS THE
# EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
# THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
# DOWNLIST.
#
# ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
#
# DOWNLINK LIST SELECTION:
# THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
# 1. FRESH START
# 2. V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
# 3. UPDATE PROGRAM (P27)
# 4. NON-V37 SELECTABLE TYPE PROGRAMS (E.G., AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
# TRANSITIONS (COLOSSUS) ETC.).
#
# DOWNLINK LIST RULES AND LIMITATIONS:
# READ SECTION(S) WHICH FOLLOW `DEBRIS' WRITEUP.
#
# OUTPUT -- EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E., 200 LGC
# COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
#
# ERASABLE INITIALIZATION REQUIRED -- NONE
# `DNTMGOTO' AND `DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
#
# DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) --
# LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.
# Page 1094
# (No source on this page of the original assembly listing.)
# Page 1095
# DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
# RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
#
# NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
# 1. DOWNLISTS. DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
# DOWN-TELEMETRY PROGRAM. THIS IS DONE FOR EASE OF CODING, FASTER
# EXECUTION.
# 2. EACH DOWNLINK LIST CONSISTES OF A CONTROL LIST AND A NUMBER OF
# SUBLISTS.
# 3. A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
# DOWNLINK LISTS. ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
# CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
# 4. SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENEOUS DATA WHICH MUST BE
# SAVED IN A BUFFER DURING ONE DOWNRUPT.
# 5. THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
# OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
# IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
# 6. ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
# CREATED FOR THE DOWNLIST PROGRAM.
# A. 1DNADR 1-WORD DOWNLIST ADDRESS.
# SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
# HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
# B. 2DNADR - 6DNADR N-WORD DOWNLIST ADDRESS, N = 2 - 6.
# SAME AS 1DNADR, BUT WTIH THE 4 UNUSED BITS OF THE ECADR FORMAT
# FILLED IN WITH 0001-0101. USED TO POINT TO A LIST OF N DOUBLE-
# PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
# C. DNCHAN DOWNLIST CHANNEL ADDRESS.
# SAME AS 1DNADR, BUT WITH PREFIX BITS 0111. USED TO POINT TO
# A PAIR OF CHANNELS FOR DOWN TELEMETRY.
# D. DNPTR DOWN-TELEMETRY SUBLIST POINTER.
# SAME AS CAF BUT TAGGES AS A CONSTANT. USED IN CONTROL LIST TO POINT TO A SUBLIST.
# CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
# 7. THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E., CONTROL LIST) AND WHEN
# A `1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
# 8. IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
#
# DOWNLIST LIST RESTRICTIONS:
# (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
# DONE)
# 1. SNAPSHOT DOWNLIST:
# (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E., 1DNADR'S): Q, 400, 1000, 1400, 2000, 2400, 3000, 3400.
# (B) CAN CONTAIN ONLY 1DNADR'S
# 2. ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A DCA SO DOWNLINK LISTS CANNOT CONTAIN THE
# EQUIVALENT OF THE FOLLOWING ECADRS (I.E., IDNADRS): 377, 777, 1377, 1777, 2377, 2777, 3377, 3777.
# (NOTE: TE TERM `EQUIVALENT' MEANT THAT THE IDNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
# 3. CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777
# Page 1096
# 4. THE `1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINT PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
# CONTROL SECTION OF THE DOWNLIST.
# 5. `DNCHAN 0' CANNOT BE USED.
# 6. `DNPTR 0' CANNOT BE USED.
# 7. DNPTR CANNOT APPEAR IN A SUBLIST.
#
# EBANK SETTINGS
# IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
# `GARBAGE' INTO BITS15-12 OF EBANK. HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
# SIGNIFICANT SOMEDAY IN THE FUTURE. IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
# THAT BITS 15-12 OF EBANK ARE ZERO.
#
# INITIALIZATION REQUIRED -- TO INTERRUPT CURRENT LIST AND START A NEW ONE.
# 1. ADRES OF DOWNLINK LIST INTO DNLSTADR
# 2. NEGONE INTO SUBLIST
# 3. NEGONE INTO DNECADR
BANK 22
SETLOC DOWNTELM
BANK
EBANK= DNTMBUFF
COUNT 05/DPROG
DODOWNTM TS BANKRUPT
EXTEND
QXCH QRUPT # SAVE Q
CA BIT7 # SET WORD ORDER CODE TO 1. EXCEPTION: AT
EXTEND # THE BEGINNING OF EACH LIST THE WORD
WOR CHAN13 # CODE WILL BE SET BACK TO 0.
TC DNTMGOTO # GOTO APPROPRIATE PHASE OF PROGRAM
DNPHASE1 CA NEGONE # INITIALIZE ALL CONTROL WORDS
TS SUBLIST # WORDS TO MINUS ONE
TS DNECADR
CA LDNPHAS2 # SET DNTMGOTO = 0 ALL SUSEQUENT DOWRUPTS
TS DNTMGOTO # GO TO DNPHASE2
TCF NEWLIST
DNPHASE2 CCS DNECADR # SENDING OF DATA IN PROGRESS
DODNADR TC FETCH2WD # YES -- THEN FETCH THE NEXT 2 SP WORDS
MINTIME2 -1DNADR TIME2 # NEGATIVE OF TIME2 1DNADR
TCF +1 # (ECADR OF 3776 + 74001 = 77777)
CCS SUBLIST # IS THE SUBLIST IN CONTROL
# Page 1097
TCF NEXTINSL # YES
DNADRDCR OCT 74001 # DNADR COUNT AND ECADR DECREMENTER
CHKLIST CA CTLIST
EXTEND
BZMF NEWLIST # IT WILL BE NEGATIVE AT END OF LIST
TCF NEXTINCL
NEWLIST INDEX DNLSTCOD
CA DNTABLE # INITIALIZE CTLIST WITH
TS CTLIST # STARTING ADDRESS OF NEW LIST
CS DNLSTCOD
TCF SENDID +3
NEXTINCL INDEX CTLIST
CA 0
CCS A
INCR CTLIST # SET POINTER TO PICK UP NEXT CTLIST WORD
TCF +4 # ON NEXT ENTRY TO PROG. (A SHOULD NOT =0)
XCH CTLIST # SET CTLIST TO NEGATIVE AND PLACE(CODING)
COM # UNCOMPLEMENTED DNADR INTO A. (FOR LA)
XCH CTLIST # (ST IN )
+4 INCR A # (CTLIST)
TS DNECADR # SAVE DNADR
AD MINTIME2 # TEST FOR TIME2 (NEG. OF ECADR)
CCS A
TCF SETWO +1 # DON'T SET WORD ORDER CODE
MINB1314 OCT 47777 # MINUS BIT 13 AND 14 (CAN'T GET HERE)
TCF SETWO +1 # DON'T SET WORD ORDER CODE
SETWO TC WOZERO # GO SET WORD ORDER CODE TO ZERO.
+1 CA DNECADR # RELOAD A WITH THE DNADR.
+2 AD MINB1314 # IS THIS A REGULAR DNADR?
EXTEND
BZMF FETCH2WD # YES. (A MUST NEVER BE ZERO)
AD MINB12 # NO. IS IT A POINTER (DNPTR) OR A
EXTEND # CHANNEL(DNCHAN)
BZMF DODNPTR # IT'S A POINTER. (A MUST NEVER BE ZERO)
DODNCHAN TC 6 # (EXECUTED AS EXTEND) IT'S A CHANNEL
INDEX DNECADR
INDEX 0 -4000 # (EXECUTED AS READ)
TS L
TC 6 # (EXECUTED AS EXTEND)
INDEX DNECADR
INDEX 0 -4001 # (EXECUTED AS READ)
TS DNECADR # SET DNECADR
CA NEGONE # TO MINUS
XCH DNECADR # WHILE PRESERVING A.
TCF DNTMEXIT # GO SEND CHANNELS
WOZERO CS BIT7
EXTEND
# Page 1098
WAND CHAN13 # SET WORD ORDER CODE TO ZERO
TC Q # RETURN TO CALLER
DODNPTR INDEX DNECADR # DNECADR CONTAINS ADRES OF SUBLIST
0 0 # CLEAR AND ADD LIST ENTRY INTO A.
CCS A # IS THIS A SNAPSHOT SUBLIST
CA DNECADR # NO, IT IS A REGULAR SUBLIST.
TCF DOSUBLST # A MUST NOT BE ZERO.
XCH DNECADR # YES. IT IS A SNAPSHOT SUBLIST.
TS SUBLIST # C(DNECADR) INTO SUBLIST
CAF ZERO # A INTO A
XCH TMINDEX # (NOTE: TMINDEX = DNECADR)
# THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
# THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
# THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
# TO MINIMIZE TIME. THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
# THESE RULES ARE ......
# 1. ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
# 2. THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
SNAPLOOP TS EBANK # SET EBANK
MASK LOW8 # ISOLATE RELATIVE ADDRESS
EXTEND
INDEX A
EBANK= 1401
DCA 1401 # PICK UP 2 SNAPSHOT WORDS.
EBANK= DNTMBUFF
INDEX TMINDEX
DXCH DNTMBUFF # STORE 2 SNAPSHOT WORDS IN BUFFER
INCR TMINDEX # SET BUFFER INDEX FOR NEXT 2 WORDS.
INCR TMINDEX
SNAPAGN INCR SUBLIST # SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
INDEX SUBLIST
0 0 # = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
CCS A # TEST FOR LAST TWO WORDS OF SNAPSHOT.
TCF SNAPLOOP # NOT LAST TWO.
LDNPHAS2 GENADR DNPHASE2
TS SUBLIST # YES, LAST. SAVE A.
CA NEGONE # SET DNECADR AND
TS DNECADR # SUBLIST POINTERS
XCH SUBLIST # TO NEGATIVE VALUES
TS EBANK
MASK LOW8
EXTEND
INDEX A
EBANK= 1401
# Page 1099
DCA 1401 # PICK UP FIRST 2 WORDS OF SNAPSHOT.
EBANK= DNTMBUFF
SNAPEND TCF DNTMEXIT # NOW GO SEND THEM.
FETCH2WD CA DNECADR
TS EBANK # SET EBANK
MASK LOW8 # ISOLATE RELATIVE ADDRESS
TS L
CA DNADRDCR # DECREMENT COUNT AND ECADR
ADS DNECADR
EXTEND
INDEX L
EBANK= 1400
DCA 1400 # PICK UP 2 DATA WORDS
EBANK= DNTMBUFF
TCF DNTMEXIT # NOW GO SEND THEM.
DOSUBLST TS SUBLIST # SET SUBLIST POINTER
NEXTINSL INDEX SUBLIST
0 0 # = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
CCS A # IS IT THE END OF THE SUBLIST
INCR SUBLIST # NO --
TCF +4
TS SUBLIST # SAVE A.
CA NEGONE # SET SUBLIST TO MINUS
XCH SUBLIST # RETRIEVE A.
+4 INCR A
TS DNECADR # SAVE DNADR
TCF SETWO +2 # GO USE COMMON CODING (PROBLEMS WOULD
# OCCUR IF THE PROGRAM ENCOUNTERED A
# DNPTR NOW)
DNTMEXIT EXTEND # DOWN-TELEMETRY EXIT
WRITE DNTM1 # TO SEND A + L TO CHANNELS 34 + 35
CA L # RESPECTIVELY
TMEXITL EXTEND
WRITE DNTM2
TMRESUME TCF RESUME # EXIT TELEMTRY PROGRAM VIA RESUME.
MINB12 EQUALS -1/8
DNECADR EQUALS TMINDEX
CTLIST EQUALS LDATALST
SUBLIST EQUALS DNQ
# Page 1100
# SUBROUTINE NAME -- DNDUMP
#
# FUNCTIONAL DESCRIPTION -- TO SEND (DUMP) ALL 8 BANKS OF ERASABLE STORAGE TWICE. BANKS ARE SENT ONE AT A TIME
# EACH BANK IS PRECEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
# EBANK. EBANKS ARE DUMPED IN ORDER (I.E., EBANK 0 FIRST, THEN EBANK1 ETC.)
#
# CALLING SEQUENCE -- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
# AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
# WILL BEGIN.
#
# ONCE INITITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
# BY THE FOLLOWING:
#
# 1. A FRESH START
# 2. COMPLETION OF ALL DOWNLINK DUMPS REQUESTED (ACCORDING TO BITS SET IN DUMPCNT). NOTE THAT DUMPCNT
# CAN BE ALTERED BY A V21N01.
# 3. AND INVOLUNTARILY BY A RESTART.
#
# NORMAL EXIT MODE -- TCF DNPHASE1
#
# ALARM OR ABORT MODE -- NONE
#
# *SUBROUTINES CALLED -- NONE
#
# ERASABLE INITIALIZATION REQUIRED --
# DUMPCNT OCT 20000 IF 4 COMPLETE ERASABLE DUMPS ARE DESIRED
# DUMPCNT OCT 10000 IF 2 COMPLETE ERASABLE DUMPS ARE DESIRED
# DUMPCNT OCT 04000 IF 1 COMPLETE ERASABLE DUMP IS DESIRED
#
# DEBRIS -- DUMPLOC, DUMPSW, DNTMGOTO, EBANK, AND CENTRAL REGISTERS
#
# TIMING -- TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
# TIME (IN SECS) = ( 4 )*( 8 )*( 256 + 4 ) / 100
# THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
#
# STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM --
# (REMINDER -- THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
#
# DOWNLIST W
# WORD TAKEN FROM CONTENTS OF EXAMPLE O COMMENTS
# 1 ERASID 0177X 0 DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
# 2 LOWIDCOD 77340 1 DOWNLINK SYNCH BITS. (SAME ONE USED IN ALL OTHER DOWNLISTS)
# 3 DUMPLOC 13400 1 (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
# 4 TIME1 14120 1 TIME IN CENTISECONDS
# 5 FIRST WORD OF EBANK X 03400 1 IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
# 6 2ND WORD OF EBANK X 00142 1 IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
# 7. 3RD WORD OF EBANK X 00142 1 IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
# .
# .
# .
# 260D 256TH WORD OF EBANK X 03777 1 IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
#
# NOTE -- DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
# THE BIT STRUCTURE OF DUMPLOC IS FOLLOW --
# X = NOT USED
# X ABC EEE RRRRRRRR ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2, OR 3 WHICH MEANS THAT
# COMPLETE ERASABLE DUMP NUMBER 1,2,3, OR 4 RESPECTIVELY IS IN PROGRESS)
# EEE = EBANK BITS
# RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK
# Page 1101
DNDUMPI CA ZERO # INITIALIZE DOWNLINK
TS DUMPLOC # ERASABLE DUMP
+2 TC SENDID # GO SEND ID AND SYNCH BITS
CA LDNDUMP1 # SET DNTMGOTO
TS DNTMGOTO # TO LOCATION FOR NEXT PASS
CA TIME1 # PLACE TIME1
XCH L # INTO L
CA DUMPLOC # AND ECADR OF THIS EBANK INTO A
TCF DNTMEXIT # SEND DUMPLOC AND TIME1
LDNDUMP ADRES DNDUMP
LDNDUMP1 ADRES DNDUMP1
DNDUMP CA TWO # INCREMENT ECADR IN DUMPLOC
ADS DUMPLOC # TO NEXT DP WORD TO BE
MASK LOW8 # DUMPED AND SAVE IT.
CCS A # IS THIS THE BEGINNING OF A NEW EBANK
TCF DNDUMP2 # NO -- THEN CONTINUE DUMPING
CA DUMPLOC # YES -- IS THIS THE END OF THE
MASK DUMPCNT # N-TH(N = 1 TO 4) COMPLETE ERASABLE
MASK PRIO34 # DUMP(BIT14 FOR 4, BIT13 FOR 2 OR BIT12
CCS A # FOR 1 COMPLETE ERASABLE DUMP(S)).
TCF DNPHASE1 # YES -- SEND DOWNLIST AGAIN
# AGAIN
TCF DNDUMPI +2 # NO -- GO BACK AND INITIALZE NEXT BANK
DNDUMP1 CA LDNDUMP # SET DNTMGOTO
TS DNTMGOTO # FOR WORDS 3 TO 256D OF CURRENT EBANK
DNDUMP2 CA DUMPLOC
TS EBANK # SET EBANK
MASK LOW8 # ISOLATE RELATIVE ADDRESS.
TS Q # (NOTE: MASK INSTRUCTION IS USED TO PICK
CA NEG0 # UP ERASABLE REGISTERS TO THAT EDITING
TS L # REGISTERS 20-23 WILL NOT BE ALTERED.)
INDEX Q
EBANK= 1400 # PICK UP LOW ORDER REGISTER OF PAIR
MASK 1401 # OF ERASABLE REGISTERS.
XCH L
INDEX Q # PICK UP HIGH ORDER REGISTER OF PAIR
MASK 1400 # OF ERASABLE REGISTERS.
EBANK= DNTMBUFF
TCF DNTMEXIT # GO SEND THEM
SENDID EXTEND # ** ENTRANCE USED BY ERASABLE DUMP PROG. **
QXCH DNTMGOTO # SET DNTMGOTO SO NEXT TIME PROG WILL GO
CAF ERASID # TO LOCATION FOLLOWING `TC SENDID'
TS L # ** ENTRANCE USED BY REGULAR DOWNLINK PG **
# Page 1102
TC WOZERO # GO SET WORD ORDER CODE TO ZERO
CAF LOWIDCOD # PLACE SPECIAL ID CODE INTO L
XCH L # AND ID BACK INTO A
TCF DNTMEXIT # SEND DOWNLIST ID CODE(S).

410
DOWNLINK_LISTS.s Normal file
View File

@ -0,0 +1,410 @@
# Copyright: Public domain.
# Filename: DOWNLINK_LISTS.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 170-180
# Contact: Ron Burkey <info@sandroid.org>,
# Fabrizio Bernardini <fabrizio@spacecraft.it>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 10/05/09 FB Transcription of Batch FB-1 Assignment.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 170
BANK 22
SETLOC DOWNTELM
BANK
EBANK= DNTMBUFF
# SPECIAL DOWNLINK OP CODES
# OP CODE ADDRESS (EXAMPLE) SENDS... BIT 15 BITS 14-12 BITS 11-0
# ------- ----------------- -------- ------ ---------- ---------
# 1DNADR TIME2 (2 AGC WDS) 0 0 ECADR
# 2DNADR TEPHEM (4 AGC WDS) 0 1 ECADR
# 3DNADR VGBODY (6 AGC WDS) 0 2 ECADR
# 4DNADR STATE (8 AGC WDS) 0 3 ECADR
# 5DNADR UPBUFF (10 AGC WDS) 0 4 ECADR
# 6DNADR DSPTAB (12 AGC WDS) 0 5 ECADR
# DNCHAN 30 CHANNELS 0 7 CHANNEL
# ADDRESS
# DNPTR NEXTLIST POINTS TO NEXT 0 6 ADRES
# LIST
#
# DOWNLIST FORMAT DEFINITIONS AND RULES --
# 1. END OF A LIST = -XDNADR (X = 1 TO 6), -DNPTR, OR -DNCHAN.
# 2. SNAPSHOT SUBLIST = LIST WHICH STARTS WITH A -1DNADR.
# 3. SNAPSHOT SUBLIST CAN ONLY CONTAIN 1DNADRS.
# 4. TIME2 1DNADR MUST BE LOCATED IN THE CONTROL LIST OF A DOWNLIST.
# 5. ERASABLE DOWN TELEMETRY WORDS SHOULD BE GROUPED IN SEQUENTIAL
# LOCATIONS AS MUCH AS POSSIBLE TO SAVE STORAGE USED BY DOWNLINK LISTS.
# 6. THE DOWNLINK LISTS (INCLUDING SUBLISTS) ARE ORGANIZED SUCH THAT THE ITEMS LISTED FIRST (IN FRONT OF FBANK) ARE
# SENT FIRST. EXCEPTION--- SNAPSHOT SUBLISTS. IN THE SNAPSHOT SUBLISTS THE DATA REPRESENTED BY THE FIRST
# 11 1DNADRS IS PRESERVED (IN ORDER) IN DNTMBUFF AND SENT BY THE NEXT 11 DOWNRUPTS. THE DATA REPRESENTED BY THE
# LIST IS SENT IMMEDIATELY.
COUNT 05/DLIST
ERASZERO EQUALS 7
SPARE EQUALS ERASZERO # USE SPARE TO INDICATE AVAILABLE SPACE
LOWIDCOD OCT 77340 # LOW ID CODE
NOMDNLST EQUALS CMCSTADL # FRESH START AND POST P27 DOWNLIST
UPDNLIST EQUALS CMENTRDL # UPDATE PROGRAM (P27) DOWNLIST
# Page 171
# CSM POWERED FLIGHT DOWNLIST
#
# --------------------- CONTROL LIST -------------------------
CMPOWEDL EQUALS
DNPTR CMPOWE01 # COLLECT SNAPSHOT
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMPOWE02 # COLLECT SECOND SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMPOWE03 # COMMON DATA
1DNADR TIG # TIG,+1
1DNADR DELLT4 # DELLT4,+1
3DNADR RTARG # RTARG,+1,+2,...+5
1DNADR TGO # TGO,+1
1DNADR PIPTIME1 # PIPTIME1,+1
3DNADR DELV # DELV,+1,...,+4,+5
1DNADR PACTOFF # PACTOFF,YACTOFF
1DNADR PCMD # PCMD,YCMD
1DNADR CSTEER # CSTEER,+1
3DNADR DELVEET1 # CSI DELTA VELOCITY COMPONENTS (31-33)
6DNADR REFSMMAT # REFSMMAT,+1,...+10,+11
DNPTR CMPOWE04 # COMMON DATA
1DNADR TIME2 # TIME2,TIME1
DNPTR CMPOWE05 # COMMON DATA
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMPOWE02 # COLLECT SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMPOWE03 #
DNPTR CMPOWE06 # COMMON DATA
1DNADR ELEV # ELEV,+1
1DNADR CENTANG # CENTANG,+1
1DNADR DELTAR # DELTAR,+1
1DNADR STATE +10D # FLAGWORDS 10 AND 11
1DNADR TEVENT # TEVENT,+1
1DNADR PCMD # PCMD,YCMD
1DNADR OPTMODES # OPTMODES,HOLDFLAG
DNPTR CMPOWE07 # COMMON DATA
3DNADR VGTIG # VGTIG,+1,...,+4,+5
-3DNADR DELVEET2 # CDH DELTA VELOCITY COMPONENTS (98-100)
# --------------------- SUB LISTS ---------------------------
CMPOWE01 -1DNADR RN +2 # RN +2,+3 SNAPSHOT DATA
1DNADR RN +4 # RN +4,+5
1DNADR VN # VN, +1
1DNADR VN +2 # VN +2,+3
1DNADR VN +4 # VN +4,+5
1DNADR PIPTIME # PIPTIME, +1
-1DNADR RN # RN, +1
CMPOWE02 -1DNADR CDUZ # CDUZ,CDUT SNAPSHOT DATA
# Page 172
1DNADR ADOT # ADOT,+1/OGARATE,+1
1DNADR ADOT +2 # ADOT+2,+3/OMEGAB+2,+3
1DNADR ADOT +4 # ADOT+4,+5/OMEGAB+4,+5
-1DNADR CDUX # CDUX,CDUY
CMPOWE03 2DNADR AK # AK,AK1,AK2,RCSFLAGS COMMON DATA
-2DNADR THETADX # THETADX,THETADY,THETADZ,GARBAGE
CMPOWE04 5DNADR STATE # FLAGWRD0 THRU FLAGWRD9 COMMON DATA
-6DNADR DSPTAB # DISPLAY TABLES
CMPOWE05 -1DNADR R-OTHER +2 # R-OTHER+2,+3 SNAPSHOT DATA
1DNADR R-OTHER +4 # R-OTHER+4,+5
1DNADR V-OTHER # V-OTHER,+1
1DNADR V-OTHER +2 # V-OTHER+2,+3
1DNADR V-OTHER +4 # V-OTHER+4,+5
1DNADR T-OTHER # T-OTHER,+1
-1DNADR R-OTHER # R-OTHER,+1
CMPOWE06 1DNADR RSBBQ # RSBBQ,+1 COMMON DATA
3DNADR CADRFLSH # CADRFLSH,+1,+2,FAILREG,+1,+2
-2DNADR CDUS # CDUS,PIPAX,PIPAY,PIPAZ
CMPOWE07 1DNADR LEMMASS # LEMMASS,CSMMASS COMMON DATA
1DNADR DAPDATR1 # DAPDATR1,DAPDATR2
2DNADR ERRORX # ERRORX,ERRORY,ERRORZ,GARBAGE
3DNADR WBODY # WBODY,...+5/OMEGAC,...+5
2DNADR REDOCTR # REDOCTR,THETAD,+1,+2
1DNADR IMODES30 # IMODES30,IMODES33
DNCHAN 11 # CHANNELS 11,12
DNCHAN 13 # CHANNELS 13,14
DNCHAN 30 # CHANNELS 30,31
-DNCHAN 32 # CHANNELS 32,33
# -----------------------------------------------------------
# Page 173
# CSM COAST AND ALIGNMENT DOWNLIST
# --------------------- CONTROL LIST ------------------------
CMCSTADL EQUALS # SEND ID BY SPECIAL CODING
DNPTR CMCSTA01 # COLLECT SNAPSHOT
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMCSTA02 # COLLECT SECOND SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMCSTA03 # COMMON DATA
1DNADR TIG # TIG,+1
1DNADR BESTI # BESTI,BESTJ
4DNADR MARKDOWN # MARKDOWN,+1,...+5,+6,GARBAGE
4DNADR MARK2DWN # MARK2DWN,+1,...+5,+6
2DNADR HAPOX # APOGEE AND PERIGEE FROM R30 (28-29)
1DNADR PACTOFF # PACTOFF, YACTOFF (30)
3DNADR VGTIG # VGTIG,...+5
6DNADR REFSMMAT # REFSMMAT,+1,...+10,+11
DNPTR CMCSTA04 # COMMON DATA
1DNADR TIME2 # TIME2,TIME1
DNPTR CMCSTA05 # COLLECT SNAPSHOT
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMCSTA02 # COLLECT SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMCSTA03 # COMMON DATA
DNPTR CMCSTA06 # COMMON DATA
3DNADR OGC # OGC,+1,IGC,+1,MGC,+1
1DNADR STATE +10D # FLAGWRDS 10 AND 11
1DNADR TEVENT # TEVENT,+1
1DNADR LAUNCHAZ # LAUNCHAZ,+1
1DNADR OPTMODES # OPTMODES,HOLDFLAG
DNPTR CMCSTA07 # COMMON DATA
-6DNADR DSPTAB # DISPLAY TABLES
# --------------------- SUB LISTS ---------------------------
CMCSTA01 EQUALS CMPOWE01 # COMMON DOWNLIST DATA
CMCSTA02 EQUALS CMPOWE02 # COMMON DOWNLIST DATA
CMCSTA03 EQUALS CMPOWE03 # COMMON DOWNLIST DATA
CMCSTA04 EQUALS CMPOWE04 # COMMON DOWNLIST DATA
CMCSTA05 EQUALS CMPOWE05 # COMMON DOWNLIST DATA
CMCSTA06 EQUALS CMPOWE06 # COMMON DOWNLIST DATA
CMCSTA07 EQUALS CMPOWE07 # COMMON DOWNLIST DATA
# Page 174
# -----------------------------------------------------------
# Page 175
# CSM RENDEZVOUS AND PRETHRUST LIST
# --------------------- CONTROL LIST ------------------------
CMRENDDL EQUALS # SEND ID BY SPECIAL CODING
DNPTR CMREND01 # COLLECT SNAPSHOT
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMREND02 # COLLECT SECOND SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMREND03 # COMMON DATA
1DNADR TIG # TIG,+1
1DNADR DELLT4 # DELLT4,+1
3DNADR RTARG # RTARG,+1,...+4,+5
1DNADR VHFTIME # VHFTIME,+1
4DNADR MARKDOWN # MARKTIME(DP),YCDU,SCDU,ZCDU,TCDU,XCDU,RM
1DNADR VHFCNT # VHFCNT,+1
1DNADR TTPI # TTPI,+1
1DNADR ECSTEER # ECSTEER,+1
1DNADR DELVTPF # DELVTPF,+1
2DNADR TCDH # CDH AND CSI TIME (32-33)
1DNADR TPASS4 # TPASS4,+1
3DNADR DELVSLV # DELVSLV,+1...+4,+5
2DNADR RANGE # RANGE,+1,RRATE,+1
DNPTR CMREND04 # COMMON DATA
1DNADR TIME2 # TIME2,TIME1
DNPTR CMREND05 # COLLECT SNAPSHOT
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMREND02 # COLLECT SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMREND03 # COMMON DATA
DNPTR CMREND06 # COMMON DATA
1DNADR DIFFALT # CDH DELTA ALTITUDE
1DNADR CENTANG # CENTANG,+1
1DNADR DELTAR # DELTAR,+1
3DNADR DELVEET3 # DELVEET3,+1,...,+4,+5
1DNADR OPTMODES # OPTMODES,HOLDFLAG
DNPTR CMREND07 # COMMON DATA
1DNADR RTHETA # RTHETA,+1
2DNADR LAT(SPL) # LAT(SPL),LNG(SPL),+1
2DNADR VPRED # VPRED,+1,GAMMAEI,+1
-1DNADR STATE +10D # FLAGWRDS 10 AND 11
# --------------------- SUB LISTS ----------------------------
CMREND01 EQUALS CMPOWE01 # COMMON DOWNLIST DATA
CMREND02 EQUALS CMPOWE02 # COMMON DOWNLIST DATA
CMREND03 EQUALS CMPOWE03 # COMMON DOWNLIST DATA
CMREND04 EQUALS CMPOWE04 # COMMON DOWNLIST DATA
# Page 176
CMREND05 EQUALS CMPOWE05 # COMMON DOWNLIST DATA
CMREND06 EQUALS CMPOWE06 # COMMON DOWNLIST DATA
CMREND07 EQUALS CMPOWE07 # COMMON DOWNLIST DATA
# ------------------------------------------------------------
# Page 177
# CSM ENTRY AND UPDATE DOWNLIST
# --------------------- CONTROL LIST -------------------------
CMENTRDL EQUALS # SEND ID BY SPECIAL CODING
DNPTR CMENTR01 # COLLECT SNAPSHOT
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMENTR02 # COLLECT SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMENTR03 # COMMON DATA
2DNADR CMDAPMOD # CMDAPMOD,PREL,QREL,RREL
1DNADR L/D1 # L/D1,+1
6DNADR UPBUFF # UPBUFF,+1,...+10,+11
4DNADR UPBUFF +12D # UPBUFF+12,13,...+18,+19D
2DNADR COMPNUMB # COMPNUMB,UPOLDMOD,UPVERB,UPCOUNT
1DNADR PAXERR1 # PAXERR1,ROLLTM
3DNADR LATANG # LATANG,+1,RDOT,+1,THETAH,+1
2DNADR LAT(SPL) # LAT(SPL),+1,LNG(SPL),+1
1DNADR ALFA/180 # ALFA/180,BETA/180
DNPTR CMENTR04 # COMMON DATA
1DNADR TIME2 # TIME2,TIME1
DNPTR CMENTR05 # COLLECT SNAPSHOT
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMENTR02 # COLLECT SNAPSHOT
4DNADR DNTMBUFF # SENT SNAPSHOT
2DNADR AK # AK,AK1,AK2,RCSFLAGS
3DNADR ERRORX # ERRORX/Y/Z,THETADX/Y/Z
2DNADR CMDAPMOD # CMDAPMOD,PREL,QREL,RREL
6DNADR UPBUFF # UPBUFF+0,+1,...+10,+11D
4DNADR UPBUFF +12D # UPBUFF+12,+13,...+18,+19D
1DNADR LEMMASS # LEMMASS,CSMMASS
1DNADR DAPDATR1 # DAPDATR1,DAPDATR2
1DNADR ROLLTM # ROLLTM,ROLLC
1DNADR OPTMODES # OPTMODES,HOLDFLAG
3DNADR WBODY # WBODY,...+5/OMEGAC,...+5
2DNADR REDOCTR # REDOCTR,THETAD+0,+1,+2
1DNADR IMODES30 # IMODES30,IMODES33
DNCHAN 11 # CHANNELS 11,12
DNCHAN 13 # CHANNELS 13,14
DNCHAN 30 # CHANNELS 30,31
DNCHAN 32 # CHANNELS 32,33
1DNADR RSBBQ # RSBBQ,+1
3DNADR CADRFLSH # CADRFLSH,+1,+2,FAILREG,+1,+2
1DNADR STATE +10D # FLAGWRDS 10 AND 11
-1DNADR GAMMAEI # GAMMAEI,+1
# --------------------- SUB LISTS ----------------------------
CMENTR01 EQUALS CMPOWE01 # COMMON DOWNLIST DATA
# Page 178
CMENTR02 EQUALS CMPOWE02 # COMMON DOWNLIST DATA
CMENTR03 EQUALS CMPOWE03 # COMMON DOWNLIST DATA
CMENTR04 EQUALS CMPOWE04 # COMMON DOWNLIST DATA
CMENTR05 -1DNADR DELV # DELV,+1 SNAPSHOT DATA
1DNADR DELV +2 # DELV+2,+3
1DNADR DELV +4 # DELV+4,+5
1DNADR TTE # TTE,+1
1DNADR VIO # VIO,+1
1DNADR VPRED # VPRED,+1
-1DNADR PIPTIME1 # PIPTIME1,+1
CMENTR07 EQUALS CMPOWE07 # COMMON DOWNLIST DATA
# -------------------------------------------------------------
# Page 179
# --------------------- CONTROL LIST --------------------------
CMPG22DL EQUALS # SEND ID BY SPECIAL CODING
DNPTR CMPG2201 # COLLECT SNAPSHOT
6DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMPG2202 # COLLECT SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMPG2203 # COMMON DATA
6DNADR SVMRKDAT # LANDING SITE MARK DATA
6DNADR SVMRKDAT +12D # SVMRKDAT+0,...+34
6DNADR SVMRKDAT +24D # LANDING SITE MARK DATA
1DNADR LANDMARK # LANDMARK,GARBAGE
1DNADR SPARE
1DNADR SPARE
1DNADR SPARE
DNPTR CMPG2204 # COMMON DATA
1DNADR TIME2 # TIME2,TIME1
DNPTR CMPG2205 # COLLECT SNAPSHOT
2DNADR DNTMBUFF # SEND SNAPSHOT
1DNADR SPARE
1DNADR SPARE
1DNADR SPARE
1DNADR SPARE
DNPTR CMPG2202 # COLLECT SNAPSHOT
4DNADR DNTMBUFF # SEND SNAPSHOT
DNPTR CMPG2203 # COMMON DATA
DNPTR CMPG2206 # COMMON DATA
1DNADR 8NN # 8NN,GARBAGE
1DNADR STATE +10D # FLAGWRDS 10 AND 11
3DNADR RLS # RLS,+1,...+4,+5
1DNADR SPARE
1DNADR OPTMODES # OPTMODES,HOLDFLAG
DNPTR CMPG2207 # COMMON DATA
1DNADR SPARE
1DNADR SPARE
1DNADR SPARE
1DNADR SPARE
1DNADR SPARE
-1DNADR SPARE
# --------------------- SUB LISTS --------------------------
CMPG2201 EQUALS CMPOWE01 # COMMON DOWNLIST DATA
CMPG2202 EQUALS CMPOWE02 # COMMON DOWNLIST DATA
CMPG2203 EQUALS CMPOWE03 # COMMON DOWNLIST DATA
# Page 180
CMPG2204 EQUALS CMPOWE04 # COMMON DOWNLIST DATA
CMPG2205 -1DNADR LONG # LONG,+1 SNAPSHOT DATA
1DNADR ALT # ALT,+1
-1DNADR LAT # LAT,+1
CMPG2206 EQUALS CMPOWE06 # COMMON DOWNLIST DATA
CMPG2207 EQUALS CMPOWE07 # COMMON DOWNLIST DATA
# -----------------------------------------------------------
DNTABLE GENADR CMCSTADL
GENADR CMENTRDL
GENADR CMRENDDL
GENADR CMPOWEDL
GENADR CMPG22DL
# -----------------------------------------------------------

455
DOWN_TELEMETRY_PROGRAM.s Normal file
View File

@ -0,0 +1,455 @@
# Copyright: Public domain.
# Filename: DOWN_TELEMETRY_PROGRAM.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 988-997
# Mod history: 2009-05-24 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 988
# PROGRAM NAME -- DOWN TELEMETRY PROGRAM
# MOD NO. -- 0 TO COMPLETELY REWRITE THE DOWN TELEMETRY PROGRAM AND DOWNLINK ERASABLE DUMP PROGRAM FOR THE
# PURPOSE OF SAVING APPROXIMATELY 150 WORDS OF CORE STORAGE.
# THIS CHANGE REQUIRES AN ENTIRELY NEW METHOD OF SPECIFYING DOWNLINK LISTS. REFER TO DOWNLINK
# LISTS LOG SECTION FOR MORE DETAILS. HOWEVER THIS CHANGE WILL NOT AFFECT THE GROUND PROCESSING
# OF DOWN TELEMETRY DATA.
# MOD BY -- KILROY, SMITH, DEWITT
# DATE -- 02 OCT 67
# AUTHORS -- KILROY, SMITH, DWWITT, DEWOLF, FAGIN
# LOG SECTION -- DOWN-TELEMETRY PROGRAM
#
# FUNCTIONAL DESCRIPTION -- THIS ROUTINE IS INITIATED BY TELEMETRY END
# PULSE FROM THE DOWNLINK TELEMETRY CONVERTER. THIS PULSE OCCURS
# AT 50 TIMES PER SEC (EVERY 20 MS) THEREFORE DODOWNTM IS
# EXECUTED AT THESE RATES. THIS ROUTINE SELECTS THE APPROPRIATE
# AGC DATA TO BE TRANSMITTED DOWNLINK AND LOADS IT INTO OUTPUT
# CHANNELS 34 AND 35. THE INFORMATION IS THEN GATED OUT FROM THE
# LGC IN SERIAL FASHION.
#
# THIS PROGRAM IS CODED FOR A 2 SECOND DOWNLIST. SINCE DOWNRUPTS
# OCCUR EVERY 20 MS AND 2 AGC COMPUTER WORDS CAN BE PLACED IN
# CHANNELS 34 AND 35 DURING EACH DOWNRUPT THE PROGRAM IS CAPABLE
# OF SENDING 200 AGC WORDS EVERY 2 SECONDS.
#
# CALLING SEQUENCE -- NONE
# PROGRAM IS ENTERED VIA TCF DODOWNTM WHICH IS EXECUTED AS A
# RESULT OF A DOWNRUPT. CONTROL IS RETURNED VIA TCF RESUME WHICH
# IN EFFECT IS A RESUME.
#
# SUBROUTINES CALLED -- NONE
#
# NORMAL EXIT MODE -- TCF RESUME
#
# ALARM OR ABORT EXIT MODE -- NONE
#
# RESTART PROTECTION:
# ON A FRESH START AND RESTART THE `STARTSUB' SUBROUTINE WILL INITIALIZE THE DOWNLIST POINTER (ACTUALLY
# DNTMGOTO) TO THE BEGINNING OF THE CURRENT DOWNLIST (I.E., CURRENT CONTENTS OF DNLSTADR). THIS HAS THE
# EFFECT OF IGNORING THE REMAINDER OF THE DOWNLIST WHICH THE DOWN-TELEMETRY PROGRAM WAS WORKING ON WHEN
# THE RESTART (OR FRESH START) OCCURRED AND RESUME DOWN TELEMETRY FROM THE BEGINNING OF THE CURRENT
# DOWNLIST.
#
# ALSO OF INTEREST IS THE FACT THAT ON A RESTART THE AGC WILL ZERO DOWNLINK CHANNELS 13, 34 AND 35.
#
# DOWNLINK LIST SELECTION:
# THE APPROPRIATE DOWNLINK LISTS ARE SELECTED BY THE FOLLOWING:
# 1. FRESH START
# 2. V37EXXE WHERE XX = THE MAJOR MODE BEING SELECTED.
# 3. UPDATE PROGRAM (P27)
# 4. NON-V37 SELECTABLE TYPE PROGRAMS (E.G., AGS INITIALIZATION (SUNDANCE, LUMINARY) AND P61-P62
# TRANSITION (COLOSSUS) ETC.).
#
# DOWNLINK LIST RULES AND LIMITATIONS:
# READ SECTION(S) WHICH FOLLOW `DEBRIS' WRITEUP.
#
# OUTPUT -- EVERY 2 SECONDS 100 DOUBLE PRECISION WORDS (I.E., 200 LGC
# COMPUTER WORDS) ARE TRANSMITTED VIA DOWNLINK.
#
# ERASABLE INITIALIZATION REQUIRED -- NONE
# `DNTMGOTO' AND `DNLSTADR' ARE INITIALIZED BY THE FRESH START PROGRAM.
#
# DEBRIS (ERASABLE LOCATIONS DESTROYED BY THIS PROGRAM) --
# LDATALST, DNTMBUFF TO DNTMBUFF +21D, TMINDEX, DNQ.
# Page 989 (empty page)
# Page 990
# DODOWNTM IS ENTERED EVERY 20 MS BY AN INTERRUPT TRIGGERED BY THE
# RECEIPT OF AN ENDPULSE FROM THE SPACECRAFT TELEMETRY PROGRAMMER.
#
# NOTES REGARDING DOWNLINK LISTS ASSOCIATED WITH THIS PROGRAM:
# 1. DOWNLISTS. DOWNLISTS MUST BE COMPILED IN THE SAME BANK AS THE
# DOWN-TELEMETRY PROGRAM. THIS IS DONE FOR EASE OF CODING, FASTER
# EXECUTION.
# 2. EACH DOWNLINK LIST CONSISTS OF A CONTROL LIST AND A NUMBER OF
# SUBLISTS.
# 3. A SUBLIST REFERS TO A SNAPSHOT OR DATA COMMON TO THE SAME OR OTHER
# DOWNLINK LISTS. ANY SUBLIST CONTAINING COMMON DATA NEEDS TO BE
# CODED ONLY ONCE FOR THE APPLICABLE DOWNLINK LISTS.
# 4. SNAPSHOT SUBLISTS REFER SPECIFICALLY TO HOMOGENEOUS DATA WHICH MUST BE
# SAVED IN A BUFFER DURING ONE DOWNRUPT.
# 5. THE 1DNADR FOR THE 1ST WORD OF SNAPSHOT DATA IS FOUND AT THE END
# OF EACH SNAPSHOT SUBLIST, SINCE THE PROGRAM CODING SENDS THIS DP WORD
# IMMEDIATELY AFTER STORING THE OTHERS IN THE SNAPSHOT BUFFER.
# 6. ALL LISTS ARE COMBINATIONS OF CODED ERASABLE ADDRESS CONSTANTS
# CREATED FOR THE DOWNLIST PROGRAM.
# A. 1DNADR 1-WORD DOWNLIST ADDRESS.
# SAME AS ECADR, BUT USED WHEN THE WORD ADDRESSED IS THE LEFT
# HALF OF A DOUBLE-PRECISION WORD FOR DOWN TELEMETRY.
# B. 2DNADR - 6DNADR N-WORD DOWNLIST ADDRESS, N = 2 - 6.
# SAME AS 1DNADR, BUT WTIH THE 4 UNUSED BITS OF THE ECADR FORMAT
# FILLED IN WITH 0001-0101. USED TO POINT TO A LIST OF N DOUBLE-
# PRECISION WORDS, STORED CONSECUTIVELY, FOR DOWN TELEMETRY.
# C. DNCHAN DOWNLIST CHANNEL ADDRESS.
# SAME AS 1DNADR, BUT WITH PREFIX BITS 0111. USED TO POINT TO
# A PAIR OF CHANNELS FOR DOWN TELEMETRY.
# D. DNPTR DOWN-TELEMETRY SUBLIST POINTER.
# SAME AS CAF BUT TAGGED AS A CONSTANT. USED IN CONTROL LIST TO POINT TO A SUBLIST.
# CAUTION --- A DNPTR CANNOT BE USED IN A SUBLIST.
# 7. THE WORD ORDER CODE IS SET TO ZERO AT THE BEGINNING OF EACH DOWNLIST (I.E., CONTROL LIST) AND WHEN
# A `1DNADR TIME2' IS DETECTED IN THE CONTROL LIST (ONLY).
# 8. IN THE SNAPSHOT SUBLIST ONLY, THE DNADR'S CANNOT POINT TO THE FIRST WORD OF ANY EBANK.
#
# DOWNLIST LIST RESTRICTIONS:
# (THE FOLLOWING POINTS MAY BE LISTED ELSEWHERE BUT ARE LISTED HERE SO IT IS CLEAR THAT THESE THINGS CANNOT BE
# DONE)
# 1. SNAPSHOT DOWNLIST:
# (A) CANNOT CONTAIN THE FOLLOWING ECADRS (I.E., 1DNADR'S): Q, 400, 1000, 1400, 2000, 2400, 3000, 3400.
# (B) CAN CONTAIN ONLY 1DNADR'S
# 2. ALL DOWNLINKED DATA (EXCEPT CHANNELS) IS PICKED UP BY A DCA SO DOWNLINK LISTS CANNOT CONTAIN THE
# EQUIVALENT OF THE FOLLOWING ECADRS (I.E., 1DNADRS): 377, 777, 1377, 1777, 2377, 2777, 3377, 3777.
# (NOTE: THE TERM `EQUIVALENT' MEANT THAT THE 1DNADR TO 6DNADR WILL BE PROCESSED LIKE 1 TO 6 ECADRS)
# 3. CONTROL LISTS AND SUBLISTS CANNOT HAVE ENTRIES = OCTAL 00000 OR OCTAL 77777
# Page 991
# 4. THE `1DNADR TIME2' WHICH WILL CAUSE THE DOWNLINK PROGRAM TO SET THE WORDER CODE TO 3 MUST APPEAR IN THE
# CONTROL SECTION OF THE DOWNLIST.
# 5. `DNCHAN 0' CANNOT BE USED.
# 6. `DNPTR 0' CANNOT BE USED.
# 7. DNPTR CANNOT APPEAR IN A SUBLIST.
#
# EBANK SETTINGS
# IN THE PROCESS OF SETTING THE EBANK (WHEN PICKING UP DOWNLINK DATA) THE DOWN TELEMETRY PROGRAM PUTS
# `GARBAGE' INTO BITS15-12 OF EBANK. HUGH BLAIR-SMITH WARNS US THAT BITS15-12 OF EBANK MAY BECOME
# SIGNIFICANT SOMEDAY IN THE FUTURE. IF/WHEN THAT HAPPENS, THE PROGRAM SHOULD INSURE (BY MASKING ETC.)
# THAT BITS 15-12 OF EBANK ARE ZERO.
#
# INITIALIZATION REQUIRED -- TO INTERRUPT CURRENT LIST AND START A NEW ONE.
# 1. ADRES OF DOWNLINK LIST INTO DNLSTADR
# 2. NEGONE INTO SUBLIST
# 3. NEGONE INTO DNECADR
BANK 22
SETLOC DOWNTELM
BANK
EBANK= DNTMBUFF
COUNT* $$/DPROG
DODOWNTM TS BANKRUPT
EXTEND
QXCH QRUPT # SAVE Q
TCF WOTEST
WO1 EXTEND # SET WORD ORDER BIT TO 1 ONLY IF IT
WOR CHAN13 # ALREADY ISN'T
TC DNTMGOTO # GOTO APPROPRIATE PHASE OF PROGRAM
DNPHASE1 CA NEGONE # INITIALIZE ALL CONTROL WORDS
TS SUBLIST # WORDS TO MINUS ONE
TS DNECADR
CA LDNPHAS2 # SET DNTMGOTO = 0 ALL SUSEQUENT DOWRUPTS
TS DNTMGOTO # GO TO DNPHASE2
TCF NEWLIST
DNPHASE2 CCS DNECADR # SENDING OF DATA IN PROGRESS
DODNADR TC FETCH2WD # YES -- THEN FETCH THE NEXT 2 SP WORDS
MINTIME2 -1DNADR TIME2 # NEGATIVE OF TIME2 1DNADR
TCF +1 # (ECADR OF 3776 + 74001 = 77777)
CCS SUBLIST # IS THE SUBLIST IN CONTROL
TCF NEXTINSL # YES
# Page 992
DNADRDCR OCT 74001 # DNADR COUNT AND ECADR DECREMENTER
CHKLIST CA CTLIST
EXTEND
BZMF NEWLIST # IT WILL BE NEGATIVE AT END OF LIST
TCF NEXTINCL
NEWLIST INDEX DNLSTCOD
CA DNTABLE # INITIALIZE CTLIST WITH
TS CTLIST # STARTING ADDRESS OF NEW LIST
CS DNLSTCOD
TCF SENDID +3
NEXTINCL INDEX CTLIST
CA 0
CCS A
INCR CTLIST # SET POINTER TO PICK UP NEXT CTLIST WORD
TCF +4 # ON NEXT ENTRY TO PROG. (A SHOULD NOT =0)
XCH CTLIST # SET CTLIST TO NEGATIVE AND PLACE(CODING)
COM # UNCOMPLEMENTED DNADR INTO A. (FOR LA)
XCH CTLIST # (ST IN )
+4 INCR A # (CTLIST)
TS DNECADR # SAVE DNADR
AD MINTIME2 # TEST FOR TIME2 (NEG. OF ECADR)
CCS A
TCF SETWO +1 # DON'T SET WORD ORDER CODE
MINB1314 OCT 47777 # MINUS BIT 13 AND 14 (CAN'T GET HERE)
TCF SETWO +1 # DON'T SET WORD ORDER CODE
SETWO TC WOZERO # GO SET WORD ORDER CODE TO ZERO.
+1 CA DNECADR # RELOAD A WITH THE DNADR.
+2 AD MINB1314 # IS THIS A REGULAR DNADR?
EXTEND
BZMF FETCH2WD # YES. (A MUST NEVER BE ZERO)
AD MINB12 # NO. IS IT A POINTER (DNPTR) OR A
EXTEND # CHANNEL(DNCHAN)
BZMF DODNPTR # IT'S A POINTER. (A MUST NEVER BE ZERO)
DODNCHAN TC 6 # (EXECUTED AS EXTEND) IT'S A CHANNEL
INDEX DNECADR
INDEX 0 -4000 # (EXECUTED AS READ)
TS L
TC 6 # (EXECUTED AS EXTEND)
INDEX DNECADR
INDEX 0 -4001 # (EXECUTED AS READ)
TS DNECADR # SET DNECADR
CA NEGONE # TO MINUS
XCH DNECADR # WHILE PRESERVING A.
TCF DNTMEXIT # GO SEND CHANNELS
WOZERO CS BIT7
EXTEND
WAND CHAN13 # SET WORD ORDER CODE TO ZERO
# Page 993
TC Q # RETURN TO CALLER
DODNPTR INDEX DNECADR # DNECADR CONTAINS ADRES OF SUBLIST
0 0 # CLEAR AND ADD LIST ENTRY INTO A.
CCS A # IS THIS A SNAPSHOT SUBLIST
CA DNECADR # NO, IT IS A REGULAR SUBLIST.
TCF DOSUBLST # A MUST NOT BE ZERO.
XCH DNECADR # YES. IT IS A SNAPSHOT SUBLIST.
TS SUBLIST # C(DNECADR) INTO SUBLIST
CAF ZERO # A INTO A
XCH TMINDEX # (NOTE: TMINDEX = DNECADR)
# THE FOLLOWING CODING (FROM SNAPLOOP TO SNAPEND) IS FOR THE PURPOSE OF TAKING A SNAPSHOT OF 12 DP REGISTERS.
# THIS IS DONE BY SAVING 11 DP REGISTERS IN DNTMBUFF AND SENDING THE FIRST DP WORD IMMEDIATELY.
# THE SNAPSHOT PROCESSING IS THE MOST TIME CONSUMING AND THEREFORE THE CODING AND LIST STRUCTURE WERE DESIGNED
# TO MINIMIZE TIME. THE TIME OPTIMIZATION RESULTS IN RULES UNIQUE TO THE SNAPSHOT PORTION OF THE DOWNLIST.
# THESE RULES ARE ......
# 1. ONLY 1DNADR'S CAN APPEAR IN THE SNAPSHOT SUBLIST
# 2. THE 1DNADR'S CANNOT REFER TO THE FIRST LOCATION IN ANY BANK.
SNAPLOOP TS EBANK # SET EBANK
MASK LOW8 # ISOLATE RELATIVE ADDRESS
EXTEND
INDEX A
EBANK= 1401
DCA 1401 # PICK UP 2 SNAPSHOT WORDS.
EBANK= DNTMBUFF
INDEX TMINDEX
DXCH DNTMBUFF # STORE 2 SNAPSHOT WORDS IN BUFFER
INCR TMINDEX # SET BUFFER INDEX FOR NEXT 2 WORDS.
INCR TMINDEX
SNAPAGN INCR SUBLIST # SET POINTER TO NEXT 2 WORDS OF SNAPSHOT
INDEX SUBLIST
0 0 # = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
CCS A # TEST FOR LAST TWO WORDS OF SNAPSHOT.
TCF SNAPLOOP # NOT LAST TWO.
LDNPHAS2 GENADR DNPHASE2
TS SUBLIST # YES, LAST. SAVE A.
CA NEGONE # SET DNECADR AND
TS DNECADR # SUBLIST POINTERS
XCH SUBLIST # TO NEGATIVE VALUES
TS EBANK
MASK LOW8
EXTEND
INDEX A
EBANK= 1401
DCA 1401 # PICK UP FIRST 2 WORDS OF SNAPSHOT.
# Page 994
EBANK= DNTMBUFF
SNAPEND TCF DNTMEXIT # NOW TO SEND THEM.
FETCH2WD CA DNECADR
TS EBANK # SET EBANK
MASK LOW8 # ISOLATE RELATIVE ADDRESS
TS L
CA DNADRDCR # DECREMENT COUNT AND ECADR
ADS DNECADR
EXTEND
INDEX L
EBANK= 1400
DCA 1400 # PICK UP 2 DATA WORDS
EBANK= DNTMBUFF
TCF DNTMEXIT # NOW GO SEND THEM.
DOSUBLST TS SUBLIST # SET SUBLIST POINTER
NEXTINSL INDEX SUBLIST
0 0 # = CA SSSS (SSSS = NEXT ENTRY IN SUBLIST)
CCS A # IS IT THE END OF THE SUBLIST
INCR SUBLIST # NO --
TCF +4
TS SUBLIST # SAVE A.
CA NEGONE # SET SUBLIST TO MINUS
XCH SUBLIST # RETRIEVE A.
+4 INCR A
TS DNECADR # SAVE DNADR
TCF SETWO +2 # GO USE COMMON CODING (PROLEMS WOULD
# OCCUR IF THE PROGRAM ENCOUNTERED A
# DNPTR NOW)
DNTMEXIT EXTEND # DOWN-TELEMETRY EXIT
WRITE DNTM1 # TO SEND A + L TO CHANNELS 34 + 35
CA L # RESPECTIVELY
TMEXITL EXTEND
WRITE DNTM2
TMRESUME TCF RESUME # EXIT TELEMTRY PROGRAM VIA RESUME.
MINB12 EQUALS -1/8
DNECADR EQUALS TMINDEX
CTLIST EQUALS LDATALST
SUBLIST EQUALS DNQ
# Page 995
# SUBROUTINE NAME -- DNDUMP
#
# FUNCTIONAL DESCRIPTION -- TO SEND (DUMP) ALL ERASABLE STORAGE 'N' TIMES. (N=1 TO 4). BANKS ARE SENT ONE AT A TIME
# EACH BANK IS PRECEDED BY AN ID WORD, SYNCH BITS, ECADR AND TIME1 FOLLOWED BY THE 256D WORDS OF EACH
# EBANK. EBANKS ARE DUMPED IN ORDER (I.E., EBANK 0 FIRST, THEN EBANK1 ETC.)
#
# CALLING SEQUENCE -- THE GROUND OR ASTRONAUT BY KEYING V74E CAN INITIALIZE THE DUMP.
# AFTER KEYING IN V74E THE CURRENT DOWNLIST WILL BE IMMEDIATELY TERMINATED AND THE DOWNLINK ERASABLE DUMP
# WILL BEGIN.
#
# ONCE INITITIATED THE DOWNLINK ERASABLE DUMP CAN BE TERMINATED (AND INTERRUPTED DOWNLIST REINSTATED) ONLY
# BY THE FOLLOWING:
#
# 1. A FRESH START
# 2. COMPLETION OF ALL DOWNLINK DUMPS REQUESTED (ACCORDING TO BITS SET IN DUMPCNT). NOTE THAT DUMPCNT
# CAN BE ALTERED BY A V21N01.
# 3. AND INVOLUNTARILY BY A RESTART.
#
# NORMAL EXIT MODE -- TCF DNPHASE1
#
# ALARM OR ABORT MODE -- NONE
#
# *SUBROUTINES CALLED -- NONE
#
# ERASABLE INITIALIZATION REQUIRED --
# DUMPCNT OCT 20000 IF 4 COMPLETE ERASABLE DUMPS ARE DESIRED
# DUMPCNT OCT 10000 IF 2 COMPLETE ERASABLE DUMPS ARE DESIRED
# DUMPCNT OCT 04000 IF 1 COMPLETE ERASABLE DUMP IS DESIRED
#
# DEBRIS -- DUMPLOC, DUMPSW, DNTMGOTO, EBANK, AND CENTRAL REGISTERS
#
# TIMING -- TIME (IN SECS) = ((NO.DUMPS)*(NO.EBANKS)*(WDSPEREBANK + NO.IDWDS)) / NO.WDSPERSEC
# TIME (IN SECS) = ( 4 )*( 8 )*( 256 + 4 ) / 100
# THUS TIME (IN SECS TO SEND DUMP OF ERASABLE 4 TIMES VIA DOWNLINK) = 83.2 SECONDS
#
# STRUCTURE OF ONE EBANK AS IT IS SENT BY DOWNLINK PROGRAM --
# (REMINDER -- THIS ONLY DESCRIBES ONE OF THE 8 EBANKS X 4 (DUMPS) = 32 EBANKS WHICH WILL BE SENT BY DNDUMP)
#
# DOWNLIST W
# WORD TAKEN FROM CONTENTS OF EXAMPLE O COMMENTS
# 1 ERASID 0177X 0 DOWNLIST I.D. FOR DOWNLINK ERASABLE DUMP (X=7 CSM, 6 LM)
# 2 LOWIDCOD 77340 1 DOWNLINK SYNCH BITS. (SAME ONE USED IN ALL OTHER DOWNLISTS)
# 3 DUMPLOC 13400 1 (SEE NOTES ON DUMPLOC) 1 = 3RD ERAS DUMP, 3400=ECADR OF 5TH WD
# 4 TIME1 14120 1 TIME IN CENTISECONDS
# 5 FIRST WORD OF EBANK X 03400 1 IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1400 (ECADR 3400)
# 6 2ND WORD OF EBANK X 00142 1 IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1401 (ECADR 3401)
# 7 3RD WORD OF EBANK X 00142 1 IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1402 (ECADR 3402)
# .
# .
# .
# 260D 256TH WORD OF EBANK X 03777 1 IN THIS EXAMPLE THIS WORD = CONTENTS OF E7,1777 (ECADR 3777)
#
# NOTE -- DUMPLOC CONTAINS THE COUNTER AND ECADR FOR EACH WORD BEING SENT.
# THE BIT STRUCTURE OF DUMPLOC IS FOLLOW --
# X = NOT USED
# X ABC EEE RRRRRRRR ABC = ERASABLE DUMP COUNTER (I.E. ABC = 0,1,2, OR 3 WHICH MEANS THAT
# COMPLETE ERASABLE DUMP NUMBER 1,2,3, OR 4 RESPECTIVELY IS IN PROGRESS)
# EEE = EBANK BITS
# RRRRRRRR = RELATIVE ADDRESS WITHIN AN EBANK
# Page 996
DNDUMPI CA ZERO # INITIALIZE DOWNLINK
TS DUMPLOC # ERASABLE DUMP
+2 TC SENDID # GO SEND ID AND SYNCH BITS
CA LDNDUMP1 # SET DNTMGOTO
TS DNTMGOTO # TO LOCATION FOR NEXT PASS
CA TIME1 # PLACE TIME1
XCH L # INTO L
CA DUMPLOC # AND ECADR OF THIS EBANK INTO A
TCF DNTMEXIT # SEND DUMPLOC AND TIME1
LDNDUMP ADRES DNDUMP
LDNDUMP1 ADRES DNDUMP1
DNDUMP CA TWO # INCREMENT ECADR IN DUMPLOC
ADS DUMPLOC # TO NEXT DP WORD TO BE
MASK LOW8 # DUMPED AND SAVE IT.
CCS A # IS THIS THE BEGINNING OF A NEW EBANK
TCF DNDUMP2 # NO -- THEN CONTINUE DUMPING
CA DUMPLOC # YES -- IS THIS THE END OF THE
MASK DUMPCNT # N TH (N = 1 TO 4) COMPLETE ERASABLE
MASK PRIO34 # DUMP (BIT14 FOR 4, BIT13 FOR 2 OR BIT12
CCS A # FOR 1 COMPLETE ERASABLE DUMP(S)).
TCF DNPHASE1 # YES -- START SENDING INTERRUPTED DOWNLIST
# AGAIN
TCF DNDUMPI +2 # NO -- GO BACK AND INITIALIZE NEXT BANK
DNDUMP1 CA LDNDUMP # SET DNTMGOTO
TS DNTMGOTO # FOR WORDS 3 TO 256D OF CURRENT EBANK
DNDUMP2 CA DUMPLOC
TS EBANK # SET EBANK
MASK LOW8 # ISOLATE RELATIVE ADDRESS.
TS Q # (NOTE: MASK INSTRUCTION IS USED TO PICK
CA NEG0 # UP ERASABLE REGISTERS SO THAT EDITING
TS L # REGISTERS 20-23 WILL NOT BE ALTERED.)
INDEX Q
EBANK= 1400 # PICK UP LOW ORDER REGISTER OF PAIR
MASK 1401 # OF ERASABLE REGISTERS.
XCH L
INDEX Q # PICK UP HIGH ORDER REGISTER OF PAIR
MASK 1400 # OF ERASABLE REGISTERS.
EBANK= DNTMBUFF
TCF DNTMEXIT # GO SEND THEM
SENDID EXTEND # ** ENTRANCE USED BY ERASABLE DUMP PROG. **
QXCH DNTMGOTO # SET DNTMGOTO SO NEXT TIME PROG WILL GO
CAF ERASID # TO LOCATION FOLLOWING `TC SENDID'
TS L # ** ENTRANCE USED BY REGULAR DOWNLINK PG **
# Page 997
TC WOZERO # GO SET WORD ORDER CODE TO ZERO
CAF LOWIDCOD # PLACE SPECIAL ID CODE INTO L
XCH L # AND ID BACK INTO A
TCF DNTMEXIT # SEND DOWNLIST ID CODE(S).
WOTEST CA BIT7 # AT THE BEGINNING OF THE LIST THE WORD
EXTEND # ORDER BIT WILL BE SET BACK TO ZERO
RAND CHAN13
CCS A
TC DNTMGOTO
CA BIT7
TCF WO1

373
ENTRY_LEXICON.s Normal file
View File

@ -0,0 +1,373 @@
# Copyright: Public domain.
# Filename: ENTRY_LEXICON.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 837-843
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-12 RSB Adapted from Colossus249 file of the same
# name and Comanche 055 page images.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 837
# VARIABLE DESCRIPTION MAXIMUM VALUE * COMPUTER NAME
# -------- ----------- --------------- -------------
# _
# URT0 INITIAL TARGET VECTOR 2 (UNIT VECTOR) = RTINIT
# _
# UZ UNIT VECTOR NORTH 1 = UNITW
# _
# V VELOCITY VECTOR 2 VSAT = VEL
# _
# R POSITION VECTOR 2 EXP 29 METERS = RN
# _
# VI INERTIAL VELOCITY 128 M/CENTISEC = VN
# _
# RTE VECTOR EAST AT INITIAL TARGET 2 = RTEAST
# _
# UTR NORMAL TO RTE AND UZ 2 = RTNORM
# _
# URT TARGET VECTOR 2 = RT
# _
# UNI UNIT NORMAL TO TRAJECTORY PLANE 2
# _
# DELV INTEGRATED ACCEL. FROM PIPAS 5.85 16384 CM/S
# _
# G GRAVITY VECTOR 128 M/CENTISEC = GDT/2
#
# A0 INITIAL DRAG FOR UPCONTRL 805 FPSS FPSS=FT/SEC/SEC
#
# AHOOKDV TERM IN GAMMAL CALC. = AHOOK DVL 16
#
# A1 DRAG VALUE IN FACTOR CALCULATION 805 FPSS
#
# ALP CONST FOR UPCONTRL 1
#
# ASKEP KEPLER RANGE 21600 NM NM = NAUTICAL MILE
#
# ASP1 FINAL PHASE RANGE 21600 NM
#
# ASPUP UP-RANGE 21600 NM
#
# ASP3 GAMMA CORRECTION 21600 NM
#
# ASPDWN RANGE DOWN TO PULL-UP 21600 NM
#
# ASP PREDICTED RANGE 21600 NM NOT STORED
#
# COSG COSINE(GAMMAL) 2 = COSG/2
#
# C/D0 RECIPROCAL DRAG, -4/D0 B-8 64/FPSS
#
# D TOTAL ACCELERATION 805 FPSS
#
# D0 CONTROLLED CONSTANT D 805 FPSS
#
# DHOOK TERM IN GAMMAL COMPUTATION 805 FPSS
#
# DIFF THETNM-ASP (RANGE DIFFERENCE) 21600 NM
#
# DIFFOLD PREVIOUS VALUE OF DIFF 21600 NM
#
# DLEWD CHANGE IN LEWD 1
#
# DR REFERENCE DRAG FOR DOWNCONTROL 805 FPSS NOT STORED
#
# DREFR REFERENCE DRAG 805 FPSS NOT STORED
#
# DVL VS1-VL 2 VSAT
#
# E ECCENTRICITY 4 NOT STORED
#
# F1 DRANGE/D DRAG (FINAL PHASE) 2700/805 = FX +5
#
# F2 DRANGE/D RDOT (FINAL PHASE) 2700/2VS NM/FPS = FX +4
# Page 838
#
# F3 DRANGE/D (L/D) 2700 NM = FX
#
# FACT1 CONST FOR UPCONTRL 805 FPSS
#
# FACT2 CONST FOR UPCONTRL 1/805 FPSS
#
# FACTOR USED IN UPCONTRL 1 * MAXIMUM VALUE DENOTES UNSCALED
# VARIABLE VALUE WHEN SCALED
# GAMMAL FLIGHT PATH ANGLE AT VL 1 RADIAN VARIABLE HAS MAXIMUM VALUE OF ONE.
#
# GAMMAL1 SIMPLE FORM OF GAMMAL 1 RADIAN
# Page 839
#
# HEADSUP INDICATOR FOR INITIAL ROLL 1
#
# KA DRAG TO LIFT UP IF DOWN 805 FPSS = KAT
#
# KLAT LATERAL SWITCH GAIN 1 (NOM = .0125)
#
# K2ROLL INDICATOR FOR ROLL SWITCH
#
# LAD MAX L/D (MIN ACTUAL VEHICLE L/D) 1
#
# LADPAD NOMINAL VEHICLE L/D, SP PAD LOAD 1 (NOM = 0.3)
#
# LATANG LATERAL RANGE 4 RADIANS
#
# LEQ EXCESS C.F. OVER GRAV=(VSQ-1)GS 128.8 FPSS
#
# LEWD UPCONTROL REFERENCE L/D 1
#
# LOD FINAL PHASE L/D 1 (NOM = 0.18)
#
# LODPAD FINAL PHASE L/D, SP PAD LOAD 1
#
# L/D DESIRED LIFT TO DRAG RATIO 1
# (VERTICAL PLANE)
#
# L/D1 TEMP STORAGE FOR L/D IN LATERAL 1
#
# L/DCMINR LAD COS(15DEG) 1 (NOM = 0.2895)
#
# PREDANGLE PREDICTED RANGE (FINAL PHASE) 2700 NM = PREDANG
#
# Q2 FINAL PHASE RANGE -23500 Q3 21600 NM
# Q2 = FCN(LAD)
#
# Q7 MINIMUM DRAG FOR UPCONTROL 805FPSS
#
# RDOT ALTITUDE RATE 2 VSAT
#
# RDOTREF REFERENCE RDOT FOR UPCONTROL 2 VSAT
#
# RDTR REFERENCE RDOT FOR DOWNCONT 2 VSAT NOT SAVED
#
# ROLLC ROLL COMMAND 1 REVOLUTION
#
# RTOGO RANGE TO GO (FINAL PHASE) 2700 NM = FX +2
#
# SL SINE OF LATITUDE 1 NOT SAVED
#
# T TIME B 28 CENTISEC = TIME2,TIME1
#
# THETA DESIRED RANGE (RADIANS) 2 PI RADIANS = THETAH
#
# THETNM DESIRED RANGE (NM) 21600 NM NON EXISTENT
#
# V VELOCITY MAGNITUDE 2 VSAT
#
# V1 INITIAL VELOCITY FOR UPCONTROL 2 VSAT
#
# VL EXIT VELOCITY FOR UPCONTROL 2 VSAT
#
# VREF REFERENCE VELOCITY FOR UPCONTROL 2 VSAT
#
# VS1 VSAT OR V1, WHICHEVER IS SMALLER 2 VSAT
# 2 2
# VBARS VL /VSAT 4
# 2 2
# VSQ NORMALIZED VEL. SQUARED = V /VSAT 4 = VSQUARE
#
# WT EARTH RATE TIMES TIME 1 REVOLUTION NOT SAVED
#
# X INTERMEDIATE VARIABLE IN G-LIMITER 2 VSAT NOT SAVED
#
# Y LATERAL MISS LIMIT 4 RADIANS NOT SAVED
# Page 840
# EXTRA COMPUTER ERASABLE LOCATIONS NOT SHOWN ON FLOW CHARTS
# ----------------------------------------------------------
#
# VARIABLE DESCRIPTION MAXIMUM VALUE
# -------- ----------- -------------
#
# GOTOADDR ADDRESS SELECTED BY SEQUENCER
#
# XPIPBUF BUFFER TO STORE X PIPA COUNTS
#
# YPIPBUF BUFFER TO STORE Y PIPA COUNTS
#
# ZPIPBUF BUFFER TO STORE Z PIPA COUNTS
#
# PIPCTR COUNTS PASSES THRU PIPA READ ROUTINE
#
# JJ INDEX IN FINAL PHASE TABLE LOOK-UP
#
# MM INDEX IN FINAL PHASE TABLE LOOK-U
#
# GRAD INTERPOLATION FACTOR IN FINAL PHASE
#
# FX DRANGE/D L/D = F3 2700 NM
#
# FX +1 AREF 805 FPSS
#
# FX +2 RTOGO 2700 NM
#
# FX +3 RDOTREF VSAT/4
#
# FX +4 DRANGE/D RDOT = F2 21600/2VS NM/FPS
#
# FX +5 DRANGE/D DRAG = F1 2700/805 NM/FPSS
#
# TEM1B TEMPORARY LOCATION
#
# TIME/RTO TIME OF INITIAL TARGET RTINIT B 28 CENTISEC
#
# DTEAROT EST TIME BETWEEN RTINIT AND RT B 28 CENTISEC
# _
# UNITV UNIT V VECTOR 2
# _
# UNITR UNIT R VECTOR 2
# _
# -VREL NEGATIVE VELOCITY REL TO ATMOSP 2 VSAT
# COMPUTER SWITCHES INITIAL STATE CM/FLAGS = STATE +6
# ----------------- ------------- -------------------
#
# ENTRYDSP DO ENTRY DISPLAY, IF SET NON-BRANCH (1) 92D, BIT 13
# GONEPAST INDICATES OVERSHOOT OF TARGET NON-BRANCH (0) 95D, BIT 10
# RELVELSW RELATIVE VELOCITY SWITCH NON-BRANCH (0) 96D, BIT 9
# EGSW FINAL PHASE SWITCH NON-BRANCH (0) 97D, BIT 8
# FIRSTPAS INITIAL PASS THRU HUNTEST NON-BRANCH (0) 98D, BIT 7
# HIND INDICATES ITERATION IN HUNTEST NON-BRANCH (0) 99D, BIT 6
# INRLSW INDICATES INIT ROLL ATTITUDE SET NON-BRANCH (0) 100D, BIT 5
# LATSW INHIBIT DOWNLIFT SWITCH IF NOT SET BRANCH (1) 101D, BIT 4
# .05GSW INDICATES DRAG EXCEEDS .05 GS BRANCH (0) 102D, BIT 3
#
# GONEBY INDICATES GONE PAST TARGET (SET) SELF-INITIALIZING 112D, BIT 8
# Page 841
# CONSTANTS AND GAINS VALUE
# ------------------- -----
#
# C1 FACTOR IN ALP COMPUTATION 1.25
# C16 CONSTD GAIN ON DRAG .01
# C17 CONSTD GAIN ON RDOT .001
# C18 BIAS VEL. FOR FINAL PHASE START 500 FPS
# C20 MAX DRAG FOR DOWN-LIFT 175 FPSS
# CHOOK FACTOR IN AHOOK COMPUTATION .25
# CH1 FACTOR IN GAMMAL COMPUTATION 1.0
# COS15 COS( 15 DEG ) .965
# DLEWD0 INITIAL VARIATION IN LEWD -.05
# D2 DRAG TO CHANGE LEWD 175 FPSS
# DT COMPUTATION CYCLE TIME INTERVAL 2 SEC.
# GMAX MAXIMUM ACCELERATION 257.6 FPSS (8 G'S)
# KA1 FACTOR IN KA CALC 1.3 GS
# KA2 FACTOR IN KA CALC .2 GS
# KA3 FACTOR IN D0 CALC 90 FPSS
# KA4 FACTOR IN D0 CALC 40 FPSS
# KB1 OPTIMIZED UPCONTROL GAIN 3.4
# KB2 OPTIMIZED UPCONTROL GAIN .0034
# KDMIN INCREMENT ON Q7 TO DETECT END OF KEPLER PHASE .5 FPSS
# KTETA TIME OF FLIGHT CONSTANT 1000
# KLAT1 FACTOR IN KLAT CALC 1/24
# K44 GAIN USED IN INITIAL ROLL SECTION 19749550 FPS
# LATBIAS LATERAL SWITCH BIAS TERM .41252961 NM
# LEWD1 NOMINAL UPCONTROL L/D .15
# POINT1 FACTOR TO REDUCE UPCONTROL GAIN .1
# Q2 FINAL PHASE RANGE - 23500 Q3 -1002 NM
# Q3 FINAL PHASE DRANGE/D V .07 NM/FPS
# Q5 FINAL PHASE DRANGE/D GAMMA 7050 NM/RAD
# Q6 FINAL PHASE INITIAL FLIGHT PATH ANGLE .0349 RAD
# Q7F MIN DRAG FOR UPCONTROL 6 FPSS
# Q7MIN IN VALUE FOR Q7 IN FACTOR CALCULATION 40 FPSS
# Q19 FACTOR IN GAMMAL1 CALCULATION .5
# Q21 FACTOR IN Q2 CALCULATION 1000 NM
# Q22 FACTOR IN Q2 CALCULATION -1302 NM
# VFINAL1 VELOCITY TO START FINAL PHASE ON INITIAL ENTRY 27000 FPS
# VFINAL FACTOR IN INITIAL UP-DOWN CALC 26600 FPS
# VLMIN MINIMUM VL 18000 FPS
# VMIN VELOCITY TO SWITCH TO RELATIVE VEL VSAT/2
# VRCONTRL RDOT TO START INTO HUNTEST 700 FPS
# VRCONT=COMPUTER NAME
# 25NM TOLERANCE TO STOP RANGE ITERATION 25 NM
# VQUIT VELOCITY TO STOP STEERING 1000 FPS
# Page 842
# CONVERSION FACTORS AND SCALING CONSTANTS
# ----------------------------------------
#
# ATK ANGLE IN RAD TO NM 3437.7468 NM/RAD
# G5 NOMINAL G VALUE FOR SCALING 32.2 FPSS
# H5 ATMOSPHERE SCALE HEIGHT 28500 FT
# J GRAVITY HARMONIC COEFFICIENT .00162346
# KWE EQUATORIAL EARTH RATE 1546.10168 FPS
# MUE EARTH GRAVITATIONAL CONSTANT 3.986032233 E14 CUBIC M/ SEC SEC
# RE EARTH RADIUS 21202900 FT
# REQ EARTH EQUATORIAL RADIUS 20925738.2 FT
# VSAT SATELLITE VELOCITY AT RE 25766.1973 FPS
# WIE EARTH RATE .0000729211505 RAD/SEC
# (END GSOP AS-278, VOL 1, FIG. 5.6-3 CONSTANTS, GAINS, ETC.)
# DISPLAY QUANTITIES
# ------------------
#
# (SEE SECTION 4 OF THE GSOP FOR SIGN CONVENTIONS.)
#
# VARIABLE DESCRIPTION MAXIMUM VALUE
# -------- ----------- -------------
#
# QMAX PREDICTED MAXIMUM ENTRY ACCEL 163.84 GS N 60
# VPRED PREDICTED VELOCITY AT ALTITUDE 128 M/CENTISEC N 60
# 400K FT ABOVE FISCHER RADIUS.
# GAMMAEI PREDICTED GAMMA AT ALTITUDE 1 REVOLUTION N 60
# 400K FT ABOVE FISCHER RADIUS
# D DRAG ACCELERATION 805 FPSS N 64
# VMAGI INERTIAL VELOCITY MAGNITUDE 128 M/CENTISEC N 64, N 68
# THETAH DESIRED RANGE ANGLE NM 1 REVOLUTION N 64, N 67
# LAT PRESENT LATITUDE 1 REVOLUTION N 67
# LONG PRESENT LONGITUDE 1 REVOLUTION N 67
# RTOGO RANGE ANGLE TO SPLASH FROM 1 REVOLUTION N 67
# EMSALT FT ABOVE FISCHER RADIUS (IN NM)
# VIO PREDICTED VELOCITY AT ALTITUDE 128 M/CENTISEC N 63
# EMSALT FT ABOVE FISCHER RADIUS.
# TTE TIME OF FREE FALL TO ALT B 28 CENTISEC N 63
# EMSALT FT ABOVE FISCHER RADIUS
# ROLLC ROLL COMMAND 1 REVOLUTION N 68, N 68, N 69
# LATANG CROSS-RANGE ERROR (XRNGERR) 4 RADIANS N 66
# DNRNGERR DOWN RANGE ERROR 1 REVOLUTION N 66
# (PREDANG - THETAH IN NM)
# HDOT ALTITUDE RATE 128 M/CENTISEC N 68
# QT MINIMUM DRAG FOR UPCONTROL 805 FPSS N 69
# VL EXIT VELOCITY FOR UP-CONTROL 2 VSAT N 69
# Page 843
# BODY ATTITUDE QUANTITIES (CM/POSE)
# ----------------------------------
#
# VARIABLE DECRIPTION MAXIMUM VALUE
# -------- ---------- -------------
# _
# -VREL NEGATIVE VELOCITY REL TO ATMOS. 2 VSAT
# _
# OLDUYA USED FOR UYA BELOW 1000 FPS 2
# _
# UXA/2 UNIT VECTOR TRIAD 2
# _
# UYA/2 BASED ON 2
# _
# UZA/2 THE TRAJECTORY 2
# _
# UBX/2 UNIT VECTOR 2
# _
# UBY/2 BODY TRIAD 2
# _
# UBZ/2 FOR CM. 2

3785
ERASABLE_ASSIGNMENTS.s Normal file

File diff suppressed because it is too large Load Diff

497
EXECUTIVE.s Normal file
View File

@ -0,0 +1,497 @@
# Copyright: Public domain.
# Filename: EXECUTIVE.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1208-1220
# Mod history: 2009-05-14 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1208
BLOCK 02
# TO ENTER A JOB REQUEST REQUIRING NO VAC AREA:
COUNT 02/EXEC
NOVAC INHINT
AD FAKEPRET # LOC(MPAC +6) - LOC(QPRET)
TS NEWPRIO # PRIORITY OF NEW JOB + NOVAC C(FIXLOC)
EXTEND
INDEX Q # Q WILL BE UNDISTURBED THROUGHOUT.
DCA 0 # 2CADR OF JOB ENTERED.
DXCH NEWLOC
CAF EXECBANK
XCH FBANK
TS EXECTEM1
TCF NOVAC2 # ENTER EXECUTIVE BANK.
# TO ENTER A JOB REQUEST REQUIREING A VAC AREA -- E.G., ALL (PARTIALLY) INTERPRETIVE JOBS.
FINDVAC INHINT
TS NEWPRIO
EXTEND
INDEX Q
DCA 0
SPVACIN DXCH NEWLOC
CAF EXECBANK
XCH FBANK
TCF FINDVAC2 # OFF TO EXECUTIVE SWITCHED-BANK.
# TO ENTER A FINDVAC WITH THE PRIORITY IN NEWPRIO TO THE 2CADR ARRIVING IN A AND L:
# USERS OF SPVAC MUST INHINT BEFORE STORING IN NEWPRIO.
SPVAC XCH Q
AD NEG2
XCH Q
TCF SPVACIN
# TO SUSPEND A BASIC JOB SO A HIGHER PRIORITY JOB MAY BE SERVICED:
CHANG1 LXCH Q
CAF EXECBANK
XCH BBANK
TCF CHANJOB
# TO SUSPEND AN INTERPRETIVE JOB:
CHANG2 CS LOC # NEGATIVE LOC SHOWS JOB = INTERPRETIVE.
# ITRACE (4) REFERS TO "CHANG2"
# Page 1209
TS L
+2 CAF EXECBANK
TS BBANK
TCF CHANJOB -1
# Page 1210
# TO VOLUNTARILY SUSPEND A JOB UNTIL THE COMPLETION OF SOME ANTICIPATED EVENT (I/O EVENT ETC.):
JOBSLEEP TS LOC
CAF EXECBANK
TS FBANK
TCF JOBSLP1
# TO AWAKEN A JOB PUT TO SLEEP IN THE ABOVE FASHION:
JOBWAKE INHINT
TS NEWLOC
CS TWO # EXIT IS VIA FINDVAC/NOVAC PROCEDURES.
ADS Q
CAF EXECBANK
XCH FBANK
TCF JOBWAKE2
# TO CHANGE THE PRIORITY OF A JOB CURRENTLY UNDER EXECUTION:
PRIOCHNG INHINT # NEW PRIORITY ARRIVES IN A. RETURNS TO
TS NEWPRIO # CALLER AS SOON AS NEW JOB PRIORITY IS
CAF EXECBANK # HIGHEST. PREPARE FOR POSSIBLE BASIC-
XCH BBANK # STYLE CHANGE-JOB.
TS BANKSET
CA Q
TCF PRIOCH2
# TO REMOVE A JOB FROM EXECUTIVE CONSIDERATIONS:
ENDOFJOB CAF EXECBANK
TS FBANK
TCF ENDJOB1
ENDFIND CA EXECTEM1 # RETURN TO CALLER AFTER JOB ENTRY
TS FBANK # COMPLETE.
TCF Q+2
EXECBANK CADR FINDVAC2
FAKEPRET ADRES MPAC -36D # LOC(MPAC +6) - LOC(QPRET)
# Page 1211
# LOCATE AN AVAILABLE VAC AREA
BANK 01
COUNT 01/EXEC
FINDVAC2 TS EXECTEM1 # (SAVE CALLER'S BANK FIRST.)
CCS VAC1USE
TCF VACFOUND
CCS VAC2USE
TCF VACFOUND
CCS VAC3USE
TCF VACFOUND
CCS VAC4USE
TCF VACFOUND
CCS VAC5USE
TCF VACFOUND
TC BAILOUT
OCT 1201 # NO VAC AREAS.
VACFOUND AD TWO # RESERVE THIS VAC AREA BY STORING A ZERO
ZL # IN ITS VAC USE REGISTER AND STORE THE
INDEX A # ADDRESS OF THE FIRST WORD OF IT IN THE
LXCH 0 -1 # LOW NINE BITS OF THE PRIORITY WORD.
ADS NEWPRIO
NOVAC2 CAF ZERO # NOVAC ENTERS HERE. FIND A CORE SET.
TS LOCCTR
CAF NO.CORES # SEVEN SETS OF ELEVEN REGISTERS EACH.
NOVAC3 TS EXECTEM2
INDEX LOCCTR
CCS PRIORITY # EACH PRIORITY REGISTER CONTAINS -0 IF
TCF NEXTCORE # THE CORESPONDING CORE SET IS AVAILABLE.
NO.CORES DEC 6
TCF NEXTCORE # AN ACTIVE JOB HAS A POSITIVE PRIORITY
# BUT A DORMANT JOB'S PRIORITY IS NEGATIVE
# Page 1212
CORFOUND CA NEWPRIO # SET THE PRIORITY OF THIS JOB IN THE CORE
INDEX LOCCTR # SET'S PRIORITY REGISTER AND SET THE
TS PRIORITY # JOB'S PUSH-DOWN POINTER AT THE BEGINNING
MASK LOW9 # OF THE WORK AREA AND OVERFLOW INDICATOR.
INDEX LOCCTR
TS PUSHLOC # OFF TO PREPARE FOR INTERPRETIVE PROGRAMS.
CCS LOCCTR # IF CORE SET ZERO IS BEING LOADED, SET UP
TCF SETLOC # OVFIND AND FIXLOC IMMEDIATELY.
TS OVFIND
CA PUSHLOC
TS FIXLOC
SPECTEST CCS NEWJOB # SEE IF ANY ACTIVE JOBS WAITING (RARE).
TCF SETLOC # MUST BE AWAKENED OUT UNCHANGED JOB.
TC CCSHOLE
TC CCSHOLE
TS NEWJOB # +0 SHOWS ACTIVE JOB ALREADY SET.
DXCH NEWLOC
DXCH LOC
TCF ENDFIND
SETLOC DXCH NEWLOC # SET UP THE LOCATION REGISTERS FOR THIS
INDEX LOCCTR
DXCH LOC
INDEX NEWJOB # THIS INDEX INSTRUCTION INSURES THAT THE
CS PRIORITY # HIGHEST ACTIVE PRIORITY WILL BE COMPARED
AD NEWPRIO # WITH THE NEW PRIORITY TO SEE IF NEWJOB
EXTEND # SHOULD BE SET TO SIGNAL A SWITCH.
BZMF ENDFIND
CA LOCCTR # LOCCTR IS LEFT SET AT THIS CORE SET IF
TS NEWJOB # THE CALLER WANTS TO LOAD ANY MPAC
TCF ENDFIND # REGISTERS, ETC.
NEXTCORE CAF COREINC
ADS LOCCTR
CCS EXECTEM2
TCF NOVAC3
TC BAILOUT # NO CORE SETS.
OCT 1202
# Page 1213
# THE FOLLOWING ROUTINE SWAPS CORE SET 0 WITH THAT WHOSE RELATIVE ADDRESS IS IN NEWJOB.
-2 LXCH LOC
-1 CAE BANKSET # BANKSET, NOT BBANK, HAS RIGHT CONTENTS.
CHANJOB INHINT
EXTEND
ROR SUPERBNK # PICK UP CURRENT SBANK FOR BBCON
XCH L # LOC IN A AND BBCON IN L.
+4 INDEX NEWJOB # SWAP LOC AND BANKSET.
DXCH LOC
DXCH LOC
CAE BANKSET
EXTEND
WRITE SUPERBNK # SET SBANK FOR NEW JOB.
DXCH MPAC # SWAP MULTI-PURPOSE ACCUMULATOR AREAS.
INDEX NEWJOB
DXCH MPAC
DXCH MPAC
DXCH MPAC +2
INDEX NEWJOB
DXCH MPAC +2
DXCH MPAC +2
DXCH MPAC +4
INDEX NEWJOB
DXCH MPAC +4
DXCH MPAC +4
DXCH MPAC +6
INDEX NEWJOB
DXCH MPAC +6
DXCH MPAC +6
CAF ZERO
XCH OVFIND # MAKE PUSHLOC NEGATIVE IF OVFIND NZ.
EXTEND
BZF +3
CS PUSHLOC
TS PUSHLOC
DXCH PUSHLOC
INDEX NEWJOB
DXCH PUSHLOC
DXCH PUSHLOC # SWAPS PUSHLOC AND PRIORITY.
CAF LOW9 # SET FIXLOC TO BASE OF VAC AREA.
MASK PRIORITY
TS FIXLOC
CCS PUSHLOC # SET OVERFLOW INDICATOR ACCORDING TO
CAF ZERO
TCF ENDPRCHG -1
# Page 1214
CS PUSHLOC
TS PUSHLOC
CAF ONE
XCH OVFIND
TS NEWJOB
ENDPRCHG RELINT
DXCH LOC # BASIC JOBS HAVE POSITIVE ADDRESSES, SO
EXTEND # DISPATCH WITH A DTCB.
BZMF +2 # IF INTERPRETIVE, SET UP EBANK, ETC.
DTCB
# Page 1215
COM # EPILOGUE TO JOB CHANGE FOR INTERPRETIVE
AD ONE
TS LOC # RESUME
TCF INTRSM
# COMPLETE JOBSLEEP PREPARATIONS.
JOBSLP1 INHINT
CS PRIORITY # NNZ PRIORITY SHOWS JOB ASLEEP.
TS PRIORITY
CAF LOW7
MASK BBANK
EXTEND
ROR SUPERBNK # SAVE OLD SUPERBANK VALUE.
TS BANKSET
CS ZERO
JOBSLP2 TS BUF +1 # HOLDS -- HIGHEST PRIORITY.
TCF EJSCAN # SCAN FOR HIGHEST PRIORITY ALA ENDOFJOB.
NUCHANG2 INHINT # QUICK... DON'T LET NEWJOB CHANGE TO +0.
CCS NEWJOB
TCF +3 # NEWJOB STILL PNZ
RELINT # NEW JOB HAS CHANGED TO +0. WAKE UP JOB
TCF ADVAN +2 # VIA NUDIRECT. (VERY RARE CASE.)
CAF TWO
EXTEND
WOR DSALMOUT # TURN ON ACTIVITY LIGHT
DXCH LOC # AND SAVE ADDRESS INFO FOR BENEFIT OF
TCF CHANJOB +4 # POSSIBLE SLEEPING JOB.
# Page 1216
# TO WAKE UP A JOB, EACH CORE SET IS FOUND TO LOCATE ALL JOBS WHICH ARE ASLEEP. IF THE FCADR IN THE
# LOC REGISTER OF ANY SUCH JOB MATCHES THAT SUPPLIED BY THE CALLER, THAT JOB IS AWAKENED. IF NO JOB IS FOUND,
# LOCCTR IS SET TO -1 AND NO FURTHER ACTION TAKES PLACE.
JOBWAKE2 TS EXECTEM1
CAF ZERO # BEGIN CORE SET SCAN
TS LOCCTR
CAF NO.CORES
JOBWAKE4 TS EXECTEM2
INDEX LOCCTR
CCS PRIORITY
TCF JOBWAKE3 # ACTIVE JOB -- CHECK NEXT CORE SET.
COREINC DEC 12 # 12 REGISTERS PER CORE SET.
TCF WAKETEST # SLEEPING JOB -- SEE IF CADR MATCHES.
JOBWAKE3 CAF COREINC
ADS LOCCTR
CCS EXECTEM2
TCF JOBWAKE4
CS ONE # EXIT IF SLEEPIG JOB NOT FOUND.
TS LOCCTR
TCF ENDFIND
WAKETEST CS NEWLOC
INDEX LOCCTR
AD LOC
EXTEND
BZF +2 # IF MATCH.
TCF JOBWAKE3 # EXAMINE NEXT CORE SET IF NO MATCH.
INDEX LOCCTR # RE-COMPLEMENT PRIORITY TO SHOW JOB AWAKE
CS PRIORITY
TS NEWPRIO
INDEX LOCCTR
TS PRIORITY
CS FBANKMSK # MASK UP THE 2CADR OF THE WAKE ADDRESS
MASK NEWLOC # USING THE CADR IN NEWLOC AND THE EBANK
AD 2K # HALF OF BBANK SAVED IN BANKSET.
XCH NEWLOC
MASK FBANKMSK
INDEX LOCCTR
AD BANKSET
TS NEWLOC +1
CCS LOCCTR # SPECIAL TREATMENT IF THIS JOB WAS
TCF SETLOC # ALREADY IN THE RUN (0) POSITION.
TCF SPECTEST
# Page 1217
# PRIORITY CHANGE. CHANGE THE CONTENTS OF PRIORITY AND SCAN FOR THE JOB OF HIGHEST PRIORITY.
PRIOCH2 TS LOC
CAF ZERO # SET FLAG TO TELL ENDJOB SCANNER IF THIS
TS BUF # JOB IS STILL HIGHEST PRIORITY.
CAF LOW9
MASK PRIORITY
AD NEWPRIO
TS PRIORITY
COM
TCF JOBSLP2 # AND TO EJSCAN.
# Page 1218
# RELEASE THIS CORE SET AND VAC AREA AND SCAN FOR THE JOB OF HIGHEST ACTIVE PRIORITY.
ENDJOB1 INHINT
CS ZERO
TS BUF +1
XCH PRIORITY
MASK LOW9
TS L
CS FAKEPRET
AD L
EXTEND
BZMF EJSCAN # NOVAC ENDOFJOB
CCS L
INDEX A
TS 0
EJSCAN CCS PRIORITY +12D
TC EJ1
TC CCSHOLE
TCF +1
CCS PRIORITY +24D # EXAMINE EACH PRIORITY REGISTER TO FIND
TC EJ1 # THE JOB OF HIGHEST ACTIVE PRIORITY.
TC CCSHOLE
TCF +1
CCS PRIORITY +36D
TC EJ1
-CCSPR -CCS PRIORITY
TCF +1
CCS PRIORITY +48D
TC EJ1
TC CCSHOLE
TCF +1
CCS PRIORITY +60D
TC EJ1
TC CCSHOLE
TCF +1
CCS PRIORITY +72D
TC EJ1
TC CCSHOLE
TCF +1
# Page 1219
# EVALUATE THE RESULTS OF THE SCAN.
CCS BUF +1 # SEE IF THERE ARE ANY ACTIVE JOBS WAITING
TC CCSHOLE
TC CCSHOLE
TCF +2
TCF DUMMYJOB
CCS BUF # BUF IS ZERO IS THIS IS A PRIOCHNG AND
TCF +2 # CHANGED PRIORITY IS STILL HIGHEST.
TCF ENDPRCHG -1
INDEX A # OTHERWISE, SET NEWJOB TO THE RELATIVE
# Was CAF --- RSB 2004
CA 0 -1 # ADDRESS OF THE NEW JOB'S CORE SET.
AD -CCSPR
TS NEWJOB
TCF CHANJOB -2
EJ1 TS BUF +2
AD BUF +1 # - OLD HIGH PRIORITY.
CCS A
CS BUF +2
TCF EJ2 # NEW HIGH PRIORITY.
NOOP
INDEX Q
TC 2 # PROCEED WITH SEARCH.
EJ2 TS BUF +1
EXTEND
QXCH BUF # FOR LOCATING CCS PRIORITY + X INSTR.
INDEX BUF
TC 2
# Page 1220
# IDLING AND COMPUTER ACTIVITY (GREEN) LIGHT MAINTENANCE. THE IDLING ROUTIEN IS NOT A JOB IN ITSELF,
# BUT RATHER A SUBROUTINE OF THE EXECUTIVE.
EBANK= SELFRET # SELF-CHECK STORAGE IN EBANK.
DUMMYJOB CS ZERO # SET NEWJOB TO -0 FOR IDLING.
TS NEWJOB
RELINT
CS TWO # TURN OFF THE ACTIVITY LIGHT.
EXTEND
WAND DSALMOUT
ADVAN CCS NEWJOB # IS THE NEWJOB ACTIVE?
TCF NUCHANG2 # YES... ONE REQUIRING A CHANGE JOB.
CAF TWO # NEW JOB ALREADY IN POSITION FOR
TCF NUDIRECT # EXECUTION
CA SELFRET
TS L # PUT RETURN ADDRESS IN L.
CAF SELFBANK
TCF SUPDXCHZ +1 # AND DISPATCH JOB.
EBANK= SELFRET
SELFBANK BBCON SELFCHK
NUDIRECT EXTEND # TURN THE GREEN LIGHT BACK ON.
WOR DSALMOUT
DXCH LOC # JOBS STARTED IN THIS FASHION MUST BE
TCF SUPDXCHZ
BLOCK 2 # IN FIXED-FIXED SO OTHERS MAY USE.
COUNT 02/EXEC
# SUPDXCHZ -- ROUTINE TO TRANSFER TO SUPERBANK.
# CALLING SEQUENCE:
# TCF SUPDXCHZ # WITH 2CADR OF DESIRED LOCATION IN A + l.
SUPDXCHZ XCH L # BASIC.
+1 EXTEND
WRITE SUPERBNK
TS BBANK
TC L
NEG100 OCT 77677

1336
EXTENDED_VERBS.s Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,743 @@
# Copyright: Public domain.
# Filename: FINDCDUW--GUIDAP_INTERFACE.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 908-925
# Mod history: 2009-05-28 HG Transcribed from page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 908
# PROGRAM NAME: FINDCDUW
# MOD NUMBER: 1 68-07-15
# MOD AUTHOR: KLUMPP
#
# OBJECTS OF MOD: 1. TO SUPPLY COMMANDED GIMBAL ANGLES FOR NOUN 22.
# 2. TO MAINTAIN CORRECT AND CURRENT THRUST
# DIRECTION DATA IN ALL MODES. THIS IS DONE BY
# FETCHING FOR THE THRUST DIRECTION FILTER THE
# CDUD'S IN PNGCS-AUTO, THE CDU'S IN ALL OTHER
# MODES.
# 3. TO SUBSTITUDE A STOPRATE FOR THE NORMAL
# AUTOPILOT COMMANDS WHENEVER
# 1) NOT IN PNGCS-AUTO, OR
# 2) ENGINE IS OFF.
#
# FUNCTIONAL DESCRIPTION:
#
# FINDCDUW PROVIDES THE INTERFACES BETWEEN THE VARIOUS POWERED FLITE GUIDANCE PROGRAMS
# AND THE DIGITAL AUTOPILOT. THE INPUTS TO FINDCDUW ARE THE THRUST COMMAND VECTOR
# AND THE WINDOW COMMAND VECTOR, AND THE OUTPUTS ARE THE GIMBAL ANGLE
# INCRMENTS, THE COMMANDED ATTITUDE ANGLE RATES, AND THE COMMANDED
# ATTITUDE LAG ANGLES (WHICH ACCOUNT FOR THE ANGLES BY WHICH THE BODY WILL
# LAG BEHIND A RAMP COMMAND IN ATTITUDE ANGLE DUE TO THE FINITE ANGULAR
# ACCELERATIONS AVAILABLE).
#
# FINDCDUW ALIGNS THE ESTIMATED THRUST VECTOR FROM THE THRUST DIRECTION
# FILTER WITH THE THRUST COMMAND VECTOR, AND, WHEN XDVINHIB SET,
# ALIGNS THE +Z HALF OF THE LM ZX PLANE WITH THE WINDOW COMMAND VECTOR.
#
# Page 909
# SPECIFICATIONS:
#
# INITIALIZATION: A SINGLE INTERPRETIVE CALL TO INITCDUW IS REQUIRED
# BEFORE EACH GUIDED MANEUVER USING FINDCDUW.
#
# CALL: INTERPRETIVE CALL TO FINDCDUW WITH THE THRUST COMMAND
# VECTOR IN MPAC. INTERPRETIVE CALL TO FINDCDUW -2 WITH
# THE THRUST COMMAND VECTOR IN UNFC/2 AND NOT IN MPAC.
#
# RETURNS: NORMAL INTERPRETIVE IN ALL CASES
# 1. NORMALLY ALL AUTOPILOT CMDS ARE ISSUED.
# 2. IF NOT PNGCS AUTO, DO STOPRATE AND RETURN
# WITHOUT ISSUING AUTOPILOT CMDS.
# 3. IF ENGINE OFF, DO STOPRATE AND RETURN WITHOUT
# ISSUING AUTOPILOT CMDS.
#
# ALARMS: 00401 IF INPUTS DETERMINE AN ATTITUDE IN GIMBAL LOCK.
# FINDCDUW DRIVES CDUXD AND CDUYD TO THE RQD VALUES,
# BUT DRIVES CDUZD ONLY TO THE GIMBAL LOCK CONE.
#
# 00402 IF UNFC/2 OR UNWC/2 PRODUCE OVERFLOW WHEN
# UNITIZED USING NORMUNIT. FINDCDUW ISSUES
# STOPRATE AS ONLY INPUT TO AUTOPILOT.
#
# INPUTS: UNFC/2 THRUST COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
# UNWC/2 WINDOW COMMAND VECTOR, NEED NOT BE SEMI-UNIT.
# OGABIAS POSSIBLE BIAS FOR OUTER GIMBAL ANGLE (ZEROED IN INITCDUW), UNITS OF PI.
# XOVINHIB FLAG DENOTING X AXIS OVERRIDE INHIBITED.
# CSMDOCKD FLAG DENOTING CSM DOCKED.
# STEERSW FLAG DENOTING INSUFF THRUST FOR THRUST DIR FLTR.
#
# OUTPUTS: DELCDUX,Y,Z
# OMEGAPD,+1,+2
# DELPEROR,+1,+2
# CPHI,+1,+2 FOR NOUN22
#
# DEBRIS: FINDCDUW DESTROYS SINCDUX,Y,Z AND COSCDUX,Y,Z BY
# WRITING INTO THESE LOCATIONS THE SINES AND COSINES
# OF THE CDUD'S IN PNGCS-AUTO, OF THE CDU'S OTHERWISE.
# Page 910
# INITIALIZATION FOR FINDCDUW
BANK 30
SETLOC FCDUW
BANK
EBANK= ECDUW
COUNT* $$/FCDUW
INITCDUW VLOAD
UNITX
STORE UNFV/2
STORE UNWC/2
RVQ
# FINDCDUW PRELIMINARIES
VLOAD # FINDCDUW -2: ENTRY WHEN UNFC/2 PRE-STORD
UNFC/2 # INPUT VECTORS NEED NOT BE SEMI-UNIT
FINDCDUW BOV SETPD # FINDCDUW: ENTRY WHEN UNFC/2 IN MPAC
FINDCDUW # INTERPRETER NOW INITIALIZED
22 # LOCS 0 THRU 21 FOR DIRECTION COSINE MAT
STQ EXIT
QCDUWUSR # SAVE RETURN ADDRESS
# MORE HAUSKEEPING
CA ECDUWL
XCH EBANK # SET EBANK
TS ECDUWUSR # SAVE USER'S EBANK
CA DAPBOOLS
MASK CSMDOCKD # CSMDOCKD MUST NOT BE BIT15
CCS A
CA ONE # INDEX IF CSM DOCKED
TS NDXCDUW
CA XOVINHIB # XOVINHIB MUST NOT BE BIT15
TS FLPAUTNO # SET TO POS-NON-ZERO FLAG PNGCS AUTO NOT
MASK DAPBOOLS
TS FLAGOODW # FLAG0ODW = ANY PNZ NUMBER IF XOV INHIBTD
# Page 911
# FETCH BASIC DATA
INHINT # RELINT AT PAUTNO (TC INTPRET)
CA CDUX # FETCH CDUX,CDUY,CDUZ IN ALL CASES, BUT
TS CDUSPOTX # REPLACE BELOW IF PNGCS AUTO
CA CDUY
TS CDUSPOTY
CA CDUZ
TS CDUSPOTZ
CA BIT10 # PNGCS CONTROL BIT
EXTEND
RAND CHAN30
CCS A
TCF PAUTNO # NOT PNGCS (BITS INVERTED)
CA BIT14 # AUTO MODE BIT
EXTEND
RAND CHAN31
CCS A
TCF PAUTNO # NOT AUTO (BITS INVERTED)
TS FLPAUTNO # RESET FLAG PNGCS AUTO NOT
CA CDUXD # PNGCS AUTO: FETCH CDUXD,CDUYD,CDUZD
TS CDUSPOTX
CA CDUYD
TS CDUSPOTY
CA CDUZD
TS CDUSPOTZ
# Page 912
# FETCH INPUTS
PAUTNO TC INTPRET # ENTERING THRUST CMD STILL IN MPAC
RTB
NORMUNIT
STOVL UNX/2 # SEMI-UNIT THRUST CMD AS INITIAL UNX/2
UNWC/2
RTB RTB
NORMUNIT
QUICTRIG # ALWAYS RQD TO OBTAIN TRIGS OF CDUD'S
STOVL UNZ/2 # SEMI-UNIT WINDOW CMD AS INITIAL UNZ/2
DELV
BOVB UNIT
NOATTCNT # AT LEAST ONE ENTERING CMD VCT ZERO
BOV CALL
AFTRFLTR # IF UNIT DELV OVERFLOWS SKIP FILTER
*SMNB* # YIELDS UNIT(DELV) IN VEH COORDS FOR FLTR
# THRUST DIRECTION FILTER
EXIT
CA UNFVY/2 # FOR RESTARTS, UNFV/2 ALWAYS INTACT, MPAC
LXCH MPAC +3 # RENEWD AFTER RETURN FROM CALLER,
TC FLTRSUB # TWO FILTER UPDATES MAY BE DONE.
TS UNFVY/2 # UNFV/2 NEED NOT BE EXACTLY SEMI-UNIT.
CA UNFVZ/2
LXCH MPAC +5
TC FLTRSUB
TS UNFVZ/2
TC INTPRET # COMPLETES FILTER
# Page 913
# FIND A SUITABLE WINDOW POINTING VECTOR
AFTRFLTR SLOAD BHIZ # IF XOV NOT INHIBITED, GO FETCH ZNB
FLAGOODW
FETCHZNB
VLOAD CALL
UNZ/2
UNWCTEST
FETCHZNB VLOAD
ZNBPIP
STCALL UNZ/2
UNWCTEST
VLOAD VCOMP # Z AND -X CAN'T BOTH PARALLEL UNFC/2
XNBPIP
STORE UNZ/2
# COMPUTE THE REQUIRED DIRECTION COSINE MATRIX
DCMCL VLOAD VXV
UNZ/2
UNX/2
UNIT PUSH # UNY/2 FIRST ITERATION
VXV VSL1
UNX/2
STORE UNZ/2 # -UNZ/2 FIRST ITERATION
VXSC PDVL # EXCHANGE -UNFVZ/2 UNZ/2 FOR UNY/2
UNFVZ/2 # MUST BE SMALL
VXSC BVSU # YIELDS -UNFVY/2 UNY/2-UNFVZ/2 UNZ/2
UNFVY/2 # MUST BE SMALL
VSL1 VAD
UNX/2
UNIT # TOTALLY ELIMINATES THRUST POINTING ERROR
STORE UNX/2 # UNX/2
VXV VSL1
UNZ/2 # -UNZ/2 WAS STORED HERE REMEMBER
STORE UNY/2 # UNY/2
VCOMP VXV
UNX/2
VSL1
STORE UNZ/2 # UNZ/2
# Page 914
# COMPUTES THE REQUIRED GIMBAL ANGLES
CALL
NB2CDUSP # YIELDS THE RQD GIMBAL ANGLES, 2'S, PI
EXIT
# LIMIT THE MIDDLE GIMBAL ANGLE & COMPUTE THE UNLIMITED GIMBAL ANGLE CHGS
CA MPAC +2 # LIMIT THE MGA
TS L # CAN'T LXCH: NEED UNLIMITED MGA FOR ALARM
CA CDUZDLIM
TC LIMITSUB # YIELDS LIMITED MGA. 1 BIT ERROR POSSIBLE
XCH MPAC +2 # BECAUSE USING 2'S COMP. WHO CARES?
EXTEND
MSU MPAC +2 # THIS BETTER YIELD ZERO
EXTEND
BZF +2
TCF ALARMMGA
MGARET INHINT # RELINT AT TC INTPRET AFTER TCQCDUW
ZL
CA TWO
DELGMBLP TS TEM2
CA L # TO PREVENT FALSE STARTS ABOUT X, ZERO
EXTEND # FLAGOODW IF DELGMBZ OR Y TOO BIG.
SQUARE
AD HI5 # WITHIN 1 BIT OF -(45 DEG SQUARED)
EXTEND
BZMF +3
CA ZERO
TS FLAGOODW
INDEX TEM2
CA MPAC
INDEX TEM2
TS CPHI # OUTPUTS TO NOUN22
EXTEND
INDEX TEM2
MSU CDUXD # NO MATTER THAT THESE SLIGHLTY DIFFERENT
COM # FROM WHEN WE INITIALLY FETCHED THEM
INDEX TEM2
TS -DELGMB # -UNLIMITED GIMBAL ANGLE CHGS, 1'S, PI
TS L # FOR PRECEDING TEST ON NEXT LOOP PASS
CCS TEM2
TCF DELGMBLP
# Page 915
# BRANCHES TO NOATTCNT
CCS FLPAUTNO
TCF NOATTCNT +2 # NO PNGCS AUTO
CA FLAGWRD5
MASK ENGONBIT
EXTEND
BZF NOATTCNT +2 # ENGINE NOT ON
# Page 916
# LIMIT THE ATTITUDE ANGLE CHANGES
#
# THIS SECTION LIMITS THE ATTITUDE ANGLE CHANGES ABOUT A SET OF ORTHOGONAL VEHICLE AXES X,YPRIME,ZPRIME,
# THESE AXES COINCIDE WITH THE COMMANDED VEHICLE AXES IF AND ONLY IF CDUXD IS ZERO. THE PRIME SYSTEM IS
# THE COMMANDED VEHICLE SYSTEM ROTATED ABOUT THE X AXIS TO BRING THE Z AXIS INTO ALIGNMENT WITH THE MIDDLE GIMBAL
# AXIS. ATTITUDE ANGLE CHANGES IN THE PRIME SYSTEM ARE RELATED TO SMALL GIMBAL ANGLE CHANGES BY:
#
# [ -DELATTX ] [ 1 SIN(CDUZD) 0 ] [ -DELGMBX ]
# [ ] [ ] [ ]
# [ -DELATTYPRIME ] = [ 0 COS(CDUZD) 0 ] [ -DELGMBY ]
# [ ] [ ] [ ]
# [ -DELATTZPRIME ] [ 0 0 1 ] [ -DELGMBZ ]
LXCH -DELGMB +2 # SAME AS -DELATTZPRIME UNLIMITED
INDEX NDXCDUW
CA DAZMAX
TC LIMITSUB
TS -DELGMB +2 # -DELGMBZ
CA -DELGMB +1
EXTEND
MP COSCDUZ # YIELDS -DELATTYPRIME/2 UNLIMITED
TS L
INDEX NDXCDUW
CA DAY/2MAX
TC LIMITSUB
EXTEND
DV COSCDUZ
XCH -DELGMB +1 # -DELGMBY, FETCHING UNLIMITED VALUE
EXTEND
MP SINCDUZ
DDOUBL
COM
EXTEND # YIELDS +DELATTX UNLIMITD, MAG < 180 DEG.
MSU -DELGMB # BASED ON UNLIMITED DELGMBV.
TS L # ONE BIT ERROR IF OPERANDS IN MSU
INDEX NDXCDUW # OF MIXED SIGNS. WHO CARES?
CA DAXMAX
TC LIMITSUB
TS -DELGMB # SAVE LIMITED +DELATTX
CCS FLAGOODW
CS -DELGMB # FETCH IT BACK CHGING SIGN IF WINDOW GOOD
TS -DELGMB # OTHERWISE USE ZERO FOR -DELATTX
CS -DELGMB +1
EXTEND
MP SINCDUZ
DDOUBL # YIELDS -CNTRIB TO -DELATTX FROM -DELGMBY
ADS -DELGMB # -DELGMBX. NO OVERFLOW SINCE LIMITED TO
# 20DEG(1+SIN(70DEG)/COS(70DEG)) < 180DEG
# Page 917
# COMPUTE COMMANDED ATTITUDE RATES
#
# [ OMEGAPD ] [ -2 -4 SINCDUZ +0 ] [ -DELGMBZ ]
# [ ] [ ] [ ]
# [ OMEGAQD ] = [ +0 -8 COSCDUZ COSCDUX -4 SINCDUX ] [ -DELGMBY ]
# [ ] [ ] [ ]
# [ OMEGARD ] [ +0 +8 COSCDUZ SINCDUX -4 COSCDUX ] [ -DELGMBZ ]
#
# ATTITUDE ANGLE RATES IN UNITS OF PI/4 RAD/SEC = K TRIG FCNS IN UNITS OF 2 X GIMBAL ANGLE RATES IN UNITS OF
# PI/2 RAD/SEC. THE CONSTANTS ARE BASED ON DELGMB BEING THE GIMBAL ANGLE CHANGES IN UNITS OF PI RADIANS,
# AND 2 SECONDS BEING THE COMPUTATION PERIOD (THE PERIOD BETWEEN SUCCESSIVE PASSES THRU FINDCDUW).
CS -DELGMB
TS OMEGAPD
CS -DELGMB +1
EXTEND
MP SINCDUZ
DDOUBL
ADS OMEGAPD
ADS OMEGAPD
CS -DELGMB +1
EXTEND
MP COSCDUX
DDOUBL
EXTEND
MP COSCDUZ
TS OMEGAQD
CS -DELGMB +2
EXTEND
MP SINCDUX
ADS OMEGAQD
ADS OMEGAQD
ADS OMEGAQD
CA -DELGMB +1
EXTEND
MP SINCDUX
DDOUBL
EXTEND
MP COSCDUZ
TS OMEGARD
CS -DELGMB +2
EXTEND
MP COSCDUX
ADS OMEGARD
ADS OMEGARD
ADS OMEGARD
# Page 918
# FINAL TRANSFER
CA TWO
CDUWXFR TS TEM2
INDEX TEM2
CA -DELGMB
EXTEND
MP DT/DELT # RATIO OF DAP INTERVAL TO CDUW INTERVAL
TC ONESTO2S
INDEX TEM2
TS DELCDUX # ANGLE INTERFACE
INDEX TEM2
CCS OMEGAPD
AD ONE
TCF +2
AD ONE
EXTEND # WE NOW HAVE ABS(OMEGAPD,QD,RD)
INDEX TEM2
MP OMEGAPD
EXTEND
MP BIT11 # 1/16
EXTEND
INDEX TEM2 # 2
DV 1JACC # UNITS PI/4 RAD/SEC
TS L
CA DELERLIM
TC LIMITSUB
INDEX TEM2
TS DELPEROR # LAG ANGLE = OMEGA ABS(OMEGA)/2 ACCEL
CCS TEM2
TCF CDUWXFR
# HAUSKEEPING AND RETURN
TCQCDUW CA ECDUWUSR
TS EBANK # RETURN USER'S EBANK
TC INTPRET
SETPD GOTO
0
QCDUWUSR # NORMAL AND ABNORMAL RETURN TO USER
# Page 919
# THRUST VECTOR FILTER SUBROUTINE
FLTRSUB EXTEND
QXCH TEM2
TS TEM3 # SAVE ORIGINAL OFFSET
COM # ONE MCT, NO WDS, CAN BE SAVED IF NEG OF
AD L # ORIG OFFSET ARRIVES IN A, BUT IT'S
EXTEND # NOT WORTH THE INCREASED OBSCURITY.
INDEX NDXCDUW
MP GAINFLTR
TS L # INCR TO OFFSET, UNLIMITED
CA DUNFVLIM # SAME LIMIT FOR Y AND Z
TC LIMITSUB # YIELDS INCR TO OFFSET, LIMITED
AD TEM3 # ORIGINAL OFFSET
TS L # TOTAL OFFSET, UNLIMITED
CA UNFVLIM # SAME LIMIT FOR Y AND Z
TC LIMITSUB # YIELDS TOTAL OFFSET, LIMITED
TC TEM2
# SUBR TO TEST THE ANGLE BETWEEN THE PROPOSED WINDOW AND THRUST CMD VCTS
UNWCTEST DOT DSQ
UNX/2
DSU BMN
DOTSWFMX
DCMCL
SSP RVQ # RVQ FOR ALT CHOICE IF DOT MAGN TOO LARGE
FLAGOODW # ZEROING WINDOW GOOD FLAG
0
# Page 920
# NB2CDUSP RETURNS THE 2'S COMPLEMENT, PI, SP CDU ANGLES X,Y,Z IN MPAC,+1,+2 GIVEN THE MATRIX WHOSE ROW VECTORS
# ARE THE SEMI-UNIT NAV BASE VECTORS X,Y,X EXPRESSED IN STABLE MEMBER COORDINATES, LOCATED AT 0 IN THE PUSH LIST.
# NB2CDUSP USES THE ARCTRGSP WHICH HAS A MAXIMUM ERROR OF +-4 BITS.
NB2CDUSP DLOAD DSQ
2
BDSU BPL
DP1/4TH
+3
DLOAD
ZEROVECS # IN CASE SIN WAS SLIGHTLY > 1/2
SQRT EXIT # YIELDS COS(CDUZ) IN UNITS OF 2
EXTEND
DCA MPAC
DDOUBL
TS TEM5
TCF +3
CA POSMAX # OVERFLOW. FETCH POSMAX, MPAC ALWAYS POS
TS TEM5 # COS(CDUZ) IN TEM5, UNITS 1
INDEX FIXLOC
CA 2
LXCH MPAC
TC ARCTRGSP
TS MPAC +2 # CDUZ
CA ZERO
TC DVBYCOSM
CA FOUR
TC DVBYCOSM
CS TEM1
TC ARCTRGSP
TS MPAC +1 # CDUY
CA BIT4
TC DVBYCOSM
CA 16OCT
TC DVBYCOSM
CS TEM1
TC ARCTRGSP
TS MPAC # CDUX
TC INTPRET
RVQ
16OCT OCT 16
# Page 921
# THE ELEMENTS OF THE NAV BASE MATRIX WHICH WE MUST DIVIDE BY COS(MGA)
# ALREADY CONTAIN COS(MGA)/2 AS A FACTOR. THEREFORE THE QUOTIENT SHOULD
# ORDINARILY NEVER EXCEED 1/2 IN MAGNITUDE. BUT IF THE MGA IS NEAR PI/2
# THEN COS(MGA) IS NEAR ZERO, AND THERE MAY BE SOME CHAFF IN THE OTHER
# ELEMENTS OF THE MATRIX WHICH WOULD PRODUCE CHAOS UNDER DIVISION.
# BEFORE DIVIDING WE MAKE SURE COS(MGA) IS AT LEAST ONE BIT LARGER
# THAN THE MAGNITUDE OF THE HIGH ORDER PART OF THE OPERAND.
#
# IF ONE OR MORE DIVIDES CANNOT BE PERFORMED, THIS MEANS THAT THE
# REQUIRED MGA IS VERY NEARLY +-PI/2 AND THEREFORE THE OTHER GIMBAL
# ANGLES ARE INDETERMINATE. THE INNER AND OUTER GIMBAL ANGLES RETURNED
# IN THIS CASE WILL BE RANDOM MULTIPLES OF PI/2.
DVBYCOSM AD FIXLOC
TS ADDRWD # ADRES OF OPERAND
INDEX ADDRWD # FETCH NEG ABS OF OPERAND, AD TEM5, AND
CA 0 # SKIP DIVIDE IF RESULT NEG OR ZERO
EXTEND
BZMF +2
COM
AD TEM5 # C(A) ZERO OR NEG, C(TEM5) ZERO OR POS
EXTEND
BZMF TSL&TCQ # DIFFERENCE ALWAYS SMALL IF BRANCH
EXTEND # TEM5 EXCEEDS ABS HIGH ORDER PART OF
INDEX ADDRWD # OPERAND BY AT LEAST ONE BIT.
DCA 0 # THEREFORE IT EXCEEDS THE DP OPERAND
EXTEND # AND DIVISION WILL ALWAYS SUCCEED.
DV TEM5
TSL&TCQ TS L
LXCH TEM1
TC Q
# Page 922
# ARCTRGSP RETURNS THE 2'S COMPLEMENT, PI, SP ANGLE IN THE A REGISTER GIVEN ITS SINE IN A AND ITS COSINE IN L IN
# UNITS OF 2. THE RESULT IS AN UNAMBIGUOUS ANGLE ANYWHERE IN THE CIRCLE, WITH A MAXIMUM ERROR OF +-4 BITS.
# THE ERROR IS PRODUCED BY THE SUBROUTINE SPARCSIN WHICH IS USED ONLY IN THE REGION +-45 DEGREES.
ARCTRGSP EXTEND
BZF SINZERO # TO AVOID DIVIDING BY ZERO
EXTEND
QXCH TEM4
TS TEM2
CA L
TS TEM3
CA ZERO
EXTEND
DV TEM2
EXTEND
BZF USECOS
CCS TEM3 # SIN IS SMALLER OR EQUAL
CA ZERO
TCF +4
CS TEM2 # IF COS NEG, REVERSE SIGN OF SIN,
TS TEM2 # ANGLE = PI-ARCSIN(SIN)
CA NEGMAX # PICK UP PI, 2'S COMPLEMENT
TS TEM3 # WE NO LONGER NEED COS
CA TEM2
TC SPARCSIN -1
TC ONESTO2S
EXTEND
MSU TEM3
1TO2&TCQ TC ONESTO2S
TC TEM4
USECOS CS TEM3 # COS IS SMALLER
TC SPARCSIN -1 # ANGLE = SIGN(SIN)(FI/2-ARCSIN(COS))
AD HALF
TS TEM3 # WE NO LONGER NEED COS
CCS TEM2
CA TEM3
TCF 1TO2&TCQ
CS TEM3
TCF 1TO2&TCQ
SINZERO CCS L
CA ZERO
TC Q
CA NEGMAX # PI, 2'S COMP
TC Q
# Page 923
# SPARCSIN TAKES AN ARGUMENT SCALED UNITY IN A AND RETURNS AN ANGLE SCALED
# 180 DEGREES IN A. IT HAS BEEN UNIT TESTED IN THE REGION +-.94 (+-70
# DEGREES) AND THE MAXIMUM ERROR IS +-5 BITS WITH AN AVERAGE TIME OF
# 450 MICROSECONDS. SPARCSIN -1 TAKES THE ARGUMENT SCALED TWO. (BOB CRISP)
DOUBLE
SPARCSIN TS SR
TCF +4
INDEX A
CS LIMITS
TS SR
EXTEND
MP A
TS TEM1
EXTEND
MP DPL9
AD DPL7
EXTEND
MP TEM1
AD DPL5
EXTEND
MP TEM1
AD DPL3
EXTEND
MP TEM1
AD DPL1
EXTEND
MP SR
TC Q
DPL1 DEC 10502
DPL3 DEC 432
DPL5 DEC 7300
DPL7 DEC -11803
DPL9 DEC 8397
# Page 924
# LIMITSUB LIMITS THE MAGNITUDE OF THE POSITIVE OR NEGATIVE VARIABLE
# ARRIVING IN L TO THE POSITIVE LIMIT ARRIVING IN A.
# THE SIGNED LIMITED VARIABLE IS RETURNED IN A.
#
# VERSION COUTESY HUGH BLAIR-SMITH
LIMITSUB TS TEM1
CA ZERO
EXTEND
DV TEM1
CCS A
LXCH TEM1
TCF +2
TCF +3
CA L
TC Q
CS TEM1
TC Q
# SUBROUTINE TO CONVERT 1'S COMP SP TO 2'S COMP
ONESTO2S CCS A
AD ONE
TC Q
CS A
TC Q
# NO ATTITUDE CONTROL
NOATTCNT TC ALARM
OCT 00402 # NO ATTITUDE CONTROL
+2 INHINT # COME HERE FOR NOATTCNT WITHOUT ALARM
TC IBNKCALL # RELINT AT TC INTPRET AFTER TCQCDUW
FCADR STOPRATE
TCF TCQCDUW # RETURN TO USER SKIPPING AUTOPILOT CMDS
# MIDDLE GIMBAL ANGLE ALARM
ALARMMGA TC ALARM
OCT 00401
TCF MGARET
# Page 925
#******************************************************************
# CONSTANTS
#******************************************************************
# ADDRESS CONSTANTS
ECDUWL ECADR ECDUW
# THRUST DIRECTION FILTER CONSTANTS
GAINFLTR DEC .2 # GAIN FILTER SANS CSM
DEC .1 # GAIN FILTER WITH CSM
DUNFVLIM DEC .007 B-1 # 7 MR MAX CHG IN F DIR IN VEH IN 2 SECS.
# THIS DOES NOT ALLOW FOR S/C ROT RATE.
UNFVLIM DEC .129 B-1 # 129 MR MAX THRUST OFFSET. 105 MR TRAVEL
# +10MR DEFL+5MR MECH MOUNT+9MR ABLATION.
# CONSTANT RELATED TO GIMBAL ANGLE COMPUTATIONS
DOTSWFMX DEC .93302 B-4 # LIM COLNRTY OF UNWC/2 & UNFC/2 TO 85 DEG
# LOWER PART COMES FROM NEXT CONSTANT
DAXMAX DEC .11111111111 # DELATTX LIM TO 20 DEG IN 2 SECS, 1'S, PI
DEC .0111111111 # 2 DEG WHEN CSM DOCKED
DAY/2MAX DEC .05555555555 # LIKEWISE FOR DELATTY
DEC .0055555555
DAZMAX = DAXMAX # LIKEWISE FOR DELATTZ
CDUZDLIM DEC .3888888888 # 70 DEG LIMIT FOR MGA, 1'S, PI
# CONSTANTS FOR DATA TRANSFER
DT/DELT DEC .05 # .1 SEC/2 SEC WHICH IS THE AUTOPILOT
# CONTROL SAMPLE PERIOD/COMPUTATION PERIOD
DELERLIM = DAY/2MAX # 0 DEG LIMIT FOR LAG ANGLES, 1'S, PI
# *** END OF FLY .132 ***

262
FIXED_FIXED_CONSTANT_POOL.s Normal file
View File

@ -0,0 +1,262 @@
# Copyright: Public domain.
# Filename: FIXED_FIXED_CONSTANT_POOL.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1200-1204
# Mod history: 2009-05-13 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1200
BLOCK 02
COUNT 02/FCONS
# THE FOLLOWING TABLE OF 18 VALUES IS INDEXED. DO NOT INSERT OR REMOVE ANY QUANTITIES
DPOSMAX OCT 37777 # MUST PRECED POSMAX
POSMAX OCT 37777
LIMITS = NEG1/2
NEG1/2 OCT -20000 # USED BY SIN ROUTINE (MUST BE TWO
# LOCATIONS IN FRONT OF BIT14)
# BIT TABLE
BIT15 OCT 40000
BIT14 OCT 20000
BIT13 OCT 10000
BIT12 OCT 04000
BIT11 OCT 02000
BIT10 OCT 01000
BIT9 OCT 00400
BIT8 OCT 00200
BIT7 OCT 00100
BIT6 OCT 00040
BIT5 OCT 00020
BIT4 OCT 00010
BIT3 OCT 00004
BIT2 OCT 00002
BIT1 OCT 00001
# DO NOT DESTROY THIS COMBINATION, SINCE IT IS USED IN DOUBLE PRECISION INSTRUCTIONS.
NEG0 OCT -0 # MUST PRECEDE ZERO
ZERO OCT 0 # MUST FOLLOW NEG0
# BIT1 OCT 00001
# NO.WDS OCT 2 # INTERPRETER
# OCTAL3 OCT 3 # INTERPRETER
# R3D1 OCT 4 # PINBALL
FIVE OCT 5
# REVCNT OCT 6 # INTERPRETER
SEVEN OCT 7
# BIT4 OCT 00010
# R2D1 OCT 11 # PINBALL
OCT11 = R2D1 # P20S
# BINCON DEC 10 # PINBALL (OCTAL 12)
ELEVEN DEC 11
# OCT14 OCT 14 # ALARM AND ABORT (FILLER)
OCT15 OCT 15
# R1D1 OCT 16 # PINBALL
# Page 1201
LOW4 OCT 17
# BIT5 OCT 00020
# ND1 OCT 21 # PINBALL
# VD1 OCT 23 # PINBALL
# OCT24 OCT 24 # SERVICE ROUTINES
# MD1 OCT 25 # PINBALL
BITS4&5 OCT 30
# OCT31 OCT 31 # SERVICE ROUTINES
CALLCODE OCT 00032
# LOW5 OCT 37 # PINBALL
# 33DEC DEC 33 # PINBALL (OCTAL 41)
# 34DEC DEC 34 # PINBALL (OCTAL 42)
TBUILDFX DEC 37 # BUILDUP FOR CONVENIENCE IN DAPTESTING
TDECAYFX DEC 38 # CONVENIENCE FOR DAPTESTING
# BIT6 OCT 00040
OCT50 OCT 50
DEC45 DEC 45
SUPER011 OCT 60 # BITS FOR SUPERBNK SETTING 011.
.5SEC DEC 50
# BIT7 OCT 00100
SUPER100 = BIT7 # BITS FOR SUPERBNK SETTING 100
# (LAST 4K OF ROPE)
SUPER101 OCT 120 # BITS FOR SUPERBNK SETTING 101
# OCT121 OCT 121 # SERVICE ROUTINES
# (FIRST 8K OF ACM)
SUPER110 OCT 140 # BITS FOR SUPERBNK SETTING 110.
# (LAST BK OF ACM)
1SEC DEC 100
# LOW7 OCT 177 # INTERPRETER
# BIT8 OCT 00200
# OT215 OCT 215 # ALARM AND ABORT
# 8,5 OCT 00220 # P20-P25 SUNDANCE
2SECS DEC 200
# LOW8 OCT 377 # PINBALL
# BIT9 OCT 00400
GN/CCODE OCT 00401 # SET S/C CONTROL SWITCH TO G/N
3SECS DEC 300
4SECS DEC 400
LOW9 OCT 777
# BIT10 OCT 01000
# 5.5DEGS DEC .03056 # P20-P25 SUNDANCE (OCTAL 00765)
# OCT1103 OCT 1103 # ALARM AND ABORT
C5/2 DEC .0363551 # (OCTAL 01124)
V05N09 VN 0509 # (SAME AS OCTAL 1211)
OCT1400 OCT 01400
V06N22 VN 0622
# MID5 OCT 1740 # PINBALL
BITS2-10 OCT 1776
LOW10 OCT 1777
# Page 1202
# BIT11 OCT 02000
# 2K+3 OCT 2003 # PINBALL
LOW7+2K OCT 2177 # OP CODE MASK + BANK 1 FBANK SETTING
EBANK5 OCT 02400
PRIO3 OCT 03000
EBANK7 OCT 03400
# LOW11 OCT 3777 # PINBALL
# BIT12 OCT 04000
# RELTAB OCT 04025 # T4RUPT
PRIO5 OCT 05000
PRIO6 OCT 06000
PRIO7 OCT 07000
# BIT13 OCT 10000
# OCT 10003 # T4RUPT RELTAB +1D
# 13,7,2 OCT 10102 # P20-P25 SUNDANCE
PRIO11 OCT 11000
# PRIO12 OCT 12000 # BANKCALL
PRIO13 OCT 13000
PRIO14 OCT 14000
# OCT 14031 # T4RUPT RELTAB +2D
PRIO15 OCT 15000
PRIO16 OCT 16000
# 85DEGS DEC .45556 # P20-P25 SUNDANCE (OCTAL 16450)
PRIO17 OCT 17000
OCT17770 OCT 17770
# BIT14 OCT 20000
# OCT 20033 # T4RUPT RELTAB +3D
PRIO21 OCT 21000
BLOCK 03
COUNT 03/FCONS
PRIO22 OCT 22000 # SERVICE ROUTINES
PRIO23 OCT 23000
PRIO24 OCT 24000
# 5/8+1 OCT 24001 # SINGLE PRECISION SUBROUTINES
# OCT 24017 # T4RUPT RELTAB +4D
PRIO25 OCT 25000
PRIO26 OCT 26000
PRIO27 OCT 27000
# CHRPRIO OCT 30000 # PINBALL
# OCT 30036 # T4RUPT RELTAB +5D
PRIO31 OCT 31000
C1/2 DEC .7853134 # (OCTAL 31103)
PRIO32 OCT 32000
PRIO33 OCT 33000
PRIO34 OCT 34000
# OCT 34034 # T4RUPT RELTAB +6D
PRIO35 OCT 35000
PRIO36 OCT 36000
# Page 1203
PRIO37 OCT 37000
63/64+1 OCT 37401
# MID7 OCT 37600 # PINBALL
OCT37766 OCT 37766
OCT37774 OCT 37774
OCT37776 OCT 37776
# DPOSMAX OCT 37777
# BIT15 OCT 40000
# OCT40001 OCT 40001 # INTERPRETER (CS 1 INSTRUCTION)
DLOADCOD OCT 40014
DLOAD* OCT 40015
# OCT 40023 # T4RUPT RELTAB +7D
BIT15+6 OCT 40040
OCT40200 OCT 40200
# OCT 44035 # T4RUPT RELTAB +8D
# OCT 50037 # T4RUPT RELTAB +9D
# OCT 54000 # T4RUPT RELTAB +10D
-BIT14 OCT 57777
# RELTAB11 OCT 60000 # T4RUPT
C3/2 DEC -.3216147 # (OCTAL 65552)
13,14,15 OCT 70000
-1/8 OCT 73777
HIGH4 OCT 74000
-ENDERAS DEC -2001 # (OCTAL 74056)
# HI5 OCT 76000 # PINBALL
HIGH9 OCT 77700
# -ENDVAC DEC -45 # INTERPRETER (OCTAL 77722)
# -OCT10 OCT -10 # (OCTAL 77767)
# NEG4 DEC -4 # (OCTAL 77773)
NEG3 DEC -3
NEG2 OCT 77775
NEGONE DEC -1
# Page 1204
# DEFINED BY EQUALS
# IT WOULD BE TO THE USERS ADVANTAGE TO OCCASIONALLY CHECK ANY OF THESE SYMBOLS IN ORDER TO PREVENT ANY
# ACCIDENTAL DEFINITION CHANGES.
MINUS1 = NEG1
NEG1 = NEGONE
ONE = BIT1
TWO = BIT2
THREE = OCTAL3
LOW2 = THREE
FOUR = BIT3
SIX = REVCNT
LOW3 = SEVEN
EIGHT = BIT4
NINE = R2D1
TEN = BINCON
NOUTCON = ELEVEN
OCT23 = VD1
OCT25 = MD1
PRIO1 = BIT10
EBANK3 = OCT1400
PRIO2 = BIT11
OCT120 = SUPER101
OCT140 = SUPER110
2K = BIT11
EBANK4 = BIT11
PRIO4 = BIT12
EBANK6 = PRIO3
QUARTER = BIT13
PRIO10 = BIT13
OCT10001 = CCSL
POS1/2 = HALF
PRIO20 = BIT14
HALF = BIT14
PRIO30 = CHRPRIO
BIT13-14 = PRIO30 # INTERPRETER USES IN PROCESSING STORECODE
OCT30002 = TLOAD +1
B12T14 = PRIO34
NEGMAX = BIT15
VLOADCOD = BIT15
VLOAD* = OCT40001
OCT60000 = RELTAB11
BANKMASK = HI5

1269
FLAGWORD_ASSIGNMENTS.s Normal file

File diff suppressed because it is too large Load Diff

4768
FP8.s

File diff suppressed because it is too large Load Diff

1474
FRESH_START_AND_RESTART.s Normal file

File diff suppressed because it is too large Load Diff

99
GIMBAL_LOCK_AVOIDANCE.s Normal file
View File

@ -0,0 +1,99 @@
# Copyright: Public domain.
# Filename: GIMBAL_LOCK_AVOIDANCE.agc
# Purpose: Part of the source code for Comanche, build 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 412-413
# Contact: Onno Hommes <ohommes@cmu.edu>.
# Website: www.ibiblio.org/apollo.
# Mod history: 05/07/09 OH Transcription Batch 1 Assignment
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further information.
# Please report any errors to info@sandroid.org.
# Page 412
BANK 15
SETLOC KALCMON1
BANK
EBANK= BCDU
# DETECTING GIMBAL LOCK
LOCSKIRT EQUALS WCALC
WCALC LXC,1 DLOAD*
RATEINDX
ARATE,1
SR4 CALL # COMPUTE THE INCREMENTAL ROTATION MATRIX
DELCOMP # DEL CORRESPONDING TO A 1 SEC ROTATION
# ABOUT COF
DLOAD* VXSC
ARATE,1
COF
MXV
QUADROT
STODL BRATE
AM
DMP DDV*
ANGLTIME
ARATE,1
SR
5
STOVL TM
BRATE
VXSC
BIASCALE
STORE BIASTEMP # ATTITUDE ERROR BIAS TO PREVENT OVERSHOOT
# IN SYSTEM
SETGO # STATE SWITCH CALCMAN2 (43D)
CALCMAN2 # 0(OFF) = BYPASS STARTING PROCEDURE
NEWANGL +1 # 1(ON) = START MANEUVER
ARATE 2DEC .0022222222 # = .05 DEG/SEC
2DEC .0088888889 # = .2 DEG/SEC
2DEC .0222222222 # = .5 DEG/SEC
2DEC .0888888889 # = 2 DEG/SEC $22.5 DEG/SEC
ANGLTIME 2DEC .000190735 # = 100B - 19
# MANEUVER ANGLE TO MANEUVER TIME
QUADROT 2DEC .1 # ROTATION MATRIX FROM S/C AXES TO CONTROL
# Page 413
2DEC 0 # AXES (X ROT = -7.25 DEG)
2DEC 0
2DEC 0
2DEC .099200 # =(.1)COS7.25
2DEC -.012620 # =-(.1)SIN7.25
2DEC 0
2DEC .012620 # (.1)SIN7.25
2DEC .099200 # (.1)COS7.25
BIASCALE 2DEC .0002543132 # = (450/180)(1/0.6)(1/16384)

View File

@ -0,0 +1,204 @@
# Copyright: Public domain.
# Filename: GROUND_TRACKING_DETERMINATION_PROGRAM.agc
# Purpose: Part of the source code for Comanche, build 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 456-459
# Contact: Onno Hommes <ohommes@cmu.edu>.
# Website: www.ibiblio.org/apollo.
# Mod history: 2009-05-07 OH Transcription Batch 1 Assignment
# 2009-05-20 RSB Corrected a couple of DIMOFLAG to DIM0FLAG.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further information.
# Please report any errors to info@sandroid.org.
# Page 456
# GROUND TRACKING DETERMINATION PROGRAM -- P21
#
# PROGRAM DESCRIPTION
# MOD NO -- 1
# MOD BY -- N. M. NEVILLE
#
# FUNCTIONAL DESCRIPTION --
# TO PROVIDE THE ASTRONAUT DETAILS OF THE LM OR CSM GROUND TRACK WITHOUT
# THE NEED FOR GROUND COMMUNICATION (REQUESTED BY DSKY).
#
# CALLING SEQUENCE --
# ASTRONAUT REQUEST THROUGH DSKY V37E21E
#
# SUBROUTINES CALLED --
# GOPERF4
# GOFLASH
# THISPREC
# OTHPREC
# LAT-LONG
#
# NORMAL EXIT MODES --
# ASTRONAUT REQUEST THROUGH DSKY TO TERMINATE PROGRAM V34E
#
# ALARM OR ABORT EXIT MODES --
# NONE
#
# OUTPUT --
# OCTAL DISPLAY OF OPTION CODE AND VEHICLE WHOSE GROUND TRACK IS TO BE
# COMPUTED
# OPTION CODE 00002
# THIS 00001
# OTHER 00002
# DECIMAL DISPLAY OF TIME TO BE INTEGRATED TO HOURS , MINUTES , SECONDS
# DECIMAL DISPLAY OF LAT,LONG,ALT
#
# ERASABLE INITIALIZATION REQUIRED
# AX0 2DEC 4.652459653 E-5 RADIANS "68-69 CONSTANTS"
# -AY0 2DEC 2.147535898 E-5 RADIANS
# AZ0 2DEC .7753206164 REVOLUTIONS
# FOR LUNAR ORBITS 504LM VECTOR IS NEEDED
# 504LM 2DEC -2.700340600 E-5 RADIANS
# 504LM _2 2DEC -7.514128400 E-4 RADIANS
# 504LM _4 2DEC _2.553198641 E-4 RADIANS
#
# NONE
#
# DEBRIS
# Page 457
# CENTRALS -- A,Q,L
# OTHER -- THOSE USED BY THE ABOVE LISTED SUBROUTINES
# SEE LEMPREC, LAT-LONG
SBANK= LOWSUPER # FOR LOW 2CADR'S.
BANK 33
SETLOC P20S
BANK
EBANK= P21TIME
COUNT 24/P21
PROG21 CAF ONE
TS OPTION2 # ASSUMED VEHICLE IS LM, R2 = 00001
CAF BIT2 # OPTION 2
TC BANKCALL
CADR GOPERF4
TC GOTOP00H # TERMINATE
TC +2 # PROCEED VALUE OF ASSUMED VEHICLE OK
TC -5 # R2 LOADED THROUGH DSKY
P21PROG1 CAF V6N34 # LOAD DESIRED TIME OF LAT-LONG.
TC BANKCALL
CADR GOFLASH
TC GOTOP00H # TERM
TC +2 # PROCEED VALUES OK
TC -5 # TIME LOADED THROUGH DSKY
TC INTPRET
DLOAD
DSPTEM1
STCALL TDEC1 # INTEG TO TIME SPECIFIED IN TDEC
INTSTALL
BON SET
P21FLAG
P21CONT # ON...RECYCLE USING BASE VECTOR
VINTFLAG # OFF..1ST PASS CALC BASE VECTOR
SLOAD SR1
OPTION2
BHIZ CLEAR
+2 # ZERO..THIS VEHICLE (CM)
VINTFLAG # ONE...OTHER VEHICLE(LM)
CLEAR CLEAR
DIM0FLAG
INTYPFLG # PRECISION
CALL
INTEGRV # CALCULATE
GOTO # .AND
P21VSAVE # ..SAVE BASE VECTOR
P21CONT VLOAD # RECYCLE..INTEG FROM BASE VECTOR
P21BASER
# Page 458
STOVL RCV # ..POS
P21BASEV
STODL VCV # ..VEL
P21TIME
STORE TET # ..TIME
CLEAR CLEAR
DIM0FLAG
MOONFLAG
SLOAD BZE
P21ORIG
+3 # ZERO = EARTH
SET # ...2 = MOON
MOONFLAG
CALL
INTEGRVS
P21VSAVE DLOAD # SAVE CURRENT BASE VECTOR
TAT
STOVL P21TIME # ..TIME
RATT1
STOVL P21BASER # ..POS B-29 OR B-27
VATT1
STORE P21BASEV # ..VEL B-7 OR B-5
ABVAL SL*
0,2
STOVL P21VEL # /VEL/ FOR N73 DSP
RATT
UNIT DOT
VATT # U(R).(V)
DDV ASIN # U(R).U(V)
P21VEL
STORE P21GAM # SIN-1 U(R).U(V), -90 TO +90
SXA,2 SET
P21ORIG # 0 = EARTH 2 = MOON
P21FLAG
P21DSP CLEAR SLOAD # GENERATE DISPLAY DATA
LUNAFLAG
X2
BZE SET
+2 # 0 = EARTH
LUNAFLAG
VLOAD
RATT
STODL ALPHAV
TAT
CLEAR CALL
ERADFLAG
LAT-LONG
DMP # MPAC = ALT, METERS B-29
K.01
STORE P21ALT # ALT/100 FOR N73 DSP
# Page 459
EXIT
CAF V06N43 # DISPLAY LAT,LONG,ALT
TC BANKCALL # LAT,LONG = REVS B0 BOTH EARTH/MOON
CADR GOFLASH # ALT = METERS B-29 BOTH EARTH/MOON
TC GOTOP00H # TERM
TC GOTOP00H
TC INTPRET # V32E RECYCLE
DLOAD DAD
P21TIME
600SEC # 600 SECONDS OR 10 MIN
STORE DSPTEM1
RTB
P21PROG1
600SEC 2DEC 60000 # 10 MIN
P21ONENN OCT 00001 # NEEDED TO DETERMINE VEHICLE
OCT 00000 # TO BE INTEGRATED
V06N43 VN 00643
V6N34 VN 00634
K.01 2DEC .01

28
HeaderTemplate.s Normal file
View File

@ -0,0 +1,28 @@
# Copyright: Public domain.
# Filename: XXXXXXXX.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: XXXX-XXXX
# Mod history: 2009-05-XX XXX Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969

File diff suppressed because it is too large Load Diff

370
IMU_COMPENSATION_PACKAGE.s Normal file
View File

@ -0,0 +1,370 @@
# Copyright: Public domain.
# Filename: IMU_COMPENSATION_PACKAGE.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 297-306
# Mod history: 2009-05-08 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images/
# 2009-05-21 RSB In IRIGZ, PRIO17 corrected to PRIO21.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 297
BANK 7
SETLOC IMUCOMP
BANK
EBANK= NBDX
COUNT 06/ICOMP
1/PIPA CAF LGCOMP # SAVE EBANK OF CALLING PROGRAM
XCH EBANK
TS MODE
CCS GCOMPSW # BYPASS IF GCOMPSW NEGATIVE
TCF +3
TCF +2
TCF IRIG1 # RETURN
INHINT # ASSURE COMPLETE COMPENSATION OF DELV'S
# FOR DOWNLINK.
1/PIPA1 CAF FOUR # PIPAZ, PIPAY, PIPAX
TS BUF +2
INDEX BUF +2
CA PIPASCF # (P.P.M.) X 2(-9)
EXTEND
INDEX BUF +2
MP DELVX # (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
TS Q # SAVE MAJOR PART
CA L # MINOR PART
EXTEND
MP BIT6 # SCALE 2(+9) SHIFT RIGHT 9
INDEX BUF +2
TS DELVX +1 # FRACTIONAL PIPA PULSES SCALED 2(+14)
CA Q # MAJOR PART
EXTEND
MP BIT6 # SCALE 2(+9) SHIFT RIGHT 9
INDEX BUF +2
DAS DELVX # (PIPAI) + (PIPAI)(SF)
INDEX BUF +2
CS PIPABIAS # (PIPA PULSES)/(CS) X 2(-8) *
EXTEND
MP 1/PIPADT # (CS) X 2(+8) NOW (PIPA PULSES) X 2(+0) *
EXTEND
MP BIT1 # SCALE 2(+14) SHIFT RIGHT 14 *
INDEX BUF +2
DAS DELVX # (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
CCS BUF +2 # PIPAZ, PIPAY, PIPAX
# Page 298
AD NEG1
TCF 1/PIPA1 +1
NOOP # LESS THAN ZERO IMPOSSIBLE
RELINT
# Page 299
IRIGCOMP TS GCOMPSW # INDICATE COMMANDS 2 PULSES OR LESS.
TS BUF # INDEX COUNTER. IRIGX, IRIGY, IRIGZ.
IRIGX EXTEND
DCS DELVX # (PIPA PULSES) X 2(+14)
DXCH MPAC
CA ADIAX # (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
TC GCOMPSUB # -(ADIAX)(PIPAX) (GYRO PULSES) X 2(+14)
EXTEND #
DCS DELVY # (PIPA PULSES) X 2(+14)
DXCH MPAC #
CS ADSRAX # (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
TC GCOMPSUB # -(ADSRAX)(PIPAY) (GYRO PULSES) X 2(+14)
# EXTEND # ***
# DCS DELVY # *** (PIPA PULSES) X 2(+14)
# DXCH MPAC # ***
# CA ADOAX # *** (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
# TC GCOMPSUB # *** -(ADOAX)(PIPAZ) (GYRO PULSES) X 2(+14)
CS NBDX # (GYRO PULSES)/(CS) X 2(-3)
TC DRIFTSUB # -(NBDX)(DELTAT) (GYRO PULSES) X 2(+14)
IRIGY EXTEND
DCS DELVY # (PIPA PULSES) X 2(+14)
DXCH MPAC
CA ADIAY # (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
TC GCOMPSUB # -(ADIAY)(PIPAY) (GYRO PULSES) X 2(+14)
EXTEND
DCS DELVZ # (PIPA PULSES) X 2(+14)
DXCH MPAC
CS ADSRAY # (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
TC GCOMPSUB # +(ADSRAY)(PIPAZ) (GYRO PULSES) X 2(+14)
# EXTEND # ***
# DCS DELVX # *** (PIPA PULSES) X 2(+14)
# DXCH MPAC # ***
# CA ADOAY # *** (GYRO PULSES)/(PIPA PULS) X 2(-3) *
# TC GCOMPSUB # *** -(ADOAY)(/PIPAX) (GYRO PULSES) X 2(+14)
CS NBDY # (GYRO PULSES)/(CS) X 2(-5)
TC DRIFTSUB # -(NBDY)(DELTAT) (GYRO PULSES) X 2(+14)
IRIGZ EXTEND
DCS DELVY # (PIPA PULSES) X 2(-14)
DXCH MPAC
CA ADSRAZ # (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
# Page 300
TC GCOMPSUB # -(ADSRAZ)(PIPAY) (GYRO PULSES) X 2(+14)
EXTEND
DCS DELVZ # (PIPA PULSES) X 2(+14)
DXCH MPAC
CA ADIAZ # (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
TC GCOMPSUB # -(ADIAZ)(PIPAZ) (GYRO PULSES) X 2(+14)
# EXTEND # ***
# DCS DELVX # *** (PIPA PULSE) X 2(+14)
# DXCH MPAC # ***
# CS ADOAZ # *** (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
# TC GCOMPSUB # *** +(ADOAZ)(PIPAX) (GYRO PULSES) X 2(+14)
CA NBDZ # (GYRO PULSES)/(CS) X 2(-5)
TC DRIFTSUB # +(NBDZ)(DELTAT) (GYRO PULSES) X 2(+14)
# Page 301
CCS GCOMPSW # ARE GYRO COMMANDS GREATER THAN 2 PULSES
TCF +2 # YES
TCF IRIG1 # NO
CA PRIO21 # HIGHER THAN SERVICER -- LESS THAN PRELAUNCH
TC NOVAC
EBANK= NBDX
2CADR 1/GYRO
RELINT
IRIG1 CA MODE # SET EBANK FOR RETURN
TS EBANK
TCF SWRETURN
GCOMPSUB XCH MPAC # ADIA OR ADSRA COEFFICIENT ARRIVES IN A
EXTEND # C(MPAC) = (PIPA PULSES) X 2(+14)
MP MPAC # (GYRO PULSES)/(PIPA PULSE) X 2(-3) *
DXCH VBUF # NOW = (GYRO PULSES) X 2(+11) *
CA MPAC +1 # MINOR PART OF PIPA PULSES
EXTEND
MP MPAC # ADIA OR ADSRA
TS L
CAF ZERO
DAS VBUF # NOW = (GYRO PULSES) X 2(+11) *
CA VBUF # PARTIAL RESULT -- MAJOR
EXTEND
MP BIT12 # SCALE 2(+3) SHIFT RIGHT 3 *
INDEX BUF # RESULT = (GYRO PULSES) X 2(+14)
DAS GCOMP # HI(ADIA)(PIPAI) OR HI(ADSRA)(PIPAI)
CA VBUF +1 # PARTIAL RESULT -- MINOR
EXTEND
MP BIT12 # SCALE 2(+3) SHIFT RIGHT 3 *
TS L
CAF ZERO
INDEX BUF # RESULT = (GYRO PULSES) X 2(+14)
DAS GCOMP # (ADIA)(PIPAI) OR (ADSRA)(PIPAI)
TC Q
# Page 302
DRIFTSUB EXTEND
QXCH BUF +1
EXTEND # C(A) = NBD (GYRO PULSES)/(CS) X 2(-5)
MP 1/PIPADT # (CS) X 2(+8) NO (GYRO PULSES) X 2(+3)
LXCH MPAC +1 # SAVE FOR FRACTIONAL COMPENSATION
EXTEND
MP BIT4 # SCALE 2(+11) SHIFT RIGHT 11
INDEX BUF
DAS GCOMP # HI(NBD)(DELTAT) (GYRO PULSES) X 2(+14)
CA MPAC +1 # NOW MINOR PART
EXTEND
MP BIT4 # SCALE 2(+11) SHIFT RIGHT 11
TS L
CAF ZERO
INDEX BUF # ADD IN FRACTIONAL COMPENSATION
DAS GCOMP # (NBD)(DELTAT) (GYRO PULSES) X 2(+14)
DRFTSUB2 CAF TWO # PIPAX, PIPAY, PIPAZ
AD BUF
XCH BUF
INDEX A
CCS GCOMP # ARE GYRO COMMANDS 1 PULSE OR GREATER
TCF +2 # YES
TC BUF +1 # NO
MASK NEGONE
CCS A # ARE GYRO COMMANDS GREATER THAN 2 PULSES
TS GCOMPSW # YES -- SET GCOMPSW POSITIVE
TC BUF +1 # NO
# Page 303
1/GYRO CAF FOUR # PIPAZ, PIPAY, PIPAX
TS BUF
INDEX BUF # SCALE GYRO COMMANDS FOR IMUPULSE
CA GCOMP +1 # FRACTIONAL PULSES
EXTEND
MP BIT8 # SHIFT RIGHT 7
INDEX BUF
TS GCOMP +1 # FRACTIONAL PULSES SCALED
CAF ZERO # SET GCOMP = 0 FOR DAS INSTRUCTION
INDEX BUF
XCH GCOMP # GYRO PULSES
EXTEND
MP BIT8 # SHIFT RIGHT 7
INDEX BUF
DAS GCOMP # ADD THESE TO FRACTIONAL PULSES ABOVE
CCS BUF # PIPAZ, PIPAY, PIPAX
AD NEG1
TCF 1/GYRO +1
LGCOMP ECADR GCOMP # LESS THAN ZERO IMPOSSIBLE
CAF LGCOMP
TC BANKCALL
CADR IMUPULSE # CALL GYRO TORQUING ROUTINE
TC BANKCALL
CADR IMUSTALL # WAIT FOR PULSES TO GET OUT
TCF ENDOFJOB # TEMPORARY
GCOMP1 CAF FOUR # PIPAZ, PIPAY, PIPAX
TS BUF
INDEX BUF # RESCALE
CA GCOMP +1
EXTEND
MP BIT8 # SHIFT MINOR PART LEFT 7 -- MAJOR PART = 0
INDEX BUF
LXCH GCOMP +1 # BITS 8-14 OF MINOR PART WERE = 0
CCS BUF # PIPAZ, PIPAY, PIPAX
AD NEG1
TCF GCOMP1 +1
V06N30S VN 0630
TCF ENDOFJOB
# Page 304
NBDONLY CCS GCOMPSW # BYPASS IF GCOMPSW NEGATIVE
TCF +3
TCF +2
TCF ENDOFJOB
INHINT
CCS FLAGWRD2 # PREREAD T3RUPT MAY COINCIDE
TCF ENDOFJOB
TCF ENDOFJOB
TCF +1
CA TIME1 # (CS) X 2(+14)
XCH 1/PIPADT # PREVIOUS TIME
RELINT
COM
AD 1/PIPADT
NBD2 CCS A # CALCULATE ELAPSED TIME.
AD ONE # NO TIME1 OVERFLOW
TCF NBD3 # RESTORE TIME DIFFERENCE AND JUMP
TCF +2 # TIME1 OVERFLOW
TCF ENDOFJOB # IF ELAPSED TIME = 0 (DIFFERENCE = -0)
COM # CALCULATE ABSOLUTE DIFFERENCE
AD POSMAX
NBD3 EXTEND # C(A) = DELTAT (CS) X 2(+14)
MP BIT10 # SHIFT RIGHT 5
DXCH VBUF
EXTEND
DCA VBUF
DXCH MPAC # DELTAT NOW SCALED (CS) X 2(+19)
CAF ZERO
TS GCOMPSW # INDICATE COMMANDS 2 PULSES OR LESS.
TS BUF # INDEX X, Y, Z.
CS NBDX # (GYRO PULSES)/(CS) X 2(-5)
TC FBIASSUB # -(NBOX)(DELTAT) (GYRO PULSES) X 2(+14)
EXTEND
DCS VBUF
DXCH MPAC # DELTAT SCALED (CS) X 2(+19)
CA NBDY # (GYRO PULSES)/(CS) X 2(-5)
TC FBIASSUB # -(NBDY)(DELTAT) (GYRO PULSES) X 2(+14)
EXTEND
DCS VBUF
DXCH MPAC # DELTAT SCALED (CS) X 2(+19)
CS NBDZ # (GYRO PULSES)/(CS) X 2(-5)
TC FBIASSUB # +(NBDZ)(DELTAT) (GYRO PULSES) X 2(+14)
# Page 305
CCS GCOMPSW # ARE GYRO COMMANDS GREATER THAN 2 PULSES
TCF 1/GYRO # YES
TCF ENDOFJOB # NO
# Page 303
FBIASSUB XCH Q
TS BUF +1
CA Q # NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
EXTEND
MP MPAC # DELTAT SCALED (CS) X 2(+19)
INDEX BUF
DAS GCOMP # HI(NBD)(DELTAT) (GYRO PULSES) X 2(+14)
CA Q # NO FRACTIONAL PART
EXTEND
MP MPAC +1
TS L
CAF ZERO
INDEX BUF
DAS GCOMP # (NBD)(DELTAT) (GYRO PULSES) X 2(+14)
TCF DRFTSUB2 # CHECK MAGNITUDE OF COMPENSATION
LASTBIAS TC BANKCALL
CADR PIPUSE
CCS GCOMPSW # BYPASS IF GCOMPSW NEGATIVE
TCF +3
TCF +2
TCF ENDOFJOB
CAF PRIO31 # 2 SECONDS SCALED (CS) X 2(+8)
XCH 1/PIPADT
COM
AD PIPTIME1 +1 # TIME AT PIPA1 =0
TCF NBD2

File diff suppressed because it is too large Load Diff

362
IMU_PERFORMANCE_TESTS_4.s Normal file
View File

@ -0,0 +1,362 @@
# Copyright: Public domain.
# Filename: IMU_PERFORMANCE_TESTS_4.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 382-389
# Mod history: 2009-05-17 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 382
# PROGRAM -- IMU PERFORMANCE TESTS 4
# DATE -- NOV 15, 1966
# BY -- GEORGE SCHMIDT IL7-146 EXT 1126
# MOD NO-ZERO
#
# FUNCITONAL DESCRIPTION
#
# THIS SECTION CONSISTS OF THE FILTER FOR THE GYRO DRIFT TESTS. NO COMPASS
# IS DONE IN LEM. FOR A DESCRIPTION OF THE FILTER SEE E-1973. THIS
# SECTION IS ENTERED FROM IMU 2. IT RETURNS THERE AT END OF TEST.
#
# EARTHR,OGC ZERO,ERTHRVSE
#
# NORMAL EXIT
#
# LENGTHOT GOES TO ZERO -- RETURN TO IMU PERF TESTS 2 CONTROL
#
# ALARMS
#
# 1600 OVERFLOW IN DRIFT TEST
# 1601 BAD IMU MODING IN ANY ROUTINE THAT USES IMUSTALL
# OUTPUT
#
# FLASHING DISPLAY OF RESULTS -- CONTROLLED IN IMU PERF TESTS 2
#
# DEBRIS
#
# ALL CENTRALS -- ALL OF EBANK XSM
# Page 383
BANK 33
SETLOC IMU4
BANK
COUNT* $$/P07
EBANK= XSM
ESTIMS INHINT
CAE 1SECXT
TC TWIDDLE
EBANK= XSM
ADRES ALLOOP
CAF ZERO # ZERO THE PIPAS
TS PIPAX
TS PIPAY
TS PIPAZ
RELINT
CA 77DECML
TS ZERONDX
CA ALXXXZ
TC ZEROING
TC INTPRET
SLOAD
SCHZEROS
STOVL GCOMPSW -1
INTVAL +2
STOVL ALX1S
SCHZEROS
STORE DELVX
STORE GCOMP
SLOAD
TORQNDX
DCOMP BMN
VERTSKIP
CALL
ERTHRVSE
VERTSKIP EXIT
TC SLEEPIE +1
# Page 384
ALLOOP CA OVFLOWCK
EXTEND
BZF +2
TC TASKOVER
CCS ALTIM
CA A # SHOULD NEVER HIT THIS LOCATION
TS ALTIMS
CS A
TS ALTIM
CS ONE
AD GEOCOMPS
EXTEND
BZF +4
CA LENGTHOT
EXTEND
BZMF +5
CAE 1SECXT
TC TWIDDLE
EBANK= XSM
ADRES ALLOOP
CAF ZERO
XCH PIPAX
TS DELVX
CAF ZERO
XCH PIPAY
TS DELVY
CAF ZERO
XCH PIPAZ
TS DELVZ
SPECSTS CAF PRIO20
TC FINDVAC
EBANK= XSM
2CADR ALFLT # START THE JOB
TC TASKOVER
# Page 385
ALFLT CCS GEOCOMPS
TC +2
TC NORMLOP
TC BANKCALL
CADR 1/PIPA
NORMLOP TC INTPRET
DLOAD
INTVAL
STOVL S1
DELVX
VXM VSL1
XSM
DLOAD DCOMP
MPAC +3
STODL DPIPAY
MPAC +5
STORE DPIPAZ
SETPD AXT,1
0
8D
SLOAD DCOMP
GEOCOMPS
BMN
PERFERAS
ALCGKK SLOAD BMN
ALTIMS
ALFLT3
ALKCG AXT,2 LXA,1 # LOADS SLOPES AND TIME CONSTANTS AT RQST
12D
ALX1S
ALKCG2 DLOAD* INCR,1
ALFDK +144D,1
DEC -2
STORE ALDK +10D,2
TIX,2 SXA,1
ALKCG2
ALX1S
ALFLT3 AXT,1
8D
DELMLP DLOAD* DMP
DPIPAY +8D,1
PIPASC
SLR BDSU*
9D
INTY +8D,1
STORE INTY +8D,1
PDDL DMP*
VELSC
# Page 386
VLAUN +8D,1
SL2R
DSU STADR
STORE DELM +8D,1
STORE DELM +10D,1
TIX,1 AXT,2
DELMLP
4
ALILP DLOAD* DMPR*
ALK +4,2
ALDK +4,2
STORE ALK +4,2
TIX,2 AXT,2
ALILP
8D
ALKLP LXC,1 SXA,1
CMPX1
CMPX1
DLOAD* DMPR*
ALK +1,1
DELM +8D,2
DAD*
INTY +8D,2
STORE INTY +8D,2
DLOAD* DAD*
ALK +12D,2
ALDK +12D,2
STORE ALK +12D,2
DMPR* DAD*
DELM +8D,2
INTY +16D,2
STORE INTY +16D,2
DLOAD* DMP*
ALSK +1,1
DELM +8D,2
SL1R DAD*
VLAUN +8D,2
STORE VLAUN +8D,2
TIX,2 AXT,1
ALKLP
8D
LOOSE DLOAD* PDDL*
ACCWD +8D,1
VLAUN +8D,1
PDDL* VDEF
POSNV +8D,1
MXV VSL1
TRANSM1
# Page 387
DLOAD
MPAC
STORE POSNV +8D,1
DLOAD
MPAC +3
STORE VLAUN +8D,1
DLOAD
MPAC +5
STORE ACCWD +8D,1
TIX,1
LOOSE
AXT,2 AXT,1 # EVALUATE SINES AND COSINES
6
2
BOOP DLOAD* DMPR
ANGX +2,1
GEORGEJ
SR2R
PUSH SIN
SL3R XAD,1
X1
STORE 16D,2
DLOAD
COS
STORE 22D,2 # COSINES
TIX,2
BOOP
PERFERAS EXIT
CA EBANK7
TS EBANK
EBANK= ATIGINC
TC ATIGINC # GOTO ERASABLE TO CALCULATE ONLY TO RETN
# CAUTION
#
# THE ERASABLE PROGRAM THAT DOES THE CALCULATIONS MUST BE LOADED
# BEFORE ANY ATTEMPT IS MAKE TO RUN THE IMU PERFORMANCE TEST
EBANK= AZIMUTH
CCS LENGTHOT
TC SLEEPIE
CCS TORQNDX
TCF +2
TC SETUPER1
CA CDUX
TS LOSVEC +1 # FOR TROUBLESHOOTING VD POSNS 2$4
# Page 388
SETUPER1 TC INTPRET
DLOAD PDDL # ANGLES FROM DRIFT TEST ONLY
ANGZ
ANGY
PDDL VDEF
ANGX
VCOMP VXSC
GEORGEJ
MXV VSR1
XSM
STORE OGC
EXIT
CA OGCPL
TC BANKCALL
CADR IMUPULSE
TC IMUSLLLG
GEOSTRT4 CCS TORQNDX # ONLY POSITIVE IF IN VERTICAL DRIFT TEST
TC VALMIS
TC INTPRET
CALL
ERTHRVSE
EXIT
TC TORQUE
SLEEPIE TS LENGTHOT # TEST NOT OVER-DECREMENT LENGTHOT
CCS TORQNDX # ARE WE DOING VERTDRIFT
TC EARTHR*
TC ENDOFJOB
SOMEERRR CA EBANK5
TS EBANK
CA ONE
TS OVFLOWCK # STOP ALLOOP FROM CALLING ITSELF
TC ALARM
OCT 1600
TC ENDTEST1
SOMERR2 CAF OCT1601
TC VARALARM
TC DOWNFLAG
ADRES IMUSE
TC ENDOFJOB
OCT1601 OCT 01601
DEC585 OCT 06200 # 3200 B+14 ORDER IS IMPORTANT
SCHZEROS 2DEC .00000000
# Page 389
2DEC .00000000
OCT 00000
ONEDPP OCT 00000 # ORDER IS IMPORTANT
OCT 00001
INTVAL OCT 4
OCT 2
DEC 144
DEC -1
SOUPLY 2DEC .93505870 # INITIAL GAINS FOR PIP OUTPUTS
2DEC .26266423 # INITIAL GAINS/4 FOR ERECTION ANGLES
77DECML DEC 77
ALXXXZ GENADR ALX1S -1
PIPASC 2DEC .13055869
VELSC 2DEC -.52223476 # 512/980.402
ALSK 2DEC .17329931 # SSWAY VEL GAIN X 980.402/4096
2DEC -.00835370 # SSWAY ACCEL GAIN X 980.402/4096
GEORGEJ 2DEC .63661977
GEORGEK 2DEC .59737013

421
IMU_PERFORMANCE_TEST_2.s Normal file
View File

@ -0,0 +1,421 @@
# Copyright: Public domain.
# Filename: IMU_PERFORMANCE_TEST_2.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 373-381
# Mod history: 2009-05-17 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 373
# NAME -- IMU PERFORMANCE TESTS 2
#
# DATE -- MARCH 20, 1967
#
# BY -- SYSTEM TEST GROUP 864-6900 EXT. 1274
#
# MODNO. -- ZERO
#
# FUNCTIONAL DESCRIPTION
#
# POSITIONING ROUTINES FOR THE IMU PERFORMANCE TESTS AS WELL AS SOME OF
# THE TESTS THEMSELVES. FOR A DESCRIPTION OF THESE SUBROUTINES AND THE
# OPERATING PROCEDURES (TYPICALLY) SEE STG MEMO 685. THEORETICAL REF. E-1973
BANK 33
SETLOC IMU2
BANK
EBANK= POSITON
COUNT* $$/P07
REDO TC NEWMODEX
MM 07
GEOIMUTT TC IMUZERR
IMUBACK CA ZERO
TS NDXCTR
TS TORQNDX
TS TORQNDX +1
TS OVFLOWCK
NBPOSPL CA DEC17
TS ZERONDX
CA XNBADR
TC ZEROING
CA HALF
TS XNB
GUESS TC INTPRET
LATAZCHK DLOAD SL2
LATITUDE
STODL DSPTEM1 +1
AZIMUTH
RTB EXIT
1STO2S
XCH MPAC
TS DSPTEM1
CAF VN0641
TC BANKCALL
CADR GOFLASH
TC ENDTEST1
TC +2
TC -5
# Page 374
TC INTPRET
SLOAD RTB
DSPTEM1
CDULOGIC
STORE AZIMUTH
SLOAD SR2
DSPTEM1 +1
STORE LATITUDE
COS DCOMP
SL1
STODL WANGI
LATITUDE
SIN SL1
STODL WANGO
AZIMUTH
PUSH SIN
STORE YNB +2
STODL ZNB +4
COS
STORE YNB +4
DCOMP
POSGMBL STCALL ZNB +2
CALCGA
EXIT
TC BANKCALL
CADR IMUCOARS
CAF BIT14 # IF BIT14 SET, GIMBAL LOCK
MASK FLAGWRD3
EXTEND
BZF +2
INCR NDXCTR # +1 IF IN GIMBAL LOCK, OTHERWISE 0
TC DOWNFLAG
ADRES GLOKFAIL # RESET GIMBAL LOCK FLAG
TC IMUSLLLG
CCS NDXCTR # IF ONE GO AND DO A PIPA TEST ONLY
TC PIPACHK # ALIGN AND MEASURE VERTICAL PIPA RATE
TC FINIMUDD
EXTEND
DCA PERFDLAY
TC LONGCALL # DELAY WHILE SUSPENSION STABILIZES
EBANK= POSITON
2CADR GOESTIMS
CA ESTICADR
TC JOBSLEEP
GOESTIMS CA ESTICADR
TC JOBWAKE
TC TASKOVER
ESTICADR CADR ESTIMS
TORQUE CA ZERO
# Page 375
TS DSPTEM2
CA DRIFTI
TS DSPTEM2 +1
INDEX POSITON
TS SOUTHDR -1
TC SHOW
PIPACHK INDEX NDXCTR # PIPA TEST
TC +1
TC EARTHR*
CA DEC17 # ALLOW PIP COUNTER TO OVERFLOW 17 TIMES
TS DATAPL +4 # IN THE ALLOTTED TIME INTERVAL
CA DEC58
TS LENGTHOT
CA ONE
TS RESULTCT
CA ZERO
INDEX PIPINDEX
TS PIPAX
TS DATAPL
TC CHECKG
INHINT
CAF TWO
TC TWIDDLE
EBANK= XSM
ADRES PIPATASK
TC ENDOFJOB
PIPATASK EXTEND
DIM LENGTHOT
CA LENGTHOT
EXTEND
BZMF STARTPIP
CAF BIT10
TC TWIDDLE
EBANK= XSM
ADRES PIPATASK
STARTPIP CAF PRIO20
TC FINDVAC
EBANK= XSM
2CADR PIPJOBB
TC TASKOVER
PIPJOBB INDEX NDXCTR
TC +1
TC EARTHR*
CA LENGTHOT
# Page 376
EXTEND
BZMF +2
TC ENDOFJOB
CA FIVE
TS RESULTCT
TC CHECKG
CCS DATAPL +1
TC +4
TC CCSHOLE
CS DATAPL +4
TS DATAPL +4
EXTEND
DCS DATAPL
DAS DATAPL +4
TC INTPRET
DLOAD DSU
DATAPL +6
DATAPL +2
BPL CALL
AINGOTN
OVERFFIX
AINGOTN PDDL DDV
DATAPL +4
DMPR RTB
DEC585 # DEC585 HAS BEEN REDEFINED FOR LEM
SGNAGREE
STORE DSPTEM2
EXIT
CCS NDXCTR
TC COAALIGN # TAKE PLATFORM OUT OF GIMBAL LOCK
TC SHOW
VERTDRFT CA 3990DEC # ABOUT 1 HOUR VERTICAL DRIFT TEST
TS LENGTHOT
INDEX POSITON
CS SOUTHDR -2
TS DRIFTT
CCS PIPINDEX # OFFSET PLATFORM TO MISS PIP DEAD-ZONES
TCF PON4 # Z-UP IN POS 4
PON2 CS BIT5 # X-UP
ADS ERCOMP +2
CA BIT5
ADS ERCOMP +4
TCF PON
PON4 CS BIT5
ADS ERCOMP +2
CA BIT5
ADS ERCOMP
PON TC EARTHR*
# Page 377
CA ZERO # ALLOW ONLY SOUTH GYRO EARTH RATE COMPENS
TS ERVECTOR
TS ERVECTOR +1
GUESS1 CAF POSMAX
TS TORQNDX
TS TORQNDX +1
CA CDUX
TS LOSVEC
TC ESTIMS
VALMIS CA DRIFTO
TS DSPTEM2 +1
CA ZERO
TS DSPTEM2
TC SHOW
ENDTEST1 TC DOWNFLAG
ADRES IMUSE
CS ZERO
TC NEWMODEA
TC ENDEXT
# Page 378
OVERFFIX DAD DAD
DPPOSMAX
ONEDPP
RVQ
COAALIGN EXTEND # COARSE ALIGN SUBROUTINE
QXCH ZERONDX
CA ZERO
TS THETAD
TS THETAD +1
TS THETAD +2
TC BANKCALL
CADR IMUCOARS
ALIGNCOA TC BANKCALL
CADR IMUSTALL
TC SOMERR2
TC ZERONDX
IMUSLLLG EXTEND
QXCH ZERONDX
TC ALIGNCOA
FINIMUDD EXTEND
QXCH ZERONDX
TC BANKCALL
CADR IMUFINE
TC ALIGNCOA
IMUZERR EXTEND
QXCH ZERONDX
TC BANKCALL
CADR IMUZERO
TC ALIGNCOA
CHECKG EXTEND # PIP PULSE CATCHING ROUTINE
QXCH QPLACE
TC +6
CHECKG1 RELINT
CA NEWJOB
EXTEND
BZMF +6
TC CHANG1
INHINT
INDEX PIPINDEX
CS PIPAX
TS ZERONDX
INHINT
# Page 379
INDEX PIPINDEX
CA PIPAX
AD ZERONDX
EXTEND
BZF CHECKG1
INDEX PIPINDEX
CA PIPAX
INDEX RESULTCT
TS DATAPL
TC FINETIME
INDEX RESULTCT
TS DATAPL +1
INDEX RESULTCT
LXCH DATAPL +2
RELINT
ENDCHKG TC QPLACE
ZEROING TS L
TCF +2
ZEROING1 TS ZERONDX
CAF ZERO
INDEX L
TS 0
INCR L
CCS ZERONDX
TCF ZEROING1
TC Q
# Page 380
ERTHRVSE DLOAD PDDL
SCHZEROS # PD24 = (SIN -COS 0)(OMEG/MS)
LATITUDE
COS DCOMP
PDDL SIN
LATITUDE
VDEF VXSC
OMEG/MS
STORE ERVECTOR
RTB
LOADTIME
STOVL TMARK
SCHZEROS
STORE ERCOMP
RVQ
EARTHR ITA RTB
S2
LOADTIME
STORE TEMPTIME
DSU BPL
TMARK
ERTHR
CALL
OVERFFIX
ERTHR SL VXSC
9D
ERVECTOR
MXV VAD
XSM
ERCOMP
STODL ERCOMP
TEMPTIME
STORE TMARK
AXT,1 RTB
ECADR ERCOMP
PULSEIMU
GOTO
S2
EARTHR* EXTEND
QXCH QPLACES
TC INTPRET
CALL
EARTHR
EXIT
TC IMUSLLLG
TC QPLACES
SHOW EXTEND
# Page 381
QXCH QPLACE
SHOW1 CA POSITON
TS DSPTEM2 +2
CA VB06N98
TC BANKCALL
CADR GOFLASH
TC ENDTEST1 # V34
TC QPLACE # V33
TCF SHOW1
3990DEC DEC 3990
VB06N98 VN 0698
VN0641 VN 0641
DEC17 = ND1
DEC58 DEC 58
OGCPL ECADR OGC
1SECX = 1SEC
XNBADR GENADR XNB
XSMADR GENADR XSM
BLOCK 2
COUNT* $$/P07
FINETIME INHINT # RETURNS WITH INTERRUPT INHIBITED
EXTEND
READ LOSCALAR
TS L
EXTEND
RXOR LOSCALAR
EXTEND
BZF +4
EXTEND
READ LOSCALAR
TS L
+4 CS POSMAX
AD L
EXTEND
BZF FINETIME +1
EXTEND
READ HISCALAR
TC Q

View File

@ -0,0 +1,304 @@
# Copyright: Public domain.
# Filename: INFLIGHT_ALIGNMENT_ROUTINES.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1355-1364
# Mod history: 2009-05-14 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1355
BANK 22
SETLOC INFLIGHT
BANK
EBANK= XSM
# CALCGTA COMPUTES THE GYRO TORQUE ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
#
# THE INPUT IS THE DESIRED STABLE MEMBER COORDINATES REFERRED TO PRESENT STABLE MEMBER COORDINATES. THE THREE
# HALF-UNIT VECTORS ARE STORED AT XDC, YDC, AND ZDC.
#
# THE OUTPUTS ARE THE THREE GYRO TORQUE ANGLES TO BE APPLIED TO THE Y, Z, AND X GYROS AND ARE STORED DP AT IGC,
# MGC, AND OGC RESPECTIVELY.
COUNT 23/INFLT
CALCGTA ITA DLOAD # PUSHDOWN 00-03, 16D-27D, 34D-37D
S2 # XDC = (XD1 XD2 XD3)
XDC # YDC = (YD1 YD2 YD3)
PDDL PDDL # ZDC = (ZD1 ZD2 ZD3)
HI6ZEROS
XDC +4
DCOMP VDEF
UNIT
STODL ZPRIME # ZP = UNIT(-XD3 0 XD1) = (ZP1 ZP2 ZP3)
ZPRIME
SR1
STODL SINTH # SIN(IGC) = ZP1
ZPRIME +4
SR1
STCALL COSTH # COS(IGC) = ZP3
ARCTRIG
STODL IGC # Y GYRO TORQUING ANGLE FRACTION OF REV.
XDC +2
SR1
STODL SINTH # SIN(MGC) = XD2
ZPRIME
DMP PDDL
XDC +4 # PD00 = (ZP1)(XD3)
ZPRIME +4
DMP DSU
XDC # MPAC = (ZP3)(XD1)
STADR
STCALL COSTH # COS(MGC) = MPAC - PD00
ARCTRIG
# Page 1356
STOVL MGC # Z GYRO TORQUING ANGLE FRACTION OF REV.
ZPRIME
DOT
ZDC
STOVL COSTH # COS(OGC) = ZP . ZDC
ZPRIME
DOT
YDC
STCALL SINTH # SIN(OGC) = ZP . YDC
ARCTRIG
STCALL OGC # X GYRO TORQUING ANGLE FRACTION OF REV.
S2
# Page 1357
# ARCTRIG COMPUTES AN ANGLE GIVEN THE SINE AND COSINE OF THIS ANGLE.
#
# THE INPUTS ARE SIN/4 AND COS/4 STORED DP AT SINTH AND COSTH.
#
# THE OUTPUT IS THE CALCULATED ANGLE BETWEEN +.5 AND -.5 REVOLUTIONS AND STORED AT THETA. THE OUTPUT IS ALSO
# AVAILABLE AT MPAC.
ARCTRIG DLOAD ABS # PUSHDOWN 16D-21D
SINTH
DSU BMN
QTSN45 # ABS(SIN/4) - SIN(45)/4
TRIG1 # IF (-45,45) OR (135,-135)
DLOAD SL1 # (45,135) OR (-135,-45)
COSTH
ACOS SIGN
SINTH
STORE THETA # X = ARCCOS(COS) WITH SIGN(SIN)
RVQ
TRIG1 DLOAD SL1 # (-45,45) OR (135,-135)
SINTH
ASIN
STODL THETA # X = ARCSIN(SIN) WITH SIGN(SIN)
COSTH
BMN
TRIG2 # IF (135,-135)
DLOAD RVQ
THETA # X = ARCSIN(SIN) (-45,45)
TRIG2 DLOAD SIGN # (135,-135)
HIDPHALF
SINTH
DSU
THETA
STORE THETA # X = .5 WITH SIGN(SIN) - ARCSIN(SIN)
RVQ # (+) - (+) OR (-) - (-)
# Page 1358
# SMNB, NBSM, AND AXISROT, WHICH USED TO APPEAR HERE, HAVE BEEN
# COMBINED IN A ROUTINE CALLED AX*SR*T, WHICH APPEARS AMONG THE POWERED
# FLIGHT SUBROUTINES.
# Page 1359
# CALCGA COMPUTES THE CDU DRIVING ANGLES REQUIRED TO BRING THE STABLE MEMBER INTO THE DESIRED ORIENTATION.
#
# THE INPUTS ARE 1) THE NAVIGATION BASE COORDINATES REFERRED TO ANY COORDINATE SYSTEM. THE THREE HALF-UNIT
# VECTORS ARE STORED AT XNB, YNB, AND ZNB. 2) THE DESIRED STABLE MEMBER COORDINATES REFERRED TO THE SAME
# COORDINATE SYSTEM ARE STORED AT XSM, YSM, AND ZSM.
#
# THE OUTPUTS ARE THE THREE CDU DRIVING ANGLES AND ARE STORED SP AT THETAD, THETAD +1, AND THETAD +2.
CALCGA SETPD # PUSHDOWN 00-05, 16D-21D, 34D-37D
0
VLOAD VXV
XNB # XNB = OGA (OUTER GIMBAL AXIS)
YSM # YSM = IGA (INNER GIMBAL AXIS)
UNIT PUSH # PD0 = UNIT(OGA X IGA) = MGA
DOT ITA
ZNB
S2
STOVL COSTH # COS(OG) = MGA . ZNB
0
DOT
YNB
STCALL SINTH # SIN(OG) = MGA . YNB
ARCTRIG
STOVL OGC
0
VXV DOT # PROVISION FOR MG ANGLE OF 90 DEGREES
XNB
YSM
SL1
STOVL COSTH # COS(MG) = IGA . (MGA X OGA)
YSM
DOT
XNB
STCALL SINTH # SIN(MG) = IGA . OGA
ARCTRIG
STORE MGC
ABS DSU
.166...
BPL
GIMLOCK1 # IF ANGLE GREATER THAN 60 DEGREES
CALCGA1 VLOAD DOT
ZSM
0
STOVL COSTH # COS(IG) = ZSM . MGA
XSM
# Page 1360
DOT STADR
STCALL SINTH # SIN(IG) = XSM . MGA
ARCTRIG
STOVL IGC
OGC
RTB BONCLR
V1STO2S
CPHIFLAG
S2
STCALL THETAD
S2
GIMLOCK1 EXIT
TC ALARM
OCT 00401
TC UPFLAG # GIMBAL LOCK HAS OCCURRED
ADRES GLOKFAIL
TC INTPRET
GOTO
CALCGA1
# Page 1361
# AXISGEN COMPUTES THE COORDINATES OF ONE COORDINATE SYSTEM REFERRED TO ANOTHER COORDINATE SYSTEM.
#
# THE INPUTS ARE 1) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM A STORED AT STARAD. 2) THE STAR2 VECTOR
# REFERRED TO COORDINATE SYSTEM A STORED AT STARAD +6. 3) THE STAR1 VECTOR REFERRED TO COORDINATE SYSTEM B STORED
# AT LOCATION 6 OF THE VAC AREA. 4) THE STAR2 VECTOR REFERRED TO COORDINATE SYSTEM B STORED AT LOCATION 12D OF
# THE VAC AREA.
#
# THE OUTPUT DEFINES COORDINATE SYSTEM A REFERRED TO COORDINATE SYSTEM B. THE THREE HALF-UNIT VECTORS ARE STORED
# AT LOCATIONS XDC, XDC +6, XDC +12D, AND STARAD, STARAD +6, STARAD +12D.
AXISGEN AXT,1 SSP # PUSHDOWN 00-30D, 34D-37D
STARAD +6
S1
STARAD -6
SETPD
0
AXISGEN1 VLOAD* VXV* # 06D UA = S1
STARAD +12D,1 # STARAD +00D UB = S1
STARAD +18D,1
UNIT # 12D VA = UNIT(S1 X S2)
STORE STARAD +18D,1 # STARAD +06D VB = UNIT(S1 X S2)
VLOAD*
STARAD +12D,1
VXV* VSL1
STARAD +18D,1 # 18D WA = UA X VA
STORE STARAD +24D,1 # STARAD +12D WB = UB X VB
TIX,1
AXISGEN1
AXC,1 SXA,1
6
30D
AXT,1 SSP
18D
S1
6
AXT,2 SSP
6
S2
2
AXISGEN2 XCHX,1 VLOAD*
30D # X1=-6 X2=+6 X1=-6 X2=+4 X1=-6 X2=+2
0,1
# Page 1362
VXSC* PDVL* # J=(UA)(UB1) J=(UA)(UB2) J=(UA)(UB3)
STARAD +6,2
6,1
VXSC*
STARAD +12D,2
STOVL* 24D # K=(VA)(VB1) J=(VA)(VB2) J=(VA)(VB3)
12D,1
VXSC* VAD
STARAD +18D,2 # L=(WA)(WB1) J=(WA)(WB2) J=(WA)(WB3)
VAD VSL1
24D
XCHX,1 UNIT
30D
STORE XDC +18D,1 # XDC = L+J+K YDC = L+J+K ZDC = L+J+K
TIX,1
AXISGEN3
AXISGEN3 TIX,2
AXISGEN2
VLOAD
XDC
STOVL STARAD
YDC
STOVL STARAD +6
ZDC
STORE STARAD +12D
RVQ
# Page 1363
QTSN45 2DEC .1768
.166... 2DEC .1666666667
# Page 1364 (empty page)

View File

@ -0,0 +1,224 @@
# Copyright: Public domain.
# Filename: INPUT_OUTPUT_CHANNEL_BIT_DESCRIPTIONS.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Onno Hommes <ohommes@cmu.edu>.
# Website: www.ibiblio.org/apollo.
# Pages: 0054-0060
# Mod history: 2009-05-14 OH Transcribed from page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 54
# *** CHANNEL DESCRIPTION WORDS ARE ALLOCATED IN ERASABLE ASSIGNMENTS ***
# CHANNEL 1 IDENTICAL TO COMPUTER REGISTER L (0001)
# CHANNEL 2 IDENTICAL TO COMPUTER REGISTER Q (0002)
# CHANNEL 3 HISCALAR: INPUT CHANNEL; MOST SIGNIFICANT 14 BITS FROM 33 STAGE BINARY COUNTER. SCALE
# FACTOR IS B23 IN CSEC, SO MAX VALUE ABOUT 23.3 HOURS AND LEAST SIGNIFICANT BIT 5.12 SECS.
# CHANNEL 4 LOSCALAR: INPUT CHANNEL; NEXT MOST SIGNIFICANT 14 BITS FROM THE 33 STAGE BINARY COUNTER
# ASSOCIATED WITH CHANNEL 3. SCALE FACTOR IS B9 IN CSEC. SO MAX VAL IS 5.12 SEC AND LEAST
# SIGNIFICANT BIT IS 1/3200 SEC. SCALE FACTOR OF D.P. WORD WITH CHANNEL 3 IS B23 CSEC.
# CHANNEL 5 PYJETS: OUTPUT CHANNEL; PITCH RCS JET CONTROL. (REACTION CONTROL SYSTEM) USES BITS 1-8.
# CHANNEL 6 ROLLJETS: OUTPUT CHANNEL; ROLL RCS JET CONTROL. (REACTION CONTROL SYSTEM) USES BIT 1-8.
# CHANNEL 7 SUPERBNK: OUTPUT CHANNEL; NOT RESET BY RESTART; FIXED EXTENSION BITS USED TO SELECT THE
# APPROPRIATE FIXED MEMORY BANK IF FBANK IS 30 OCTAL OR MORE. USES BITS 5-7.
# CHANNEL 10 OUT0: OUTPUT CHANNEL; REGISTER USED TO TRANSMIT LATCHING-RELAY DRIVING INFORMATION FOR
# THE DISPLAY SYSTEM. BITS 15-12 ARE SET TO THE ROW NUMBER (1-14 OCTAL) OF THE RELAY TO BE
# CHANGED AND BITS 11-1 CONTAIN THE REQUIRED SETTINGS FOR THE RELAYS IN THE ROW.
# CHANNEL 11 DSALMOUT: OUTPUT CHANNEL; REGISTER WHOSE BITS ARE USED FOR ENGINE ON-OFF CONTROL AND TO
# DRIVE INDIVIDUAL INDICATORS OF THE DISPLAY SYSTEM. BITS 1-7 ARE A RELAYS.
#
# BIT 1 ISS WARNING
# BIT 2 LIGHT COMPUTER ACTIVITY LAMP
# BIT 3 LIGHT UPLINK ACTIVITY LAMP
# BIT 4 LIGHT TEMP CAUTION LAMP
# BIT 5 LIGHT KEYBOARD RELEASE LAMP
# BIT 6 FLASH VERB AND NOUN LAMPS
# BIT 7 LIGHT OPERATOR ERROR LAMP
# Page 55
# BIT 8 SPARE
# BIT 9 TEST CONNECTOR OUTBIT
# BIT 10 CAUTION RESET
# BIT 11 SPARE
# BIT 12 SPARE
# BIT 13 ENGINE ON
# BIT 14 ENGINE OFF
# BIT 15 SPARE
# CHANNEL 12 CHAN12: OUTPUT CHANNEL; BITS USED TO DRIVE NAVIGATION AND SPACECRAFT HARDWARE.
#
# BIT 1 ZERO RR CDU; CDU'S GIVE RRADAR INFORMATION FOR LM
# BIT 2 ENABLE CDU RADAR ERROR COUNTERS
# BIT 3 NOT USED
# BIT 4 COARSE ALIGN ENABLE OF IMU
# BIT 5 ZERO IMU CDU'S
# BIT 6 ENABLE IMU ERROR COUNTER, CDU ERROR COUNTER.
# BIT 7 SPARE
# BIT 8 DISPLAY INERTIAL DATA
# BIT 9 -PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
# BIT 10 +PITCH GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
# BIT 11 -ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
# BIT 12 +ROLL GIMBAL TRIM (BELL MOTION) DESCENT ENGINE
# BIT 13 LR POSITION 2 COMMAND
# BIT 14 ENABLE RENDEZVOUS RADAR LOCK-ON; AUTO ANGLE TRACK'G
# BIT 15 ISS TURN ON DELAY COMPLETE
# Page 56
# CHANNEL 13 CHAN13: OUTPUT CHANNEL.
#
# BIT 1 RADAR C PROPER SETTING OF THE A,B,C MATRIX
# BIT 2 RADAR B SELECTS CERTAIN RADAR
# BIT 3 RADAR A PARAMETERS TO BE READ.
# BIT 4 RADAR ACTIVITY
# BIT 5 NOT USED (CONNECTS AN ALTERNATE INPUT TO UPLINK)
# BIT 6 BLOCK INPUTS TO UPLINK CELL
# BIT 7 DOWNLINK TELEMETRY WORD ORDER CODE BIT
# BIT 8 RHC COUNTER ENABLE (READ HAND CONTROLLER ANGLES)
# BIT 9 START RHC READ INTO COUNTERS IS BIT 8 SET
# BIT 10 TEST ALARMS, TEST DSKY LIGHTS
# BIT 11 ENABLE STANDBY
# BIT 12 RESET TRAP 31-A ALWAYS APPEAR TO BE SET TO 0
# BIT 13 RESET TRAP 31-B ALWAYS APPEAR TO BE SET TO 0
# BIT 14 RESET TRAP 32 ALWAYS APPEAR TO BE SET TO 0
# BIT 15 ENABLE T6 RUPT
# CHANNEL 14 CHAN14: OUTPUT CHANNEL; USED TO CONTROL COMPUTER COUNTER CELLS (CDU, GYRO, SPACECRAFT FUNC).
#
# BIT 1 OUTLINK ACTIVITY (NOT USED)
# BIT 2 ALTITUDE RATE OR ALTITUDE SELECTOR
# BIT 3 ALTITUDE METER ACTIVITY
# BIT 4 THRUST DRIVE ACTIVITY FOR DESCENT ENGINE
# BIT 5 SPARE
# BIT 6 GYRO ENABLE POWER FOR PULSES
# BIT 7 GYRO SELECT B PAIR OF BITS IDENTIFIES AXIS OF
# BIT 8 GYRO SELECT A GYRO SYSTEM TO BE TORQUED.
# BIT 9 GYRO TORQUING COMMAND IN NEGATIVE DIRECTION.
# Page 57
# BIT 10 GYRO ACTIVITY
# BIT 11 DRIVE CDU S
# BIT 12 DRIVE CDU T
# BIT 13 DRIVE CDU Z
# BIT 14 DRIVE CDU Y
# BIT 15 DRIVE CDU X
# CHANNEL 15 MNKEYIN: INPUT CHANNEL; KEY CODE INPUT FROM KEYBOARD OF DSKY, SENSED BY PROGRAM WHEN
# PROGRAM INTERRUPT #5 IS RECEIVED. USED BITS 5-1
# CHANNEL 16 NAVKEYIN: INPUT CHANNEL; OPTICS MARK INFORMATION AND NAVIGATION PANEL DSKY (CM) OR THRUST
# CONTROL (LM) SENSED BY PROGRAM THEN PROGRAM INTERRUPT #6 IS RECEIVED. USES BITS 3-7 ONLY.
#
# BIT 1 NOT ASSIGNED
# BIT 2 NOT ASSIGNED
# BIT 3 OPTICS X-AXIS MARK SIGNAL FOR ALIGN OPTICAL TSCOPE
# BIT 4 OPTICS Y-AXIS MARK SIGNAL FOR AOT
# BIT 5 OPTICS MARK REJECT SIGNAL
# BIT 6 DESCENT+ ; CREW DESIRED SLOWING RATE OF DESCENT
# BIT 7 DESCENT- ; CREW DESIRED SPEEDING UP RATE OF D'CENT
# NOTE: ALL BITS IN CHANNELS 30-33 ARE INVERTED AS SENSED BY THE PROGRAM, SO THAT A VALUE OF ZERO MEANS
# THAT THE INDICATED SIGNAL IS PRESENT.
# CHANNEL 30 INPUT CHANNEL
#
# BIT 1 ABORT WITH DESCENT STAGE
# BIT 2 UNUSED
# BIT 3 ENGINE ARMED SIGNAL
# BIT 4 ABORT WITH ASCENT ENGINE STAGE
# BIT 5 AUTO THROTTLE; COMPUTER CONTROL OF DESCENT ENGINE
# Page 58
# BIT 6 DISPLAY INERTIAL DATA
# BIT 7 RR CDU FAIL
# BIT 8 SPARE
# BIT 9 IMU OPERATE WITH NO MALFUNCTION
# BIT 10 LM COMPUTER (NOT AGS) HAS CONTROL OF LM.
# BIT 11 IMU CAGE COMMAND TO DRIVE IMU GIMBAL ANGLES TO 0.
# BIT 12 IMU CDU FAIL (MALFUNCTION OF IMU CDU,S)
# BIT 13 IMU FAIL (MALFUCTION OF IMU STABILIZATION LOOPS)
# BIT 14 ISS TURN ON REQUESTED
# BIT 15 TEMPERATURE OF STABLE MEMBER WITHIN DESIGN LIMITS
# CHANNEL 31 INPUT CHANNEL; BITS ASSOCIATED WITH THE ATTITUDE CONTROLLER, TRANSLATIONAL CONTROLLER,
# AND SPACECRAFT ATTITUDE CONTROL; USED BY RCS DAP.
#
# BIT 1 ROTATION (BY RHC) COMMANDED IN POSITIVE PITCH DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
# ALSO POSITIVE ELEVATION CHANGE FOR LANDING POINT DESIGNATOR
# BIT 2 AS BIT 1 EXCEPT NEGATIVE PITCH AND ELEVATION.
# BIT 3 ROTATION (BY RHC) COMMANDED IN POSITIVE YAW DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
# BIT 4 AS BIT 3 EXCEPT NEGATIVE YAW
# BIT 5 ROTATION (BY RHC) COMMANDED IN POSITIVE ROLL DIRECTION; MUST BE IN MINIMUM IMPULSE MODE.
# ALSO POSITIVE AZIMUTH CHANGE FOR LANDING POINT DESIGNATOR.
# BIT 6 AS BIT 5 EXCEPT NEGATIVE ROLL AND AZIMUTH
# BIT 7 TRANSLATION IN +X DIRECTION COMMANDED BY THC
# BIT 8 TRANSLATION IN -X DIRECTION COMMANDED BY THC
# BIT 9 TRANSLATION IN +Y DIRECTION COMMANDED BY THC
# BIT 10 TRANSLATION IN -Y DIRECTION COMMANDED BY THC
# BIT 11 TRANSLATION IN +Z DIRECTION COMMANDED BY THC
# BIT 12 TRANSLATION IN -Z DIRECTION COMMANDED BY THC
# Page 59
# BIT 13 ATTITUDE HOLD MODE ON SCS MODE CONTROL SWITCH
# BIT 14 AUTO STABILIZATION OF ATTITUDE ON SCS MODE SWITCH
# BIT 15 ATTITUDE CONTROL OUT OF DETENT (RHC NOT IN NEUTRAL)
# CHANNEL 32 INPUT CHANNEL.
#
# BIT 1 THRUSTERS 2 & 4 DISABLED BY CREW
# BIT 2 THRUSTERS 5 & 8 DISABLED BY CREW
# BIT 3 THRUSTERS 1 & 3 DISABLED BY CREW
# BIT 4 THRUSTERS 6 & 7 DISABLED BY CREW
# BIT 5 THRUSTERS 14 & 16 DISABLED BY CREW
# BIT 6 THRUSTERS 13 & 15 DISABLED BY CREW
# BIT 7 THRUSTERS 9 & 12 DISABLED BY CREW
# BIT 8 THRUSTERS 10 & 11 DISABLED BY CREW
# BIT 9 DESCENT ENGINE DISABLED BY CREW
# BIT 10 APPARENT DESCENT ENGINE GIMBAL FAILURE
# BIT 14 INDICATES PROCEED KEY IS DEPRESSED
# CHANNEL 33 CHAN33: INPUT CHANNEL; FOR HARDWARE STATUS AND COMMAND INFORMATION. BITS 15-11 ARE FLIP-
# FLOP BITS RESET BY A CHANNEL "WRITE" COMMAND THAT ARE RESET BY A RESTART & BY T4RUPT LOOP.
#
# BIT 1 SPARE
# BIT 2 RR AUTO-POWER ON
# BIT 3 RR RANGE LOW SCALE
# BIT 4 RR DATA GOOD
# BIT 5 LR RANGE DATA GOOD
# BIT 6 LR POS1
# BIT 7 LR POS2
# Page 60
# BIT 8 LR VEL DATA GOOD
# BIT 9 LR RANGE LOW SCALE
# BIT 10 BLOCK UPLINK INPUT
# BIT 11 UPLINK TOO FAST
# BIT 12 DOWNLINK TOO FAST
# BIT 13 PIPA FAIL
# BIT 14 WARNING OF REPEATED ALARMS: RESTART, COUNTER FAIL, VOLTAGE FAIL, AND SCALAR DOUBLE.
# BIT 15 LGC OSCILLATOR STOPPED
# CHANNEL 34 DNT M1: OUTPUT CHANNEL; DOWNLINK 1: FIRST OF TWO WORDS SERIALIZATION.
# CHANNEL 35 DNT M2: OUTPUT CHANNEL; DOWNLINK 2: SECOND OF TWO WORDS SERIALIZATION.

1182
INTEGRATION_INITIALIZATION.s Normal file

File diff suppressed because it is too large Load Diff

183
INTER-BANK_COMMUNICATION.s Normal file
View File

@ -0,0 +1,183 @@
# Copyright: Public domain.
# Filename: INTER-BANK_COMMUNICATION.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 1103-1106
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-08 RSB Adapted from Colossus249/ file of same name
# and page images. Corrected various typos
# in the transcription of program comments,
# and these should be back-ported to
# Colossus249.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 1103
# THE FOLLOWING ROUTINE CAN BE USED TO CALL A SUBROUTINE IN ANOTHER BANK. IN THE BANKCALL VERSION, THE
# CADR OF THE SUBROUTINE IMMEDIATELY FOLLOWS THE TC BANKCALL INSTRUCTION, WITH C(A) AND C(L) PRESERVED.
BLOCK 02
COUNT 02/BANK
BANKCALL DXCH BUF2 # SAVE INCOMING A,L.
INDEX Q # PICK UP CADR.
CA 0
INCR Q # SO WE RETURN TO THE LOC. AFTER THE CADR.
# SWCALL IS IDENTICAL TO BANKCALL, EXCEPT THAT THE CADR ARRIVES IN A.
SWCALL TS L
LXCH FBANK # SWITCH BANKS, SAVING RETURN.
MASK LOW10 # GET SUB-ADDRESS OF CADR.
XCH Q # A,L NOW CONTAINS DP RETURN.
DXCH BUF2 # RESTORING INPUTS IF THIS IS A BANKCALL.
INDEX Q
TC 10000 # SETTING Q TO SWRETURN
SWRETURN XCH BUF2 +1 # COMES HERE TO RETURN TO CALLER. C(A,L)
XCH FBANK # ARE PRESERVED FOR RETURN.
XCH BUF2 +1
TC BUF2
# THE FOLLOWING ROUTINE CAN BE USED AS A UNILATERAL JUMP WITH C(A,L) PRESERVED AND THE CADR IMMEDIATELY
# FOLLOWING THE TC POSTJUMP INSTRUCTION.
POSTJUMP XCH Q # SAVE INCOMING C(A).
INDEX A # GET CADR.
CA 0
# BANKJUMP IS THE SAME AS POSTJUMP, EXCEPT THAT THE CADR ARRIVES IN A.
BANKJUMP TS FBANK
MASK LOW10
XCH Q # RESTORING INPUT C(A) IF THIS WAS A
Q+10000 INDEX Q # POSTJUMP.
PRIO12 TCF 10000 # PRIO12 = TCF 10000 = 12000
# Page 1104
# THE FOLLOWING ROUTINE GETS THE RETURN CADR SAVED BY SWCALL OR BANKCALL AND LEAVES IT IN A.
MAKECADR CAF LOW10
MASK BUF2
AD BUF2 +1
TC Q
SUPDACAL TS MPTEMP
XCH FBANK # SET FBANK FOR DATA.
EXTEND
ROR SUPERBNK # SAVE FBANK IN BITS 15-11, AND
XCH MPTEMP # SUPERBANK IN BITS 7-5.
MASK LOW10
XCH L # SAVE REL. ADR. IN BANK, FETCH SUPERBITS
INHINT # BECAUSE RUPT DOES NOT SAVE SUPERBANK.
EXTEND
WRITE SUPERBNK # SET SUPERBANK FOR DATA.
INDEX L
CA 10000 # PINBALL (FIX MEM DISP) PREVENTS DCA HERE
XCH MPTEMP # SAVE 1ST WD, FETCH OLD FBANK AND SBANK.
EXTEND
WRITE SUPERBNK # RESTORE SUPERBANK.
RELINT
TS FBANK # RESTORE FBANK.
CA MPTEMP # RECOVER FIRST WORD OF DATA.
RETURN # 24 WDS. DATACALL 516 MU, SUPDACAL 432 MU
# Page 1105
# THE FOLLOWING ROUTINES ARE IDENTICAL TO BANKCALL AND SWCALL EXCEPT THAT THEY ARE USED IN INTERRUPT.
IBNKCALL DXCH RUPTREG3 # USES RUPTREG3,4 FOR DP RETURN ADDRESS.
INDEX Q
# Was CAF --- RSB 2009
CA 0
INCR Q
ISWCALL TS L
LXCH FBANK
MASK LOW10
XCH Q
DXCH RUPTREG3
INDEX Q
TC 10000
ISWRETRN XCH RUPTREG4
XCH FBANK
XCH RUPTREG4
TC RUPTREG3
# 2. USPRCADR ACCESSES INTERPRETIVE CODING IN OTHER THAN THE USER'S FBANK. THE CALLING SEQUENCE IS AS FOLLOWS:
# L TC USPRCADR
# L+1 CADR INTPRETX # INTPRETX IS THE INTERPRETIVE CODING
# # RETURN IS TO L+2
USPRCADR TS LOC # SAVE A
CA BIT8
TS EDOP # EXIT INSTRUCTION TO EDOP
CA BBANK
TS BANKSET # USER'S BBANK TO BANKSET
INDEX Q
CA 0
TS FBANK # INTERPRETIVE BANK TO FBANK
MASK LOW10 # YIELDS INTERPRETIVE RELATIVE ADDRESS
XCH Q # INTERPRETIVE ADDRESS TO Q, FETCHING L+1
XCH LOC # L+1 TO LOC, RETRIEVING ORIGINAL A
TCF Q+10000
# Page 1106
# THERE ARE FOUR POSSIBLE SETTINGS FOR CHANNEL 07. (CHANNEL 07 CONTAINS SUPERBANK SETTING.)
#
# PSEUDO-FIXED OCTAL PSEUDO
# SUPERBANK SETTING S-REG. VALUE BANK NUMBERS ADDRESSES
# --------- ------- ------------ ------------ ---------
# SUPERBANK 3 OXX 2000 - 3777 30 - 37 70000 - 107777 (WHERE XX CAN BE ANYTHING AND
# WILL USUALLY BE SEEN AS 11)
# SUPERBANK 4 100 2000 - 3777 40 - 47 110000 - 127777 (AS FAR AS IT CAN BE SEEN,
# ONLY BANKS 40-43 WILL EVER BE
# AND ARE PRESENTLY AVAILABLE)
# SUPERBANK 5 101 2000 - 3777 50 - 57 130000 - 147777 (PRESENTLY NOT AVAILABLE TO
# THE USER)
# SUPERBANK 6 110 2000 - 3777 60 - 67 150000 - 167777 (PRESENTLY NOT AVAILABLE TO
# THE USER)
# *** THIS ROUTINE MAY BE CALLED BY ANY PROGRAM LOCATED IN BANKS 00 - 27. I.E., NO PROGRAM LIVING IN ANY
# SUPERBANK SHOULD USE SUPERSW. ***
#
# SUPERSW MAY BE CALLED IN THIS FASHION:
# CAF ABBCON WHERE -- ABBCON BBCON SOMETHING --
# TCR SUPERSW (THE SUPERBNK BITS ARE IN THE BBCON)
# ... ...
# . .
# . .
# OR IN THIS FASHION:
# CAF SUPERSET WHERE SUPERSET IS ONE OF THE FOUR AVAILABLE
# TCR SUPERSW SUPERBANK BIT CONSTANTS:
# ... ... SUPER011 OCTAL 60
# . . SUPER100 OCTAL 100
# . . SUPER101 OCTAL 120
# SUPER110 OCTAL 140
SUPERSW EXTEND
WRITE SUPERBNK # WRITE BITS 7-6-5 OF THE ACCUMULATOR INTO
# CHANNEL 07
TC Q # TC TO INSTRUCTION FOLLOWING
# TC SUPERSW

3059
INTERPRETER.s Normal file

File diff suppressed because it is too large Load Diff

81
INTERPRETIVE_CONSTANT.s Normal file
View File

@ -0,0 +1,81 @@
# Copyright: Public domain.
# Filename: INTERPRETIVE_CONSTANT.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1100-1101
# Mod history: 2009-05-25 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 1100
SETLOC INTPRET1
BANK
COUNT* $$/ICONS
DP1/4TH 2DEC .25
UNITZ 2DEC 0
UNITY 2DEC 0
UNITX 2DEC .5
ZEROVECS 2DEC 0
2DEC 0
2DEC 0
DPHALF = UNITX
DPPOSMAX OCT 37777
OCT 37777
# Page 1101
# INTERPRETIVE CONSTANTS IN THE OTHER HALF-MEMORY
SETLOC INTPRET2
BANK
COUNT* $$/ICONS
ZUNIT 2DEC 0
YUNIT 2DEC 0
XUNIT 2DEC .5
ZEROVEC 2DEC 0
2DEC 0
2DEC 0
OCT 77777 # -0, -6, -12 MUST REMAIN IN THIS ORDER
DFC-6 DEC -6
DFC-12 DEC -12
LODPMAX 2OCT 3777737777 # THESE TWO CONSTANTS MUST REMAIN
LODPMAX1 2OCT 3777737777 # ADJACENT AND THE SAME FOR INTEGRATION
ZERODP = ZEROVEC
HALFDP = XUNIT

86
INTERPRETIVE_CONSTANTS.s Normal file
View File

@ -0,0 +1,86 @@
# Copyright: Public domain.
# Filename: INTERPRETIVE_CONSTANTS.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1205-1206
# Mod history: 2009-05-13 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1205
SETLOC INTPRET1
BANK
COUNT 23/ICONS
DP1/4TH 2DEC .25
UNITZ 2DEC 0
UNITY 2DEC 0
UNITX 2DEC .5
ZEROVECS 2DEC 0
2DEC 0
2DEC 0
DPHALF = UNITX
DPPOSMAX OCT 37777
OCT 37777
# Page 1206
# INTERPRETIVE CONSTANTS IN THE OTHER HALF-MEMORY
SETLOC INTPRET2
BANK
COUNT 14/ICONS
ZUNIT 2DEC 0
YUNIT 2DEC 0
XUNIT 2DEC .5
ZEROVEC 2DEC 0
2DEC 0
2DEC 0
OCT 77777 # -0, -6, -12 MUST REMAIN IN THIS ORDER
DEC-6 DEC -6
DEC-12 DEC -12
LODPMAX 2OCT 3777737777 # THESE TWO CONSTANTS MUST REMAIN
LODPMAX1 2OCT 3777737777 # ADJACENT AND THE SAME FOR INTEGRATION
ZERODP = ZEROVEC
HALFDP = XUNIT

128
INTERRUPT_LEAD_INS.s Normal file
View File

@ -0,0 +1,128 @@
# Copyright: Public domain.
# Filename: INTERRUPT_LEAD_INS.agc
# Purpose: Part of the source code for Comanche, build 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 131-132
# Contact: Ron Burkey <info@sandroid.org>,
# Fabrizio Bernardini <fabrizio@spacecraft.it>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 09/05/09 FB Transcription of Batch FB-1 Assignment.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 131
SETLOC 4000
COUNT 02/RUPTS
INHINT # GO
CAF GOBB
XCH BBANK
TCF GOPROG
DXCH ARUPT # T6RUPT
EXTEND
DCA T6LOC
DTCB
DXCH ARUPT # T5RUPT
CS TIME5
AD .5SEC
TCF T5RUPT
DXCH ARUPT # T3RUPT
CAF T3RPTBB
XCH BBANK
TCF T3RUPT
DXCH ARUPT # T4RUPT
CAF T4RPTBB
XCH BBANK
TCF T4RUPT
DXCH ARUPT # KEYRUPT1
CAF KEYRPTBB
XCH BBANK
TCF KEYRUPT1
DXCH ARUPT # KEYRUPT2
CAF MKRUPTBB
XCH BBANK
TCF MARKRUPT
DXCH ARUPT # UPRUPT
CAF UPRPTBB
XCH BBANK
TCF UPRUPT
DXCH ARUPT # DOWNRUPT
CAF DWNRPTBB
XCH BBANK
TCF DODOWNTM
DXCH ARUPT # RADAR RUPT
# Page 132
CAF RDRPTBB
XCH BBANK
TCF VHFREAD
DXCH ARUPT # HAND CONTROL RUPT
CAF HCRUPTBB
XCH BBANK
TCF RESUME +3 # NOT USED
EBANK= LST1 # RESTART USES E0,E3
GOBB BBCON GOPROG
EBANK= LST1
T3RPTBB BBCON T3RUPT
EBANK= KEYTEMP1
KEYRPTBB BBCON KEYRUPT1
EBANK= MRKBUF1
MKRUPTBB BBCON MARKRUPT
UPRPTBB = KEYRPTBB
EBANK= DNTMBUFF
DWNRPTBB BBCON DODOWNTM
EBANK= DATATEST
RDRPTBB BBCON VHFREAD
EBANK= TIME1
HCRUPTBB BBCON RESUME # NOT USED
EBANK= DSRUPTSW
T4RPTBB BBCON T4RUPT
EBANK= TIME1
T5RPTBB BBCON T5RUPT
T5RUPT EXTEND
BZMF NOQBRSM
EXTEND
DCA T5LOC
DTCB

932
JET_SELECTION_LOGIC.s Normal file
View File

@ -0,0 +1,932 @@
# Copyright: Public domain.
# Filename: JET_SELECTION_LOGIC.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1039-1062
# Mod history: 2009-05-13 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1039
BANK 21
SETLOC DAPS4
BANK
COUNT 17/DAPJS
EBANK= KMPAC
# EXAMINE CHANNEL 31 FOR TRANSLATION COMMANDS
JETSLECT LXCH BANKRUPT
CAF DELTATT3 # = 60 MS RESET TO EXECUTIVE PHASE1
AD T5TIME
TS TIME5
TCF +3
CAF DELATT20 # = 20 MS TO ASSURE A T5RUPT
TS TIME5
CAF =14MS # RESET T6 TO INITIALIZE THE JET CHANNELS
TS TIME6 # IN 14 MS
CAF NEGMAX
EXTEND
WOR CHAN13
EXTEND
QXCH QRUPT
CAF XLNMASK # = 7700 OCT
EXTEND # EXAMINE THE TRANSLATION
RXOR CHAN31 # HAND CONTROLLER
MASK XLNMASK
EXTEND
BZF NOXLNCMD
TS T5TEMP
EXTEND
MP BIT9
MASK THREE
TS XNDX1 # AC QUAD X-TRANSLATION INDEX
TS XNDX2 # BD QUAD X-TRANSLATION INDEX
CA T5TEMP
EXTEND # 1 = + XLN
MP BIT7 # 2 = - XLN
MASK THREE # 3 = NO XLN
TS YNDX # Y-TRANSLATION INDEX
CA T5TEMP
EXTEND
MP BIT5
MASK THREE
TS ZNDX # Z-TRANSLATION INDEX
CA DAPDATR1 # SET ATTKALMN TO PICK UP FILTER GAINS FOR
MASK BIT14 # TRANSLATIONS.
EXTEND # CHECK DAPDATR1 BIT 14 FOR LEM ATTACHED.
# Page 1040
BZF NOLEM
CS THREE # IF LEM IS ON, SET ATTKALMN = -3
TCF +2
NOLEM CS TWO # IF LEM IS OFF, SET ATTKALMN = -2.
TS ATTKALMN
CCS XTRANS # (+, -1, 0)
TS XNDX1 # USING BD-X ZERO XNDX1
TCF PWORD
TS XNDX2 # USING AC-X ZERO XNDX2
TCF PWORD
XLNMASK OCT 7700
DELTATT3 DEC 16378 # = 60 MS
DELATT20 DEC 16382 # = 20 MS
NOXLNCMD TS XNDX1 # ZERO ALL REQUESTS FOR TRANSLATION
TS XNDX2
TS YNDX
TS ZNDX
# PITCH COMMANDS TIMING(NO X-TRANS, NO QUAD FAILS) 32MCT
PWORD CCS TAU1 # CHECK FOR PITCH COMMANDS
CAF ONE
TCF +2 # 0 = NO PITCH
CAF TWO # +1 = + PITCH
TS PINDEX # +2 = - PITCH
CCS RACFAIL # FLAG FOR REAL AC QUAD FAILURES
TCF AFAILP
TCF TABPCOM # 0 = NO REAL AC FAILURES
TCF CFAILP # + = A QUAD FAILED
TCF TABPCOM # - = C QUAD FAILED
# IF FAILURES ARE PRESENT IGNORE
# X-TRANSLATIONS ON THIS AXIS
AFAILP CAF NINE # IF FAILURE IS PRESENT 1JET OPERATION
TCF TABPCOM +2 # IS ASSUMED. IGNORE X-TRANSLATION
CFAILP CAF TWELVE
TCF TABPCOM +2
XLNNDX DEC 0 # INDICES FOR TRANSLATION COMMANDS
DEC 3 # FOR USE IN TABLE LOOK UP
DEC 6
DEC 0
TWELVE = OCT14
# TABLE LOOK UP FOR PITCH COMMANDS WITH AND WITHOUT X-TRANSLATION AND AC QUAD FAILURES PRESENT.
# BITS 9, 10 CONTAIN THE NUMBER OF PITCH JETS USED TO PERFORM THE PITCH ROTATION
# Page 1041
TABPCOM INDEX XNDX1
CA XLNNDX
AD PINDEX
INDEX A
CA PYTABLE
MASK PJETS # =1417 OCT
TS PWORD1
EXTEND
MP BIT7
TS NPJETS # = NO. OF PITCH JETS
# YAW JET COMMANDS TIMING(N X-TRANS, NO QUAD FAILURES) 32MCT
YWORD CCS TAU2 # CHECK FOR YAW COMMANDS
CAF ONE
TCF +2
CAF TWO
TS YINDEX # YAW ROTATION INDEX
CCS RBDFAIL # FLAG FOR B OR D QUAD FAILURES
TCF BFAILY # 0 = NO BD FAILURE
TCF TABYCOM # + - B QUAD FAILED
TCF DFAILY # - = D QUAD FAILED
TCF TABYCOM
BFAILY CAF NINE
TCF TABYCOM +2
DFAILY CAF TWELVE
TCF TABYCOM +2
# Page 1042
# TABLE FOR PITCH(YAW) COMMANDS
# BITS 4,3,2,1 = PITCH, X-TRANSLATION JETS SELECTED
# BITS 10,9 = NO. PITCH JETS USED TO PERFORM ROTATION
# BITS 8,7,6,5 = YAW, X-TRANSLATION JETS SELECTED
# BITS 12,11: NO. YAW JETS USED TO PERFORM ROTATION
# ROT TRANS QUAD BIAS
PYTABLE OCT 0 # 0 0 0
OCT 5125 # + 0 0
OCT 5252 # - 0 0
OCT 0231 # 0 + 3
OCT 2421 # + + 3
OCT 2610 # - + 3
OCT 0146 # 0 - 6
OCT 2504 # + - 6
OCT 2442 # - - 6
OCT 0 # 0 A(B) 9
OCT 2421 # + A(B) 9
OCT 2442 # - A(B) 9
OCT 0 # 0 C(D) 12
OCT 2504 # + C(D) 12
OCT 2610 # - C(D) 12
# MASKS FOR PITCH AND YAW COMMANDS
PJETS OCT 1417
YJETS OCT 6360
# TABLE LOOK UP FOR YAW COMMANDS WITH AND WITHOUT X-TRANSLATION AND AC QUAD FAILURES PRESENT
# BITS 11, 12 CONTAIN THE NUMBER OF YAW JETS USED TO PERFORM THE YAW ROTATION
TABYCOM INDEX XNDX2
CA XLNNDX
AD YINDEX
INDEX A
CA PYTABLE
MASK YJETS # = 6360 OCT
TS YWORD1
EXTEND
MP BIT5
TS NYJETS # NO. OF YAW JETS USED TO PERFORM ROTATION
# Page 1043
# ROLL COMMANDS TIMING(NO Y,Z TRANS, NO QUAD FAILS) 45MCT
RWORD CCS TAU # CHECK FOR ROLL COMMANDS
CAF ONE
TCF +2
CAF TWO
TS RINDEX
CCS ACORBD # FLAG FOR AC OR BD QUAD SELECTION FOR
TCF BDROLL # ROLL COMMANDS
TCF BDROLL # +, +0 = BD ROLL
TCF +1 # -, -0 = AC ROLL
ACROLL CCS RACFAIL # CHECK FOR REAL FAILURES
TCF RAFAIL # ON AC QUADS
TCF RXLNS
TCF RCFAIL
TCF RXLNS
RAFAIL CAF NINE # QUAD FAILURE WILL GET
TCF TABRCOM # 1-JET OPERATION
RCFAIL CAF TWELVE
TCF TABRCOM
XLN1NDX DEC 0
DEC 1 # INDICES FOR TRANSLATION
DEC 2
DEC 0
# TABLE LOOK UP FOR AC-ROLL COMMANDS WITH AND WITHOUT Y-TRANSLATION AND ACQUAD FAILURES PRESENT
# BITS 9,10,11 CONTAIN THE MAGNITUDE AND DIRECTION OF THE ROLL
RXLNS INDEX YNDX # NO AC QUAD FAILURES
CA XLNNDX # INCLUDE +,-,0, Y-TRANSLATION
TABRCOM AD RINDEX
INDEX A
CA RTABLE
MASK ACRJETS # = 3760 OCT
TS RWORD1
# CHECK FOR Z-TRANSLATIONS ON BD
BDZCHECK CA ZNDX
EXTEND
BZMF NOBDZ # NO Z-TRANSLATION
# Page 1044
# TABLE LOOK UP FOR BD Z-TRANSLATION WITH AND WITHOUT REAL BD QUAD FAILURES. Z-TRANSLATION WILL BE POSS-
# IBLE AS LONG AS ROLL COMMANDS CAN BE SATISFIED WITH THE AC ROLL JETS. CRITERION: IF THE RESULTANT NET ROLL
# COMMANDS = 0 (WITH Z-TRANSLATION) AND IF TAU = 0, THEN INCLUDE THE BD Z-TRANSLATION COMMANDS. IF THE RESULTANT
# ROLL COMMAND = 0, AND IF TAU NZ, THEN IGNORE THE BD Z-TRANSLATION
CCS RBDFAIL
CAF THREE
TCF +2
CAF SIX
INDEX ZNDX
AD XLN1NDX
INDEX A
CA YZTABLE
MASK BDZJETS # = 3417 OCT
AD RWORD1 # ADD TO ROLL COMMANDS
TS T5TEMP # IF POSSIBLE. MUST CHECK TAU FIRST
EXTEND
MP BIT7 # DETERMINE THE NET ROLL COMMAND WITH
AD =-4 # Z-TRANSLATION ADDED ON
TS NRJETS # NET NO. OF +,- ROLL JETS ON
EXTEND
BZF TAUCHECK
ACRBDZ CA T5TEMP # Z-TRANSLATION ACCEPTED EVEN THO WE MAY
TS RWORD1 # HAVE INTRODUCED AN UNDESIRABLE ROLL
TCF ROLLTIME # BRANCH TO JET ON-TIME CALCULATIONS
TAUCHECK CCS TAU
TCF NOBDZ
TCF ACRBDZ
TCF NOBDZ
TCF ACRBDZ
NOBDZ CA RWORD1 # Z-TRANSLATION NOT ACCEPTED
EXTEND
MP BIT7
AD =-2
TS NRJETS
TCF ROLLTIME # BRANCH TO JET ON-TIME CALCULATION
# Page 1045
# BD QUAD SELECTION FOR ROLL COMMANDS
BDROLL CCS RBDFAIL
TCF RBFAIL
TCF RZXLNS
TCF RDFAIL
TCF RZXLNS
RBFAIL CAF NINE
TCF TABRZCMD
RDFAIL CAF TWELVE
TCF TABRZCMD
RZXLNS INDEX ZNDX # NO BD FAILURES
CA XLNNDX # +,-,0 Z-TRANSLATION PRESENT
TABRZCMD AD RINDEX
INDEX A
CA RTABLE
MASK BDRJETS # = 34017 OCT
TS RWORD1
ACYCHECK CA YNDX # ANY Y-TRANSLATION
EXTEND
BZF NOACY # NO Y-TRANSLATION
CCS RACFAIL
CAF THREE
TCF +2
CAF SIX
INDEX YNDX
AD XLN1NDX
INDEX A
CA YZTABLE
MASK ACYJETS # = 34360 OCT
AD RWORD1
TS T5TEMP
EXTEND # FOR EXPLANATION SEE CODING ON RTABLE
MP BIT4
AD =-4
TS NRJETS # NO. OF NET ROLL JETS
EXTEND
BZF TAUCHCK # IF NRJETS = 0
BDRACZ CA T5TEMP # Y-TRANSLATION ACCEPTED
TS RWORD1
TCF ROLLTIME # BRANCH TO JET ON-TIME CALCULATIONS
TAUCHCK CCS TAU
TCF NOACY
TCF BDRACZ
TCF NOACY
TCF BDRACZ
# Page 1046
NOACY CA RWORD1 # Y-TRANSLATION NOT ACCEPTED
EXTEND
MP BIT4
AD =-2
TS NRJETS
TCF ROLLTIME
# Page 1047
# TABLE FOR ROLL, Y AND Z-TRANSLATION COMMANDS
#
# EITHER AC OR BD ROLL MAY BE SELECTED. IF AC ROLL IS SELECTED, Y-TRANSLATIONS MAY BE SATISFIED SIMULTANEOUSLY
# PROVIDED THAT THERE ARE NO AC QUAD FAILURES. IF THERE ARE AC FAILURES, Y-TRANSLATION COMMANDS WILL BE IGNORED,
# IN WHICH CASE THE ASTRONAUT SHOULD SWITCH TO BD ROLL.
#
# IF BDROLL IS SELECTED, Z-TRANSLATIONS MAY BE SATISFIED SIMULTANEOUSLY PROVIDED THAT THERE ARE NO BD QUAD
# FAILURES. IF THERE ARE BD FAILURES, Z-TRANSLATION COMMANDS WILL BE IGNORED, IN WHICH CASE THE ASTRONAUT SHOULD
# SWITCH TO AC ROLL.
#
# NOTE THAT IF ONE QUAD FAILS (E.G. B FAILED), Z-TRANSLATION IS STILL POSSIBLE AND THAT THE UNDESIREABLE ROLL
# INTRODUCED BY THIS TRANSLATION WILL BE COMPENSATED BY THE TWO AC ROLL JETS ACTUATED BY THE AUTOPILOT LOGIC.
#
# WORD MAKE UP....RTABLE
#
# TWO WORDS, CORRESPONDING TO AC OR BD ROLL SELECTION, HAVE BEEN COMBINED INTO ONE TABLE. THE WORD CORRESPONDING
# TO AC ROLL HAS THE FOLLOWING INTERPRETATION:
#
# BITS 9,10,11 ARE CODED TO GIVE THE NET ROLL TORQUE FOR THE WORD SELECTED. THE CODING IS:
#
# BIT NO. 11 10 9 NO. OF ROLL JETS
#
# 0 0 0 -2
# 0 0 1 -1
# 0 1 0 0
# 0 1 1 +1
# 1 0 0 +2
#
# THIS WORD MAY THEN BE ADDED TO THE WORD SELECTED FROM THE YZ-TRANSLATION TABLE, WHICH HAS THE SAME TYPE OF
# CODING AS ABOVE, AND THE NET ROLL DETERMINED BY SHIFTING THE RESULTANT WORD RIGHT 8 PLACES AND SUBTRACTING FOUR.
#
# THE WORD CORRESPONDING TO THE BD ROLL HAS A SIMILAR INTEPRETATION, EXCEPT THAT BITS 12, 13, 14 ARE CODED
# (AS ABOVE) TO GIVE THE NET ROLL TORQUE.
# ROLL TRANS QUADFAIL BIAS
RTABLE OCT 11000 # 0 0
OCT 22125 # + 0
OCT 00252 # - 0
OCT 11231 # 0 +Y(+Z) 3
OCT 15421 # + +Y(+Z) 3
OCT 04610 # - +Y(+Z) 3
OCT 11146 # 0 -Y(-Z) 6
OCT 15504 # + -Y(-Z) 6
OCT 04442 # - -Y(-Z) 6
OCT 11000 # 0 A(B) 9
OCT 15504 # + A(B) 9
OCT 04610 # - A(B) 9
OCT 11000 # 0 C(D) 12
OCT 15421 # + C(D) 12
OCT 04442 # - C(D) 12
# Page 1048
# RTABLE MASKS:
ACRJETS OCT 03760
BDRJETS OCT 34017
# Page 1049
# Y, Z TRANSLATION TABLE
#
# ONCE AC OR BD ROLL IS SELECTED THE QUAD PAIR WHICH IS NOT BEING USED TO SATISFY THE ROLL COMMANDS MAY BE
# USED TO SATISFY THE REMAINING TRANSLATION COMMANDS. HOWEVER, WE MUST MAKE SURE THAT ROLL COMMANDS ARE SATISFIED
# WHEN THEY OCCUR. THEREFORE, THE Y-Z TRANSLATIONS FROM THIS TABLE WILL BE IGNORED IF THE NET ROLL TORQUE OF THE
# COMBINED WORD IS ZERO AND THE ROLL COMMANDS ARE NON-ZERO. THIS SITUATION WOULD OCCUR, FOR EXAMPLE, IF WE EN-
# COUNTER SIMULTANEOUS +R +Y -Z COMMANDS AND A QUAD D FAILURE WHILE USING AC FOR ROLL.
#
# TO FACILITATE THE LOGIC, THE Y-Z TRANSLATION TABLE HAS BEEN CODED IN A MANNER SIMILAR TO THE ROLL TABLE
# ABOVE.
#
# BITS 9,10,11 ARE CODED TO GIVE THE NET ROLL TORQUE INCURRED BY Z-TRANSLATIONS. THE WORD SELECTED CAN THEN BE
# ADDED TO THE AC-ROLL WORD AND THE RESULTANT ROLL TORQUE DETERMINED FROM THE COMBINED WORD. SIMILARLY BITS
# 12,13,14 ARE CODED TO GIVE THE NET ROLL TORQUE INCURRED BY Y-TRANSLATIONS WHEN BD-ROLL IS SELECTED.
# TRANSLATION QUADFAIL BIAS
#
YZTABLE OCT 11000 # 0 0
OCT 11231 # +Z(+Y) 0
OCT 11146 # -Z(-Y) 0
OCT 11000 # 0 B(A) 3
OCT 04610 # +Z(+Y) B(A) 3
OCT 15504 # -Z(-Y) B(A) 3
OCT 11000 # 0 D(C) 6
OCT 15421 # +Z(+Y) D(C) 6
OCT 04442 # -Z(-Y) D(C) 6
# YZ-TABLE MASKS:
BDZJETS OCT 03417
ACYJETS OCT 34360
# ADDITIONAL CONSTANTS
=-2 = NEG2
=-4 = NEG4
# Page 1050
# CALCULATION OF JET ON-TIMES
#
# THE ROTATION COMMANDS (TAU'S), WHICH WERE DETERMINED FROM THE JET SWITCHING LOGIC ON THE BASIS OF SINGLE JET
# OPERATION, MUST NOW BE UPDATED BY THE ACTUAL NUMBER OF JETS TO BE USED IN SATISFYING THESE COMMANDS. TAU MUST
# ALSO BE DECREMENTED ACCORDING TO THE EXPECTED TORQUE GENERATED BY THE NEW COMMANDS ACTING OVER THE NEXT T5
# INTERVAL.
#
# IN ORDER TO MAINTAIN ACCURATE KNOWLEDGE OF VEHICLE ANGULAR RATES, WE MUST ALSO PROVIDE EXPECTED FIRING TIMES
# (DFT'S, ALSO IN TERMS OF 1-JET OPERATION) FOR THE RATE FILTER.
#
# NOTE THAT TRANSLATIONS CAN PRODUCE ROTATIONS EVEN THOUGH NO ROTATIONS WERE CALLED FOR. NEVERTHELESS, WE MUST
# UPDATE DFT.
#
# WHEN THE ROTATIONS HAVE FINISHED, WE MUST PROVIDE CHANNEL INFORMATION TO THE T6 PROGRAM TO CONTINUE ON WITH
# THE TRANSLATIONS. THIS WILL BE DONE IN THE NEXT SECTION. HOWEVER, TO INSURE THAT JETS ARE NOT FIRED FOR LESS
# THAN A MINIMUM IMPULSE (14MS), ALL JET CHANNEL COMMANDS WILL BE HELD FIXED FROM THE START OF THE T5 PROGRAM FOR
# AT LEAST 14MS UNTIL THE INITIALIZATION OF NEW COMMANDS. MOREOVER, A 14MS ON-TIME WILL BE ADDED TO ANY ROTATIONAL
# COMMANDS GENERATED BY THE MANUAL CONTROLS OR THE JET SWITCHING LOGIC, AND ALL TRANSLATION COMMANDS WILL BE
# ACTIVE FOR AT LEAST ONE CYCLE OF THE T5 PROGRAM (.1SEC)
# PITCH JET ON-TIME CALCULATION
PITCHTIM CCS TAU1
TCF PTAUPOS
TCF +2
TCF PTAUNEG
TS DFT1 # NO PITCH ROTATION
TCF PBYPASS # COMMANDS
PTAUNEG CS NPJETS
TS NPJETS
PTAUPOS CA TAU1
EXTEND
INDEX NPJETS
MP NJET
TS BLAST1
AD =-.1SEC
EXTEND
BZMF AD14MSP
INDEX NPJETS
CA DFTMAX # THE PITCH ON-TIME IS GREATER THAN .1 SEC
TS DFT1
COM
ADS TAU1 # UPDATE TAU1
CAF =+.1SEC # LIMIT THE LENGTH OF PITCH ROTATION
TS BLAST1 # COMMANDS TO 0.1 SEC SO THAT ONLY
TCF ASMBLWP # X-TRANSLATIONS WILL CONTINUE ON SWITCH
# OVER TO TVC
AD14MSP CS BLAST1 # SEE IF JET ON TIME IS LESS THAN
AD =14MS # MINIMUM IMPULSE TIME
EXTEND
BZMF PBLASTOK # IF SO LIMIT MINIMUM ON TIME TO 14 MS
CAF =14MS
# Page 1051
TS BLAST1
PBLASTOK CA BLAST1
EXTEND # THE PITCH COMMANDS WILL BE COMPLETED
MP NPJETS # WITHIN THE TS-CYCLE TIME
LXCH DFT1 # FOR USE IN UPDATING RATE FILTER
TS TAU1 # ZERO TAU1 (ACC CONTAINS ZERO)
TCF ASMBLWP
# Page 1052
# YAW JET ON-TIME CALCULATION
YAWTIME CCS TAU2
TCF YTAUPOS
TCF +2
TCF YTAUNEG
TS DFT2 # NO YAW ROTATION COMMANDS
TCF YBYPASS
YTAUNEG CS NYJETS
TS NYJETS
YTAUPOS CA TAU2
EXTEND
INDEX NYJETS
MP NJET
TS BLAST2
AD =-.1SEC
EXTEND
BZMF AD14MSY
INDEX NYJETS
CA DFTMAX # YAW COMMANDS WILL LAST LONGER THAN .1SEC
TS DFT2
COM
ADS TAU2 # DECREMENT TAU2
CAF =+.1SEC # LIMIT THE LENGTH OF YAW ROTATION COMMAND
TS BLAST2 # TO 0.1 SEC SO THAT ONLY X-TRANSLATION
TCF ASMBLWY # WILL CONTINUE ON SWITCH OVER TO TVC
AD14MSY CS BLAST2 # SEE IF JET ON-TIME LESS THAN
AD =14MS # MINIMUM IMPULSE TIME
EXTEND
BZMF YBLASTOK # IF SO, LIMIT MINIMUM ON-TIME TO 14 MS
CAF =14MS
TS BLAST2
YBLASTOK CA BLAST2 # YAW COMMANDS WILL BE COMPLETED WITHIN
EXTEND # THE T5CYCLE TIME
MP NYJETS
LXCH DFT2
TS TAU2 # ZERO TAU2
TCF ASMBLWY
# Page 1053
# ROLL ON-TIME CALCULATION:
ROLLTIME CCS TAU
TCF RBLAST
TCF +2
TCF RBLAST
INDEX NRJETS
CA DFTMAX # UPDATE DFT EVEN THO NO ROLL COMMANDS ARE
TS DFT # PRESENT
TCF RBYPASS
DEC -480 # =-.3SEC
DEC -320 # =-.2SEC
=-.1SEC DEC -160 # =-.1SEC
DFTMAX DEC 0 # 0
=+.1SEC DEC 160 # =+.1SEC
DEC 320 # =+.2SEC
DEC 480 # =+.3SEC
=14MS DEC 23 # =14MS
RBLAST CA TAU
EXTEND
INDEX NRJETS
MP NJET
TS BLAST # BLAST IS AN INTERMEDIATE VARIABLE
# USED IN DETERMINING THE JET ON-TIMES
AD =-.1SEC
EXTEND
BZMF AD14MSR
INDEX NRJETS # THE ROLL ROTATION WILL LAST LONGER
CA DFTMAX # THAN THE T5 CYCLE TIME
TS DFT
COM
ADS TAU
CAF =+.1SEC # LIMIT THE LENGTH OF ROLL ROTATION
TS BLAST # COMMANDS TO 0.1 SEC SO THAT ONLY Y-Z
TCF ASMBLWR # TRANSLATION COMMANDS CONTINUE
AD14MSR CS BLAST # SEE IF THE JET ON-TIME LESS THAN
AD =14MS # MINIMUM IMPULSE TIME
EXTEND
BZMF RBLASTOK
CAF =14MS # IF SO, LIMIT MINIMUM ON-TIME TO 14 MS
TS BLAST
RBLASTOK CA BLAST
EXTEND
MP NRJETS
LXCH DFT
TS TAU # ZERO TAU
TCF ASMBLWR
# Page 1054
DEC -.333333 # = -1/3
DEC -.500000 # = -1.2
DEC -.999999 # = -1 (NEGMAX)
NJET DEC 0
DEC .999999 # = +1 (POSMAX)
DEC .500000 # = +1/2
DEC .333333 # = +1/3
# Page 1055
# WHEN THE ROTATION COMMANDS ARE COMPLETED, IT IS NECESSARY TO REPLACE THESE COMMANDS BY NEW COMMANDS WHICH
# CONTINUE ON WITH THE TRANSLATIONS IF ANY ARE PRESENT.
#
# IN THIS SECTION THESE NEW COMMANDS ARE GENERATED AND STORED FOR REPLACEMENT OF THE CHANNEL COMMANDS WHEN THE
# CORRESPONDING ROTATIONS ARE COMPLETED.
#
# GENERATION OF THE SECOND PITCH(X-TRANS) WORD...PWORD2
ASMBLWP CCS RACFAIL
TCF FPX2 # IF FAILURE ON AC IGNORE X-TRANSLATION
TCF +2
TCF FPX2
INDEX XNDX1
CA XLNNDX
INDEX A
FPX2 CA PYTABLE
MASK PJETS
TS PWORD2
TCF YAWTIME
PBYPASS CA PWORD1 # THE T6 PROGRAM WILL LOAD PWORD2
TS PWORD2 # UPON ENTRY
CAF ZERO
TS BLAST1 # THERE IS NO PWORD2
TCF YAWTIME
# Page 1056
# GENERATION OF THE SECOND ROLL (Y,Z) WORD (RWORD2)
ASMBLWR CCS YNDX # CHECK FOR Y-TRANS
TCF ACBD2Y
NO2Y CAF ZERO
TS RWORD2
CCS ZNDX # CHECK FOR Z-TRANS
TCF ACBD2Z
NO2Z CAF ZERO
ADS RWORD2
TCF PITCHTIM # RWORD2 ASSEMBLED
ACBD2Y CCS ACORBD
TCF AC2Y # CAN DO Y-TRANS
TCF AC2Y
TCF +1 # USING AC FOR ROLL
CCS RACFAIL
TCF NO2Y # USING AC AND AC HAS FAILED
TCF +2
TCF NO2Y # DITTO
INDEX YNDX # NO FAILURES, CAN DO Y
CA XLNNDX
INDEX A
CA RTABLE
MASK ACRJETS
TCF NO2Y +1
AC2Y CCS RACFAIL
CAF THREE
TCF +2
CAF SIX
INDEX YNDX
AD XLN1NDX
INDEX A
CA YZTABLE
MASK ACYJETS
TS RWORD2
EXTEND
MP BIT4
AD =-2
TS NRJETS
CS BLAST
AD =+.1SEC
EXTEND
MP NRJETS
CA L
ADS DFT
TCF NO2Y +2
# Page 1057
ACBD2Z CCS ACORBD
TCF BDF2Z # USING BD-ROLL
TCF BDF2Z # MUST CHECK FOR BD FAILURES
TCF +1
CCS RBDFAIL # USING AC FOR ROLL, CAN DO Z-TRANS
CAF THREE
TCF +2
CAF SIX
INDEX ZNDX
AD XLN1NDX
INDEX A
CA YZTABLE
MASK BDZJETS
ADS RWORD2
EXTEND
MP BIT7
AD =-2
TS NRJETS
CS BLAST
AD =+.1SEC
EXTEND
MP NRJETS
CA L
ADS DFT
TCF PITCHTIM
BDF2Z CCS RBDFAIL
TCF NO2Z # USING BD-ROLL AND BD HAS FAILED
TCF +2
TCF NO2Z # DITTO
INDEX ZNDX
CA XLNNDX
INDEX A
CA RTABLE
MASK BDRJETS
TCF NO2Z +1
RBYPASS CA RWORD1
TS RWORD2
CAF ZERO
TS BLAST
TCF PITCHTIM
# Page 1058
# GENERATION OF THE SECOND YAW (X-TRANS) WORD...YWORD2
ASMBLWY CCS RBDFAIL
TCF FYX2 # IF FAILURE ON BD IGNORE X-TRANSLATION
TCF +2
TCF FYX2
INDEX XNDX2
CA XLNNDX
INDEX A
FYX2 CA PYTABLE
MASK YJETS
TS YWORD2
TCF T6SETUP
YBYPASS CA YWORD1
TS YWORD2
CAF ZERO
TS BLAST2
# Page 1059
# SORT THE JET ON-TIMES
#
# AT THIS POINT ALL THE CHANNEL COMMANDS AND JET ON-TIMES HAVE BEEN DETERMINED. IN SUMMARY THESE ARE:
#
# RWORD1
# RWORD2 BLAST
#
# PWORD1
# PWORD2 BLAST1
#
# YWORD1
# YWORD2 BLAST2
#
# IN THIS SECTION THE JET ON-TIMES ARE SORTED AND THE SEQUENCE OF T6 INTERRUPTS IS DETERMINED. TO FACILITATE
# THE SORTING PROCESS AND THE T6 PROGRAM, THE VARIABLES BLAST, BLAST1, BLAST2, ARE RESERVED AS DOUBLE PRECISION
# WORDS. THE LOWER PART OF THESE WORDS CONTAIN A BRANCH INDEX ASSOCIATED WITH THE ROTATION AXIS OF THE HIGHER
# ORDER WORD.
T6SETUP CAF ZERO # BRANCH INDEX FOR ROLL
TS BLAST +1
CAF FOUR # BRANCH INDEX FOR PITCH
TS BLAST1 +1
CAF ELEVEN # BRANCH INDEX FOR YAW
TS BLAST2 +1
CS BLAST
AD BLAST1
EXTEND
BZMF DXCHT12 # T1 OR T2
CHECKT23 CS BLAST1
AD BLAST2
EXTEND
BZMF DXCHT23
CALCDT6 CS BLAST1
ADS BLAST2
CS BLAST
ADS BLAST1 # END OF SORTING PROCEDURE
EXTEND # RESET T5LOC TO BEGIN PHASE1
DCA RCS2CADR
DXCH T5LOC
ENDJETS CS BIT1 # RESET BIT1 FOR INITIALIZATION OF
MASK RCSFLAGS # T6 PROGRAM
TS RCSFLAGS
CS ZERO # RESET T5PHASE FOR PHASE1
TS T5PHASE
TCF RESUME # RESUME INTERRUPTED PROGRAM
EBANK= KMPAC
RCS2CADR 2CADR RCSATT
# Page 1060
DXCHT12 DXCH BLAST
DXCH BLAST1
DXCH BLAST
TCF CHECKT23
DXCHT23 DXCH BLAST1
DXCH BLAST2
DXCH BLAST1
CS BLAST
AD BLAST1
EXTEND
BZMF +2
TCF CALCDT6
DXCH BLAST
DXCH BLAST1
DXCH BLAST
TCF CALCDT6
# Page 1061
# T6 PROGRAM AND CHANNEL SETUP
BANK 21
SETLOC DAPS5
BANK
T6START LXCH BANKRUPT
EXTEND
QXCH QRUPT
CCS TIME6 # CHECK TO SEE IF TIME6 WAS RESET
TCF RESUME # AFTER T6RUPT OCCURRED (IN T5RUPT)
TCF +2 # IF SO WAIT FOR NEXT T6RUPT BEFORE
TCF RESUME # TAKING ACTION
CS RCSFLAGS
MASK BIT1 # IF BIT1 IS 0 RESET TO 1
EXTEND # AND INITIALIZE CHANNEL
BZF T6RUPTOR
ADS RCSFLAGS
CA RWORD1
EXTEND # INITIALIZE CHANNELS 5,6 WITH WORD1
WRITE CHAN6
CA PWORD1
AD YWORD1
EXTEND
WRITE CHAN5
T6RUPTOR CCS BLAST
TCF ZBLAST # ZERO BLAST1
TCF REPLACE # REPLACE WORD1
TCF +2
TCF REPLACE
T6L1 CCS BLAST1
TCF ZBLAST1
TCF REPLACE1
TCF +2
TCF REPLACE1
T6L2 CCS BLAST2
TCF ZBLAST2
TCF REPLACE2
TCF RESUME
TCF REPLACE2
REPLACE INDEX BLAST +1
TC REPLACER
CS ONE
TS BLAST
TCF T6L1
REPLACE1 INDEX BLAST1 +1
# Page 1062
TC REPLACER
CS ONE
TS BLAST1
TCF T6L2
REPLACE2 INDEX BLAST2 +1
TC REPLACER
CS ONE
TS BLAST2
TCF RESUME
REPLACER CA RWORD2 # INITIALIZE CHANNELS 5,6 WITH WORD2
EXTEND
WRITE CHAN6
TC Q
REPLACEP CA YJETS
EXTEND
RAND CHAN5
AD PWORD2
EXTEND
WRITE CHAN5
TC Q
REPLACEY CA PJETS
EXTEND
RAND CHAN5
AD YWORD2
EXTEND
WRITE CHAN5
TC Q
ZBLAST CAF ZERO
XCH BLAST
TCF ENABT6
ZBLAST1 CAF ZERO
XCH BLAST1
TCF ENABT6
ZBLAST2 CAF ZERO
XCH BLAST2
ENABT6 TS TIME6
CAF NEGMAX
EXTEND
WOR CHAN13 # ENABLE T6RUPT
TCF RESUME
# END OF T6 INTERRUPT
ENDSLECT EQUALS

265
KALCMANU_STEERING.s Normal file
View File

@ -0,0 +1,265 @@
# Copyright: Public domain.
# Filename: KALCMANU_STEERING.agc
# Purpose: Part of the source code for Comanche, build 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 414-419
# Contact: Onno Hommes <ohommes@cmu.edu>.
# Website: www.ibiblio.org/apollo.
# Mod history: 05/07/09 OH Transcription Batch 1 Assignment
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further information.
# Please report any errors to info@sandroid.org.
# Page 414
# GENERATION OF STEERING COMMANDS FOR DIGITAL AUTOPILOT FREE FALL MANEUVERS
#
# NEW COMMANDS WILL BE GENERATED EVERY ONE SECOND DURING THE MANEUVER
BANK 15
SETLOC KALCMON1
BANK
EBANK= BCDU
COUNT 22/KALC
NEWDELHI CS HOLDFLAG # SEE IF MANEUVER HAS BEEN INTERRUPTED
EXTEND # BY ASTRONAUT.
BZMF NOGO -2 # IF SO, TERMINATE KALCMANU
NEWANGL TC INTPRET
AXC,1 AXC,2
MIS # COMPUTE THE NEW MATRIX FROM S/C TO
DEL # STABLE MEMBER AXES
CALL
MXM3
VLOAD STADR
STOVL MIS +12D # CALCULATE NEW DESIRED CDU ANGLES
STADR
STOVL MIS +6D
STADR
STORE MIS
AXC,1 CALL
MIS
DCMTOCDU # PICK UP THE NEW CDU ANGLES FROM MATRIX
RTB
V1STO2S
STORE NCDU # NEW CDU ANGLES
BONCLR EXIT
CALCMAN2
MANUSTAT # TO START MANEUVER
CAF TWO # +0 OTHERWISE
INCRDCDU TS KSPNDX
DOUBLE
TS KDPNDX
INDEX KSPNDX
CA NCDU # NEW DESIRED CDU ANGLES
EXTEND
INDEX KSPNDX
MSU BCDU # INITIAL S/C ANGLE OR PREVIOUS DESIRED
EXTEND # CDU ANGLES
MP QUADROT
INDEX KDPNDX
DXCH DELCDUX # ANGEL INCREMENTS TO BE ADDED TO
# Page 415
INDEX KSPNDX # DCDU EVERY TENTH SEC
CA NCDU # BY LEM DAP
INDEX KSPNDX
XCH BCDU
INDEX KDPNDX
TS CDUXD
CCS KSPNDX
TCF INCRDCDU # LOOP FOR THREE AXES
RELINT
# COMPARE PRESENT TIME WTIH TIME TO TERMINATE MANEUVER
TMANUCHK TC TIMECHK
TC POSTJUMP
CADR CONTMANU
CAF ONE
MANUSTAL TC WAITLIST
EBANK= BCDU
2CADR MANUSTOP
RELINT
TCF ENDOFJOB
TIMECHK EXTEND
DCS TIME2
DXCH TTEMP
EXTEND
DCA TM
DAS TTEMP
CCS TTEMP
TC Q
TCF +2
TCF 2NDRETRN
CCS TTEMP +1
TC Q
TCF MANUOFF
COM
MANUOFF AD 1SEC
EXTEND
BZMF 2NDRETRN
INCR Q
2NDRETRN INCR Q
INCR Q
TC Q
SETLOC MANUSTUF
BANK
# Page 416
MANUSTAT EXIT # INITIALIZATION ROUTINE
EXTEND # FOR AUTOMATIC MANEUVERS
DCA TIME2
DAS TM # TM+T0 MANEUVER COMPLETION TIME
CS 1SEC
TS L
CS ZERO
DAS TM # (TM+T0)-1
INHINT
CS ONE # ENABLE AUTOPILOT TO PERFORM
TS HOLDFLAG # AUTOMATIC MANEUVERS
CS RATEINDX # SEE IF MANEUVERING AT HIGH RATE
AD SIX
EXTEND
BZMF HIGHGAIN
TCF +4
HIGHGAIN CS RCSFLAGS # IF SO, SET HIGH RATE FLAG (BIT 15 OF
MASK BIT15 # RCSFLAGS)
ADS RCSFLAGS
DXCH BRATE # X-AXIS MANEUVER RATE
DXCH WBODY
DXCH BRATE +2 # Y-AXIS MANEUVER RATE
DXCH WBODY1
DXCH BRATE +4 # Z-AXIS MANEUVER RATE
DXCH WBODY2
CA BIASTEMP +1 # INSERT ATTITUDE ERROR BIASES
TS BIAS # INTO AUTOPILOT
CA BIASTEMP +3
TS BIAS1
CA BIASTEMP +5
TS BIAS2
CA TIME1
AD 1SEC
XCH NEXTIME
TC POSTJUMP
CADR INCRDCDU -1
CONTMANU INHINT # CONTINUE WITH UPDATE PROCESS
CS TIME1
AD NEXTIME
CCS A
AD ONE
TCF MANUCALL
AD NEGMAX
COM
MANUCALL TC WAITLIST
EBANK= BCDU
2CADR UPDTCALL
RELINT
# Page 417
CAF 1SEC # INCREMENT TIME FOR NEXT UPDATE
ADS NEXTIME
TCF ENDOFJOB
UPDTCALL CAF PRIO26 # CALL FOR UPDATE
TC FINDVAC # OF STEERING COMMANDS
EBANK= BCDU
2CADR NEWDELHI
TC TASKOVER
# Page 418
# ROUTINE FOR TERMINATING AUTOMATIC MANEUVERS
SETLOC KALCMON3
BANK
MANUSTOP TC STOPYZ
TC IBNKCALL
CADR LOADYZ
ENDROLL CA CPHI
TS CDUXD # SET CDUXD TO THE COMMANDED OUTER GIMBAL
TC STOPRATE
ENDMANU CA ATTPRIO # RESTORE USERS PRIO
TS NEWPRIO
CA ZERO # ZERO ATTCADR
DXCH ATTCADR
TC SPVAC # RETURN TO USER OF GOMANUR
TC TASKOVER
SETLOC STOPRAT
BANK
STOPRATE CAF ZERO
TS DELCDUX
TS DELCDUX +1 # ZERO ROLL INCREMENTAL ANGLES
TS WBODY # RATE
TS WBODY +1
TS BIAS # BIAS
CS BIT15 # MAKE SURE HIGH RATE FLAG (BIT 15 OF
MASK RCSFLAGS # RCSFLAGS) IS RESET.
TS RCSFLAGS
STOPYZ CAF ZERO
TS DELCDUY # ZERO PITCH, YAW
TS DELCDUY +1 # INCREMENTAL ANGLES
TS DELCDUZ
TS DELCDUZ +1
TS WBODY1 # RATES
TS WBODY1 +1
TS WBODY2
TS WBODY2 +1
TS BIAS1 # BIASES
TS BIAS2
TC Q
SETLOC MANUSTUF
BANK
# Page 419
ZEROERROR CA CDUX # PICK UP CDU ANGLES AND STORE IN
TS CDUXD # CDU DESIRED
CA CDUY
TS CDUYD
CA CDUZ
TS CDUZD
TC Q
SETLOC KALCMON1
BANK
LOADCDUD CA CPHI # STORE TERMINAL ANGLES INTO
TS CDUXD # COMMAND ANGLES
LOADYZ CA CTHETA
TS CDUYD
CA CPSI
TS CDUZD
TC Q

101
KALMAN_FILTER.s Normal file
View File

@ -0,0 +1,101 @@
# Copyright: Public domain.
# Filename: KALMAN_FILTER.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1470-1471
# Mod history: 2009-05-27 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 1470
EBANK= NO.UJETS
BANK 16
SETLOC DAPS1
BANK
COUNT* $$/DAP
RATELOOP CA TWO
TS DAPTEMP6
DOUBLE
TS Q
INDEX DAPTEMP6
CCS TJP
TCF +2
TCF LOOPRATE
AD -100MST6
EXTEND
BZMF SMALLTJU
INDEX DAPTEMP6
CCS TJP
CA -100MST6
TCF +2
CS -100MST6
INDEX DAPTEMP6
ADS TJP
INDEX DAPTEMP6
CCS TJP
CS -100MS # 0.1 AT 1
TCF +2
CA -100MS
LOOPRATE EXTEND
INDEX DAPTEMP6
MP NO.PJETS
CA L
INDEX DAPTEMP6
TS DAPTEMP1 # SIGNED TORQUE AT 1 JET-SEC FOR FILTER
EXTEND
MP BIT10 # RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
EXTEND
BZMF NEGTORK
STORTORK INDEX Q # INCREMENT DOWNLIST REGISTER.
ADS DOWNTORK # NOTE: NOT INITIALIZED; OVERFLOWS.
CCS DAPTEMP6
TCF RATELOOP +1
TCF ROTORQUE
SMALLTJU CA ZERO
INDEX DAPTEMP6
XCH TJP
EXTEND
# Page 1471
MP ELEVEN # 10.24 PLUS
CA L
TCF LOOPRATE
ROTORQUE CA DAPTEMP2
AD DAPTEMP3
EXTEND
MP 1JACCR
TS JETRATER
CS DAPTEMP3
AD DAPTEMP2
EXTEND
MP 1JACCQ
TS JETRATEQ
TCF BACKP
-100MST6 DEC -160
NEGTORK COM
INCR Q
TCF STORTORK

136
KEYRUPT_UPRUPT.s Normal file
View File

@ -0,0 +1,136 @@
# Copyright: Public domain.
# Filename: KEYRUPT_UPRUPT.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 1449-1451
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-07 RSB Adapted from Colossus249 file of the same
# name, and page images. Corrected various
# typos in the transcription of program
# comments, and these should be back-ported
# to Colossus249.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 1449
BANK 14
SETLOC KEYRUPT
BANK
COUNT* $$/KEYUP
KEYRUPT1 TS BANKRUPT
XCH Q
TS QRUPT
TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
CAF LOW5
EXTEND
RAND MNKEYIN # CHECK IF KEYS 5M-1M ON
KEYCOM TS RUPTREG4
CS FLAGWRD5
MASK BIT15
ADS FLAGWRD5
ACCEPTUP CAF CHRPRIO # (NOTE: RUPTREG4 = KEYTEMP1)
TC NOVAC
EBANK= DSPCOUNT
2CADR CHARIN
CA RUPTREG4
INDEX LOCCTR
TS MPAC # LEAVE 5 BIT KEY CODE IN MPAC FOR CHARIN
TC RESUME
# Page 1450
# UPRUPT PROGRAM
UPRUPT TS BANKRUPT
XCH Q
TS QRUPT
TC LODSAMPT # TIME IS SNATCHED IN RUPT FOR NOUN 65.
CAF ZERO
XCH INLINK
TS KEYTEMP1
CAF BIT3 # TURN ON UPACT LIGHT
EXTEND # (BIT 3 OF CHANNEL 11)
WOR DSALMOUT
UPRPT1 CAF LOW5 # TEST FOR TRIPLE CHAR REDUNDANCY
MASK KEYTEMP1 # LOW5 OF WORD
XCH KEYTEMP1 # LOW5 INTO KEYTEMP1
EXTEND
MP BIT10 # SHIFT RIGHT 5
TS KEYTEMP2
MASK LOW5 # MID 5
AD HI10
TC UPTEST
CAF BIT10
EXTEND
MP KEYTEMP2 # SHIFT RIGHT 5
MASK LOW5 # HIGH 5
COM
TC UPTEST
UPOK CS ELRCODE # CODE IS GOOD. IF CODE = `ERROR RESET',
AD KEYTEMP1 # CLEAR UPLOCKFL (SET BIT4 OF FLAGWRD7 = 0)
EXTEND # IF CODE DOES NOT = `ERROR RESET', ACCEPT
BZF CLUPLOCK # CODE ONLY IF UPLOCKFL IS CLEAR (=0).
CAF BIT4 # TEST UPLOCKFL FOR 0 OR 1
MASK FLAGWRD7
CCS A
TC RESUME # UPLOCKFL = 1
TC ACCEPTUP # UPLOCKFL = 0
CLUPLOCK CS BIT4 # CLEAR UPLOCKFL (I.E., SET BIT 4 OF
MASK FLAGWRD7 # FLAGWRD7 = 0)
TS FLAGWRD7
TC ACCEPTUP
# CODE IS BAD
TMFAIL2 CS FLAGWRD7 # LOCK OUT FURTHER UPLINK ACTIVITY
MASK BIT4 # (BY SETTING UPLOCKFL = 1) UNTIL
ADS FLAGWRD7 # `ERROR RESET' IS SENT VIA UPLINK.
TC RESUME
UPTEST AD KEYTEMP1
# Page 1451
CCS A
TC TMFAIL2
HI10 OCT 77740
TC TMFAIL2
TC Q
ELRCODE OCT 22
# `UPLINK ACTIVITY LIGHT' IS TURNED OFF BY .....
# 1. VBRELDSP
# 2. ERROR RESET
# 3. UPDATE PROGRAM (P27) ENTERED BY V70,V71,V72, AND V73.
#
# THE RECEPTION OF A BAD CODE (I.E., CCC FAILURE) LOCKS OUT FURTHER UPLINK ACTIVITY BY SETTING BIT4 OF FLAGWRD7 = 1.
# THIS INDICATION WILL BE TRANSFERRED TO THE GROUND BY THE DOWNLINK WHICH DOWNLINKS ALL FLAGWORDS.
# WHEN UPLINK ACTIVITY IS LOCKED OUT, IT CAN BE ALLOWED WHEN THE GROUND UPLINKS AND `ERROR RESET' CODE.
# (IT IS RECOMMENDED THAT THE `ERROR LIGHT RESET' CODE IS PRECEEDED BY 16 BITS THE FIRST OF WHICH IS 1 FOLLOWED
# BY 15 ZEROS. THIS WILL ELIMINATE EXTRANEOUS BITS FROM INLINK WHICH MAY HAVE BEEN LEFT OVER FROM THE ORIGINAL
# FAILURE).
#
# UPLINK ACTIVITY IS ALSO ALLOWED (UNLOCKED) DURING FRESH START WHEN FRESH START SETS BIT4 OF FLAGWRD7 = 0.

169
LAMBERT_AIMPOINT_GUIDANCE.s Normal file
View File

@ -0,0 +1,169 @@
# Copyright: Public domain.
# Filename: LAMBERT_AIMPOINT_GUIDANCE.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 651-653
# Mod history: 2009-05-18 RSB Transcribed from Luminary 099
# page images.
# 2009-06-05 RSB Corrected 4 typos.
# 2009-06-07 RSB Fixed a typo.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 651
# GENERAL LAMBERT AIMPOINT GUIDANCE **
# WRITTEN BY RAMA M AIYAWAR
# PROGRAM P-31 DESCRIPTION **
#
# 1. TO ACCEPT TARGETING PARAMETERS OBTAINED FROM A SOURCE EXTERNAL
# TO THE LEM AND COMPUTE THERE FROM THE REQUIRED-VELOCITY AND
# OTHER INITIAL CONDITIONS REQUIRED BY LM FOR DESIRED MANEUVER.
# THE TARGETING PARAMETERS ARE TIG (TIME OF IGNITION), TARGET
# VECTOR (RTARG), AND THE TIME FROM TIG UNTIL THE TARGET IS
# REACHED (DELLT4), DESIRED TIME OF FLIGHT FROM RINIT TO RTARG.
# ASSUMPTIONS **
#
# 1. THE TARGET PARAMETERS MAY HAVE BEEN LOADED PRIOR TO THE
# EXECUTION OF THIS PROGRAM.
# 2. THIS PROGRAM IS APPLICABLE IN EITHER EARTH OR LUNAR ORBIT.
# 3. THIS PROGRAM IS DESIGNED FOR ONE-MAN OPERATION, AND SHOULD
# BE SELECTED BY THE ASTRONAUT BY DSKY ENTRY V37 E31.
# SUBROUTINES USED **
#
# MANUPARM, TTG/N35, R02BOTH, MIDGIM, DISPMGA, FLAGDOWN, BANKCALL,
# GOTOPOOH, ENDOFJOB, PHASCHNG, GOFLASHR, GOFLASH.
#
# MANUPARM CALCULATES APOGEE, PERIGEE ALTITUDES AND DELTAV DESIRED
# FOR THE MANEUVER.
#
# TTG/N35 CLOCKTASK - UPDATES CLOCK.
#
# MIDGIM CALCULATES MIDDLE GIMBAL ANGLE FOR DISPLAY.
#
# R02BOTH IMU - STATUS CHECK ROUTINE.
# DISPLAYS USED IN P-31LM **
#
# V06N33 DISPLAY SOTRED TIG (IN HRS. MINS. SECS.)
# V06N42 DISPLAY APOGEE, PERIGEE, DELTAV.
# V16N35 DISPLAY TIME FROM TIG.
# V06N45 TIME FROM IGNITION AND MIDDLE GIMBAL ANGLE.
# ERASABLE INITIALIZATION REQUIRED **
#
# TIG TIME OF IGNITION DP (B+28) CS.
#
# DELLT4 DESIRED TIME OF FLIGHT DP (B+28) CS
# FROM RINIT TO RTARG.
#
# RTARG RADIUS VECTOR OF TARGET POSITION VECTOR
# RADIUS VECTOR SCALED TO (B+29)METERS IF EARTH ORBIT
# Page 652
# RADIUS VECTOR SCALED TO (B+27)METERS IF MOON ORBIT
# OUTPUT **
#
# HAPO APOGEE ALTITUDE
# HPER PERIGEE ALTITUDE
# VGDISP MAG. OF DELTAV FOR DISPLAY, SCALING B+7 M/CS EARTH
# MAG. OF DELTAV FOR DISPLAY, SCALING B+5 M/CS MOON
# MIDGIM MIDDLE GIMBAL ANGLE
# XDELVFLG RESETS XDELVFLG FOR LAMBERT VG COMPUTATIONS
# ALARMS OR ABORTS NONE **
# RESTARTS ARE VIA GROUP 4 **
SETLOC GLM
BANK
EBANK= SUBEXIT
COUNT* $$/P31
P31 TC P20FLGON
CAF V06N33 # T16
TC VNP00H
TC INTPRET
CLEAR DLOAD
UPDATFLG
TIG
STCALL TDEC1 # INTEGRATE STATE VECTORS TO TIG
LEMPREC
VLOAD SETPD
RATT
0D
STORE RTIG
STOVL RINIT
VATT
STORE VTIG
STODL VINIT
P30ZERO
PUSH PDDL # E4 AND NUMIT = 0
DELLT4
DAD SXA,1
TIG
RTX1
STORE TPASS4
SXA,2 CALL
RTX2
INITVEL
VLOAD PUSH
# Page 653
DELVEET3
STORE DELVSIN
ABVAL CLEAR
XDELVFLG
STCALL VGDISP
GET.LVC
VLOAD PDVL
RTIG
VIPRIME
CALL
PERIAPO1
CALL
SHIFTR1
CALL # LIMIT DISPLAY TO 9999.9 N. MI.
MAXCHK
STODL HPER
4D
CALL
SHIFTR1
CALL # LIMIT DISPLAY TO 9999.9 N. MI.
MAXCHK
STORE HAPO
EXIT
CAF V06N81 # DELVLVC
TC VNP00H
CAF V06N42 # HAPO, HPER, VGDISP
TC VNP00H
TC INTPRET
REVN1645 SET CALL # TRKMKCNT, TTOGO, +MGA
FINALFLG
VN1645
GOTO
REVN1645
# *** END OF LEMP30S .103 ***

536
LANDING_ANALOG_DISPLAYS.s Normal file
View File

@ -0,0 +1,536 @@
# Copyright: Public domain.
# Filename: LANDING_ANALOG_DISPLAYS.agc
# Purpose: Part of the source code for Luminary, build 099. It
# is part of the source code for the Lunar Module's
# (LM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 898-907
# Contact: Ron Burkey <info@sandroid.org>,
# Fabrizio Bernardini <fabrizio@spacecraft.it>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 05/06/09 FB Transcription Batch 4 Assignment.
#
# The contents of the "Luminary099" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 001 of AGC program Luminary099 by NASA
# 2021112-061. July 14, 1969.
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 898
BANK 21
SETLOC R10
BANK
EBANK= UNIT/R/
COUNT* $$/R10
LANDISP LXCH PIPCTR1 # UPDATE TBASE2 AND PIPCTR SIMULTANEOUSLY.
CS TIME1
DXCH TBASE2
CS FLAGWRD7 # IS LANDING ANALOG DISPLAYS FLAG SET?
MASK SWANDBIT
CCS A
TCF DISPRSET # NO.
CA IMODES33 # BIT 7 = 0 (DO ALTRATE), =1 (DO ALT.)
MASK BIT7
CCS A
TCF ALTOUT
ALTROUT TC DISINDAT # CHECK MODE SELECT SWITCH AND DIDFLG.
CS IMODES33
MASK BIT7
ADS IMODES33 # ALTERNATE ALTITUDE RATE WITH ALTITUDE.
CAF BIT2 # RATE COMMAND IS EXECUTED BEFORE RANGE.
EXTEND
WOR CHAN14 # ALTRATE (BIT2 = 1), ALTITUDE (BIT2 = 0).
ARCOMP CA RUNIT # COMPUTE ALTRATE = RUNIT.VVECT M/CS *(-6).
EXTEND
MP VVECT # MULTIPLY X-COMPONENTS.
XCH RUPTREG1 # SAVE SINGLE PRECISION RESULT M/CS*2(-6)
CA RUNIT +1 # MULTIPLY Y-COMPONENTS.
EXTEND
MP VVECT +1
ADS RUPTREG1 # ACCUMULATE PARTIAL PRODUCTS.
CA RUNIT +2 # MULTIPLY Z-COMPONENTS.
EXTEND
MP VVECT +2
ADS RUPTREG1 # ALTITUDE RATE IN M/CS *2(-6).
CA ARCONV # CONVERT ALTRATE TO BIT UNITS (.5FPS/BIT)
EXTEND
MP RUPTREG1
DDOUBL
DDOUBL
XCH RUPTREG1 # ALTITUDE RATE IN BIT UNITS*2(-14).
CA DALTRATE # ALTITUDE RATE COMPENSATION FACTOR.
EXTEND
MP DT
AD RUPTREG1
TS ALTRATE # ALTITUDE RATE IN BIT UNITS*2(-14).
CS ALTRATE
# Page 899
EXTEND # CHECK POLARITY OF ALTITUDE RATE.
BZMF +2
TCF DATAOUT # NEGATIVE -- SEND POS. PULSES TO ALTM REG.
CA ALTRATE # POSITIVE OR ZERO -- SET SIGN BIT = 1 AND
AD BIT15 # SEND TO ALTM REGISTER. *DO NOT SEND +0*
DATAOUT TS ALTM # ACTIVATE THE LANDING ANALOG DISPLAYS
CAF BIT3
EXTEND
WOR CHAN14 # BIT3 DRIVES THE ALT/ALTRATE METER.
TCF TASKOVER # EXIT
ALTOUT TC DISINDAT # CHECK MODE SELECT SWITCH AND DIDFLG.
CS BIT7
MASK IMODES33
TS IMODES33 # ALTERNATE ALTITUDE RATE WITH ALTITUDE.
CS BIT2
EXTEND
WAND CHAN14
CCS ALTBITS # = -1 IF OLD ALT. DATA TO BE EXTRAPOLATED.
TCF +4
TCF +3
TCF OLDDATA
TS ALTBITS # SET ALTBITS FROM -0 TO +0.
CS ONE
DXCH ALTBITS # SET ALTBITS = -1 FOR SWITCH USE NEXT PASS.
DXCH ALTSAVE
CA BIT10 # NEW ALTITUDE EXTRAPOLATION WITH ALTRATE.
XCH Q
LXCH 7 # ZL
CA DT
EXTEND
DV Q # RESCALE DT*2(-14) TO *2(-9) TIME IN CS.
EXTEND
MP ARTOA2 # .0021322 *2(+8)
TCF OLDDATA +1 # RATE APPLIES FOR DT CS.
ZDATA2 DXCH ALTSAVE
TCF NEWDATA
OLDDATA CA ARTOA # RATE APPLIES FOR .5 SEC. (4X/SEC. CYCLE)
EXTEND
MP ALTRATE # EXTRAPOLATE WITH ALTITUDE RATE.
DDOUBL
AD ALTSAVE +1
TS ALTSAVE +1
CAF ZERO
ADS ALTSAVE
CAF POSMAX # FORCE SIGN AGREEMENT ASSUMING A
AD ONE # NON-NEGATIVE ALTSAVE.
AD ALTSAVE +1 # IF ALTSAVE IS NEGATIVE, ZERO ALTSAVE
TS ALTSAVE +1 # AND ALTSAVE +1 AT ZERODATA.
# Page 900
CAF ZERO
AD POSMAX
AD ALTSAVE
TS ALTSAVE # POSSIBLY SKIP TO NEWDATA.
TCF ZERODATA
NEWDATA CCS ALTSAVE +1
TCF +4
TCF +3
CAF ZERO # SET NEGATIVE ALTSAVE +1 TO +0.
TS ALTSAVE +1
CCS ALTSAVE # PROVIDE A 15 BIT UNSIGNED OUTPUT.
CAF BIT15 # THE HI-ORDER PART IS +1 OR +0.
AD ALTSAVE +1
TCF DATAOUT # DISPATCH UNSIGNED BITS TO ALTM REG.
DISINDAT EXTEND
QXCH LADQSAVE # SAVE RETURN TO ALTROUT +1 OR ALTOUT +1
CAF BIT6
EXTEND # WISHETH THE ASTRONAUT THE ANALOG
RAND CHAN30 # DISPLAYS? I.E.,
CCS A # IS THE MODE SELECT SWITCH IN PGNCS?
TCF DISPRSET # NO. ASTRONAUT REQUESTS NO INERTIAL DATA
CS FLAGWRD1 # YES. CHECK STATUS OF DIDFLAG.
MASK DIDFLBIT
EXTEND
BZF SPEEDRUN # SET. PERFORM DATA DISPLAY SEQUENCE.
CS FLAGWRD1 # RESET. PERFORM INITIALIZATION FUNCTIONS.
MASK DIDFLBIT
ADS FLAGWRD1 # SET DIDFLAG.
CS BIT7
MASK IMODES33 # TO DISPLAY ALTRATE FIRST AND ALT. SECOND
TS IMODES33
CS FLAGWRD0 # ARE WE IN DESCENT TRAJECTORY?
MASK R10FLBIT
EXTEND
BZF TASKOVER # NO
CAF BIT8 # YES.
EXTEND
WOR CHAN12 # SET DISPLAY INERTIAL DATA OUTBIT.
CAF ZERO
TS TRAKLATV # LATERAL VELOCITY MONITOR FLAG
TS TRAKFWDV # FORWARD VELOCITY MONITOR FLAG
TS LATVMETR # LATVEL MONITOR METER
TS FORVMETR # FORVEL MONITOR METER
CAF BIT4
TC TWIDDLE
ADRES INTLZE
TCF TASKOVER
INTLZE CAF BIT2
EXTEND
WOR CHAN12 # ENABLE RR ERROR COUNTER.
# Page 901
CS IMODES33
MASK BIT8
ADS IMODES33 # SET INERTIAL DATA FLAG.
TCF TASKOVER
SPEEDRUN CS PIPTIME +1 # UPDATE THE VELOCITY VECTOR
AD TIME1 # COMPUTE T - TN
AD HALF # CORRECT FOR POSSIBLE OVERFLOW OF TIME1.
AD HALF
XCH DT # SAVE FOR LATER USE
CA 1SEC
TS ITEMP5 # INITIALIZE FOR DIVISION LATER
EXTEND
DCA GDT/2 # COMPUTE THE X-COMPONENT OF VELOCITY.
DDOUBL
DDOUBL
EXTEND
MP DT
EXTEND
DV ITEMP5
XCH VVECT # VVECT = G(T-TN) M/CS *2(-5)
EXTEND
DCA V # M/CS *2(-7)
DDOUBL # RESCALE TO 2(-5)
DDOUBL
ADS VVECT # VVECT = VN + G(T-TN) M/CS *2(-5)
CA PIPAX # DELV CM/SEC *2(-14)
AD PIPATMPX # IN CASE PIPAX HAS BEEN ZEROED
EXTEND
MP KPIP1(5) # DELV M/CS *2(-5)
ADS VVECT # VVECT = VN + DELV + GN(T-TN) M/CS *2(-5)
EXTEND
DCA GDT/2 +2 # COMPUTE THE Y-COMPONENT OF VELOCITY.
DDOUBL
DDOUBL
EXTEND
MP DT
EXTEND
DV ITEMP5
XCH VVECT +1
EXTEND
DCA V +2
DDOUBL
DDOUBL
ADS VVECT +1
CA PIPAY
AD PIPATMPY
EXTEND
MP KPIP1(5)
ADS VVECT +1
# Page 902
EXTEND
DCA GDT/2 +4 # COMPUTE THE Z-COMPONENT OF VELOCITY.
DDOUBL
DDOUBL
EXTEND
MP DT
EXTEND
DV ITEMP5
XCH VVECT +2
EXTEND
DCA V +4
DDOUBL
DDOUBL
ADS VVECT +2
CA PIPAZ
AD PIPATMPZ
EXTEND
MP KPIP1(5)
ADS VVECT +2
CAF BIT3 # PAUSE 40 MS TO LET OTHER RUPTS IN.
TC VARDELAY
CS FLAGWRD0 # ARE WE IN DESCENT TRAJECTORY?
MASK R10FLBIT
CCS A
TCF +2 # YES.
TC LADQSAVE # NO.
CA DELVS # HI X OF VELOCITY CORRECTION TERM.
AD VVECT # HI X OF UPDATED VELOCITY VECTOR.
TS ITEMP1 # = VX - DVX M/CS *2(-5).
CA DELVS +2 # Y
AD VVECT +1 # Y
TS ITEMP2 # = VY - DVY M/CS *2(-5)
CA DELVS +4 # Z
AD VVECT +2 # Z
TS ITEMP3 # = VZ - DVZ M/CS *2(-5)
CA ITEMP1 # COMPUTE VHY, VELOCITY DIRECTED ALONG THE
EXTEND # Y-COORDINATE.
MP UHYP # HI X OF CROSS-RANGE HALF-UNIT VECTOR
XCH RUPTREG1
CA ITEMP2
EXTEND
MP UHYP +2 # Y
ADS RUPTREG1 # ACCUMULATE PARTIAL PRODUCTS.
CA ITEMP3
EXTEND
MP UHYP +4 # Z
ADS RUPTREG1
# Page 903
CA RUPTREG1
DOUBLE
XCH VHY # VHY=VMP.UHYP M/CS*2(-5).
CA ITEMP1 # NO COMPUTE VHZ, VELOCITY DIRECTED ALONG
EXTEND # THE Z-COORDINATE.
MP UHZP # HI X OF DOWN-RANGE HALF-UNIT VECTOR.
XCH RUPTREG1
CA ITEMP2
EXTEND
MP UHZP +2 # Y
ADS RUPTREG1 # ACCUMULATE PARTIAL PRODUCTS.
CA ITEMP3
EXTEND
MP UHZP +4 # Z
ADS RUPTREG1
CA RUPTREG1
DOUBLE
XCH VHZ # VHZ = VMP.UHZP M/CS*2(-5).
GET22/32 CAF EBANK6 # GET SIN(AOG),COS(AOG) FROM GPMATRIX.
TS EBANK
EBANK= M22
CA M22
TS ITEMP3
CA M32
TS ITEMP4
CAF EBANK7
TS EBANK
EBANK= UNIT/R/
LATFWDV CA ITEMP4 # COMPUTE LATERAL AND FORWARD VELOCITIES.
EXTEND
MP VHY
XCH RUPTREG1
CA ITEMP3
EXTEND
MP VHZ
ADS RUPTREG1 # = VHY(COS)AOG+VHZ(SIN)AOG M/CS *2(-5)
CA VELCONV # CONVERT LATERAL VELOCITY TO BIT UNITS.
EXTEND
MP RUPTREG1
DDOUBL
XCH LATVEL # LATERAL VELOCITY IN BIT UNITS *2(-14).
CA ITEMP4 # COMPUTE FORWARD VELOCITY.
EXTEND
MP VHZ
XCH RUPTREG1
CA ITEMP3
EXTEND
MP VHY
CS A
ADS RUPTREG1 # =VHZ(COS)AOG-VHY(SIN)AOG M/CS *2(-5).
# Page 904
CA VELCONV # CONVERT FORWARD VELOCITY TO BIT UNITS.
EXTEND
MP RUPTREG1
DDOUBL
XCH FORVEL # FORWARD VELOCITY IN BIT UNITS *2(-14).
CS MAXVBITS # ACC.=-199.9989 FT./SEC.
TS ITEMP6 # -547 BIT UNITS (OCTAL) AT 0.5571 FPS/BIT
CAF ONE # LOOP TWICE.
VMONITOR TS ITEMP5 # FORWARD AND LATERAL VELOCITY LANDING
INDEX ITEMP5 # ANALOG DISPLAYS MONITOR.
CCS LATVEL
TCF +4
TCF LVLIMITS
TCF +8D
TCF LVLIMITS
INDEX ITEMP5
CS LATVEL
AD MAXVBITS # +199.9989 FT.SEC.
EXTEND
BZMF CHKLASTY
TCF LVLIMITS
INDEX ITEMP5
CA LATVEL
AD MAXVBITS
EXTEND
BZMF +2
TCF LVLIMITS
CHKLASTY INDEX ITEMP5
CCS LATVMETR
TCF +4
TCF LASTOK
TCF +7
TCF LASTOK
INDEX ITEMP5
CA LATVEL
EXTEND
BZMF LASTPOSY +5
TCF +5
INDEX ITEMP5
CS LATVEL
EXTEND
BZMF LASTNEGY +4
LASTOK INDEX ITEMP5
CCS TRAKLATV
TCF LASTPOSY
TCF +2
TCF LASTNEGY
INDEX ITEMP5
# Page 905
CA LATVEL
EXTEND
BZMF NEGVMAXY
TCF POSVMAXY
LASTPOSY INDEX ITEMP5
CA LATVEL
EXTEND
BZMF +2
TCF POSVMAXY
CS MAXVBITS
TCF ZEROLSTY
POSVMAXY INDEX ITEMP5
CS LATVMETR
AD MAXVBITS
INDEX ITEMP5
XCH RUPTREG3
CAF ONE
TCF ZEROLSTY +3
LASTNEGY INDEX ITEMP5
CA LATVEL
EXTEND
BZMF NEGVMAXY
CA MAXVBITS
TCF ZEROLSTY
NEGVMAXY INDEX ITEMP5
CA LATVMETR
AD MAXVBITS
COM
INDEX ITEMP5
XCH RUPTREG3
CS ONE
TCF ZEROLSTY +3
LVLIMITS INDEX ITEMP5
CCS TRAKLATV
TCF LATVPOS
TCF +2
TCF LATVNEG
INDEX ITEMP5
CS LATVMETR
EXTEND
BZMF +2
TCF NEGLMLV
INDEX ITEMP5
CS LATVEL
EXTEND
BZMF LVMINLM
AD ITEMP6
INDEX ITEMP5
AD LATVMETR
EXTEND
# Page 906
BZMF LVMINLM
INDEX ITEMP5
AD LATVEL
EXTEND
INDEX ITEMP5
SU LATVMETR
TCF ZEROLSTY
LATVPOS INDEX ITEMP5
CS LATVEL
EXTEND
BZMF LVMINLM
TCF +5
LATVNEG INDEX ITEMP5
CA LATVEL
EXTEND
BZMF LVMINLM
INDEX ITEMP5
CS LATVMETR
TCF ZEROLSTY
NEGLMLV INDEX ITEMP5
CA LATVEL
EXTEND
BZMF LVMINLM
CA MAXVBITS
INDEX ITEMP5
AD LATVMETR
COM
INDEX ITEMP5
AD LATVEL
EXTEND
BZMF LVMINLM
EXTEND
INDEX ITEMP5
SU LATVEL
INDEX ITEMP5
AD LATVMETR
COM
TCF ZEROLSTY
LVMINLM INDEX ITEMP5
CS LATVMETR
INDEX ITEMP5
AD LATVEL
ZEROLSTY INDEX ITEMP5
XCH RUPTREG3
CAF ZERO
INDEX ITEMP5
TS TRAKLATV
INDEX ITEMP5
CA RUPTREG3
AD NEG0 # AVOIDS +0 DINC HARDWARE MALFUNCTION
# Page 907
INDEX ITEMP5
TS CDUTCMD
INDEX ITEMP5
CA RUPTREG3
INDEX ITEMP5
ADS LATVMETR
CCS ITEMP5 # FIRST MONITOR FORWARD THEN LATERAL VEL.
TCF VMONITOR
CAF BITSET # DRIVE THE X-POINTER DISPLAY.
EXTEND
WOR CHAN14
TC LADQSAVE # GO TO ALTROUT +1 OR TO ALTOUT +1
ZERODATA CAF ZERO # ZERO ALTSAVE AND ALTSAVE +1
TS L # NO NEGATIVE ALTITUDES ALLOWED.
TCF ZDATA2
# ****************************************************************************
DISPRSET CS FLAGWRD0 # ARE WE IN DESCENT TRAJECTORY?
MASK R10FLBIT
EXTEND
BZF ABORTON # NO.
CAF BIT8 # YES.
MASK IMODES33 # CHECK IF INERTIAL DATA JUST DISPLAYED.
CCS A
CAF BIT2 # YES. DISABLE RR ERROR COUNTER
AD BIT8 # NO. REMOVE DISPLAY INERTIAL DATA
COM
EXTEND
WAND CHAN12
ABORTON CS BITS8/7 # RESET INERTIAL DATA, INTERLEAVE FLAGS.
MASK IMODES33
TS IMODES33
CS DIDFLBIT
MASK FLAGWRD1
TS FLAGWRD1 # RESET DIDFLAG.
TCF TASKOVER
# ******************************************************************************
BITS8/7 OCT 00300 # INERTIAL DATA AND INTERLEAVE FLAGS.
BITSET = PRIO6
# ******************************************************************************

View File

@ -0,0 +1,318 @@
# Copyright: Public domain.
# Filename: LATITUDE_LONGITUDE_SUBROUTINES.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1236-1242
# Mod history: 2009-05-14 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1236
# SUBROUTINE TO CONVERT RAD VECTOR AT GIVEN TIME TO LAT,LONG AND ALT
#
# CALLING SEQUENCE
# L-1 CALL
# L LAT-LONG
#
# SUBROUTINES USED
# R-TO-RP, ARCTAN, SETGAMMA, SETRE
#
# ERASABLE INIT. REQ.
# AXO, -AYO, AZO, TEPHEM (SET AT LAUNCH TIME)
# ALPHAV = POSITION VECTOR METERS B-29
# MPAC -- TIME (CSECS B-28)
# ERADFLAG =1, TO COMPUTE EARTH RADIUS, =0 FOR FIXED EARTH RADIUS
# LUNAFLAG=0 FOR EARTH, 1 FOR MOON
#
# OUTPUT
# LATITUDE IN LAT (REVS. B-0)
# LONGITUDE IN LONG (REVS. B-0)
# ALTITUDE IN ALT METERS B-29
BANK 30
SETLOC LATLONG
BANK
COUNT 13/LT-LG
EBANK= ALPHAV
LAT-LONG STQ SETPD
INCORPEX
0D
STOVL 6D # SAVE TIME IN 6-7D FOR R-TO-RP
ALPHAV
PUSH ABVAL # 0-5D= R FOR R-TO-RP
STODL ALPHAM # ABS. VALUE OF R FOR ALT FORMULA BELOW
ZEROVEC # SET MPAC=0 FOR EARTH, NON-ZERO FOR MOON
BOFF COS # USE COS(0) TO GET NON-ZERO IN MPAC
LUNAFLAG # 0=EARTH, 1=MOON
CALLRTRP
CALLRTRP CALL
R-TO-RP # RP VECTOR CONVERTED FROM R B-29
UNIT # UNIT RP B-1
STCALL ALPHAV # U2= 1/2 SINL FOR SETRE SUBR BELOW
SETGAMMA # SET GAMMA=B2/A2 FOR EARTH, =1 FOR MOON
CALL # SCALED B-1.
SETRE # CALC RE METERS B-29
DLOAD DSQ
ALPHAV
PDDL DSQ
ALPHAV +2
# Page 1237
DAD SQRT
DMP SL1R
GAMRP
STODL COSTH # COS(LAT) B-1
ALPHAV +4
STCALL SINTH # SIN(LAT) B-1
ARCTAN
STODL LAT # LAT B0
ALPHAV
STODL COSTH # COS(LONG) B-1
ALPHAV +2
STCALL SINTH # SIN(LONG) B-1
ARCTAN
STODL LONG # LONG. REVS B-0 IN RANGE -1/2 TO 1/2
ALPHAM
DSU # ALT= R-RE METERS B-29
ERADM
STCALL ALT # EXIT WITH ALT METERS B-29
INCORPEX
# Page 1238
# SUBROUTINE TO CONVERT LAT,LONG.ALT AT GIVEN TIME TO RADIUS VECTOR
#
# CALLING SEQUENCE
# L-1 CALL
# L LALOTORV
#
# SUBROUTINES USED
# SETGAMMA, SETRE, RP-TO-R
#
# ERASABLE INIT. REQ.
# AXO, AYO, AZO, TEPHEM SET AT LAUNCH TIME
# LAT -- LATITUDE (REVS B0)
# LONG -- LONGITUDE (REVS B0)
# ALT -- ALTITUDE (METERS) B-29
# MPAC -- TIME (CSECS B-28)
# ERADFLAG =1 TO COMPUTE EARTH RADIUS, =0 FOR FIXED EARTH RADIUS
# LUNAFLAG=0 FOR EARTH, 1 FOR MOON
#
# OUTPUT
# R-VECTOR IN ALPHAV (METERS B-29)
LALOTORV STQ SETPD # LAT,LONG,ALT TO R VECTOR
INCORPEX
0D
STCALL 6D # 6-7D = TIME FOR RP-TO-R
SETGAMMA # GAMMA = B2/A2 FOR EARTH, 1 FOR MOON B-1
DLOAD SIN # COS(LONG)COS(LAT) IN MPAC
LAT # UNIT RP = SIN(LONG)COS(LAT) 2-3D
DMPR PDDL # PD 2 GAMMA*SIN(LAT) 0-1D
GAMRP
LAT # 0-1D = GAMMA*SIN(LAT) B-2
COS PDDL # PD4 2-3D= COS(LAT) B-1 TEMPORARILY
LONG
SIN DMPR # PD 2
PDDL COS # PD 4 2-3D= SIN(LONG)COS(LAT) B-2
LAT
PDDL COS # PD 6 4-5D= COS(LAT) B-1 TEMPORARILY
LONG
DMPR VDEF # PD4 MPAC = COS(LONG)COS(LAT) B-2
UNIT PUSH # 0-5D = UNIT RP FOR RP-TO-R SUBR.
STCALL ALPHAV # ALPHAV +4= SINL FOR SETRE SUBR.
SETRE # RE METERS B-29
DLOAD BOFF # SET MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
ZEROVEC
LUNAFLAG
CALLRPRT
COS # USE COS(0) TO GET NON-ZERO IN MPAC
CALLRPRT CALL
RP-TO-R # EXIT WITH UNIT R VECTOR IN MPAC
STODL ALPHAV
ERADM
# Page 1239
DAD VXSC # (RE + ALT)(UNIT R) METERS B-30
ALT
ALPHAV
VSL1 # R METERS B-29
STCALL ALPHAV # EXIT WITH R IN METERS B-29
INCORPEX
# SUBROUTINE TO COMPUTE EARTH RADIUS
#
# INPUT
# 1/2 SIN LAT IN ALPHAV +4
#
# OUTPUT
# EARTH RADIUS IN ERADM AND MPAC (METERS B-29)
GETERAD DLOAD DSQ
ALPHAV +4 # SIN**2(L)
SL1 BDSU
DP1/2 # COS**2(L)
DMPR BDSU
EE
DP1/2
BDDV SQRT
B2XSC
SR4R
STORE ERADM
RVQ
# THE FOLLOWING CONSTANTS WERE COMPUTED WITH A=6378166, B=6356784 METERS
# B2XSC = B**2 SCALED B-51
# B2/A2 = B**2/A**2 SCALED B-1
# EE = (1-B**2/A**2) SCALED B-0
B2XSC 2DEC .0179450689 # B**2 SCALED B-51
DP1/2 = XUNIT
B2/A2 2DEC .9933064884 B-1 # GAMMA= B**2/A**2 B-1
EE 2DEC 6.6935116 E-3 # (1-B**2/A**2) B-0
ERAD 2DEC 6373338 B-29 # PAD RADIUS
# Page 1240
# ARCTAN SUBROUTINE
#
# CALLING SEQUENCE
# SIN THETA IN SINTH B-1
# COS THETA IN COSTH B-1
# CALL ARCTAN
#
# OUTPUT
# ARCTAN THETA IN MPAC AND THETA B-0 IN RANGE -1/2 TO +1/2
ARCTAN BOV
CLROVFLW
CLROVFLW DLOAD DSQ
SINTH
PDDL DSQ
COSTH
DAD
BZE SQRT
ARCTANXX # ATAN=0/0. SET THETA=0
BDDV BOV
SINTH
ATAN=90
SR1 ASIN
STORE THETA
PDDL BMN
COSTH
NEGCOS
DLOAD RVQ
NEGCOS DLOAD DCOMP
BPL DAD
NEGOUT
DP1/2
ARCTANXX STORE THETA
RVQ
NEGOUT DSU GOTO
DP1/2
ARCTANXX
ATAN=90 DLOAD SIGN
LODP1/4
SINTH
STORE THETA
RVQ
2DZERO = DPZERO
# Page 1241
# ***** SETGAMMA SUBROUTINE *****
# SUBROUTINE TO SET GAMMA FOR THE LAT-LONG AND LALOTORV SUBROUTINES
#
# GAMMA = B**2/A**2 FOR EARTH (B-1)
# GAMMA = 1 FOR MOON (B-1)
#
# CALLING SEQUENCE
# L CALL
# L+1 SETGAMMA
#
# INPUT
# LUNAFLAG=0 FOR EARTH, =1 FOR MOON
#
# OUTPUT
# GAMMA IN GAMRP (B-1)
SETGAMMA DLOAD BOFF # BRANCH FOR EARTH
B2/A2 # EARTH GAMMA
LUNAFLAG
SETGMEX
SLOAD
1B1 # MOON GAMMA
SETGMEX STORE GAMRP
RVQ
GAMRP = 8D
# Page 1242
# ***** SETRE SUBROUTINE *****
# SUBROUTINE TO SET RE (EARTH OR MOON RADIUS)
#
# RE = RM FOR MOON
# RE = RREF FOR FIXED EARTH RADIUS OR COMPUTED RF FOR FISCHER ELLIPSOID
#
# CALLING SEQUENCE
# L CALL
# L+1 SETRE
#
# SUBROUTINES USED
# CETERAD
#
# INPUT
# ERADFLAG = 0 FOR FIXED RE, 1 FOR COMPUTED RE
# ALPHAV +4 = 1/2 SINL IF GETERAD IS CALLED
# LUNAFLAG = 0 FOR EARTH, =1 FOR MOON
#
# OUTPUT
# ERADM = 504RM FOR MOON (METERS B-29)
# ERADM = ERAD OR COMPUTED RE FOR EARTH (METERS B-29)
SETRE STQ DLOAD
SETREX
504RM
BON DLOAD # BRANCH FOR MOON
LUNAFLAG
TSTRLSRM
ERAD
BOFF CALL # ERADFLAG=0 FOR FIXED RE, 1 FOR COMPUTED
ERADFLAG
SETRXX
GETERAD
SETRXX STCALL ERADM # EXIT WITH RE OR RM METERS B-29
SETREX
TSTRLSRM BON VLOAD # ERADFLAG=0, SET R0=RLS
ERADFLAG # =1 R0=RM
SETRXX
RLS
ABVAL SR2R # SCALE FROM B-27 TO B-29
GOTO
SETRXX
SETREX = S2
504RM 2DEC 1738090 B-29 # METERS B-29 (MOON RADIUS)

209
LEM_GEOMETRY.s Normal file
View File

@ -0,0 +1,209 @@
# Copyright: Public domain.
# Filename: LEM_GEOMETRY.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 320-325
# Mod history: 2009-05-16 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 320
BANK 23
SETLOC LEMGEOM
BANK
SBANK= LOWSUPER
EBANK= XSM
# THESE TWO ROUTINES COMPUTE THE ACTUAL STATE VECTOR FOR LM,CSM BY ADDING
# THE CONIC R,V AND THE DEVIATIONS R,V. THE STATE VECTORS ARE CONVERTED TO
# METERS B-29 AND METERS/CSEC B-7 AND STORED APPROPIRATELY IN RN,VN OR
# R-OTHER,V-OTHER FOR DOWNLINK. THE ROUTINES' NAMES ARE SWITCHED IN THE
# OTHER VEHICLE'S COMPUTER.
#
# INPUT
# STATE VECTOR IN TEMPORARY STORAGE AREA
# IF STATE VECTOR IS SCALED POS B27 AND VEL B5
# SET X2 TO +2
# IF STATE VECTOR IS SCALED POS B29 AND VEL B7
# SET X2 TO 0
#
# OUTPUT
# R(T) IN RN, V(T) IN VN, T IN PIPTIME
# OR
# R(T) IN R-OTHER, V(T) IN V-OTHER (T IS DEFINED BY T-OTHER)
COUNT* $$/GEOM
SVDWN2 BOF RVQ # SW=1=AVETOMID DOING W-MATRIX INTEG.
AVEMIDSW
+1
VLOAD VSL*
TDELTAV
0 -7,2
VAD VSL*
RCV
0,2
STOVL RN
TNUV
VSL* VAD
0 -4,2
VCV
VSL*
0,2
STODL VN
TET
STORE PIPTIME
RVQ
# Page 321
SVDWN1 VLOAD VSL*
TDELTAV
0 -7,2
VAD VSL*
RCV
0,2
STOVL R-OTHER
TNUV
VSL* VAD
0 -4,2
VCV
VSL*
0,2
STORE V-OTHER
RVQ
# Page 322
# THE FOLLOWING ROUTINE TAKES A HALF UNIT TARGET VECTOR REFERRED TO NAV BASE COORDINATES AND FINDS BOTH
# GIMBAL ORIENTATIONS AT WHICH THE RR MIGHT SIGHT THE TARGET. THE GIMBAL ANGLES CORRESPONDING TO THE PRESENT MODE
# ARE LEFT IN MODEA AND THOSE WHICH WOULD BE USED AFTER A REMODE IN MODEB. THIS ROUTINE ASSUMES MODE 1 IS TRUNNION
# ANGLE LESS THAN 90 DEGS IN ABS VALUE WITH ARBITRARY SHAFT, WITH A CORRESPONDING DEFINITION FOR MODE 2. MODE
# SELECTION AND LIMIT CHECKING ARE DONE ELSEWHERE.
#
# THE MODE 1 CONFIGURATION IS CALCULATED FROM THE VECTOR AND THEN MODE 2 IS FOUND USING THE RELATIONS
#
# S(2) = 180 + S(1)
# T(2) = 180 - T(1)
#
# THE VECTOR ARRIVES IN MPAC WHERE TRG*SMNG OR *SMNB* WILL HAVE LEFT IT.
RRANGLES STORE 32D
DLOAD DCOMP # SINCE WE WILL FIND THE MODE 1 SHAFT
34D # ANGLE LATER, WE CAN FIND THE MODE 1
SETPD ASIN # TRUNNION BY SIMPLY TAKING THE ARCSIN OF
0 # THE Y COMPONENT, THE ASIN GIVIN AN
PUSH BDSU # ANSWER WHOSE ABS VAL IS LESS THAN 90 DEG.
LODPHALF
STODL 4 # MODE 2 TRUNNION TO 4.
LO6ZEROS
STOVL 34D # UNIT THE PROJECTION OF THE VECTOR
32D # IN THE X-Z PLANE
UNIT BOVB # IF OVERFLOW, TARGET VECTOR IS ALONG Y
LUNDESCH # CALL FOR MANEUVER UNLESS ON LUNAR SURF
STODL 32D # PROJECTION VECTOR.
32D
SR1 STQ
S2
STODL SINTH # USE ARCTRIG SINCE SHAFT COULD BE ARB.
36D
SR1
STCALL COSTH
ARCTRIG
# Page 323
PUSH DAD # MODE 1 SHAFT TO 2.
LODPHALF
STOVL 6
4
RTB # FIND MODE 2 CDU ANGLES.
2V1STO2S
STOVL MODEB
0
RTB # MODE 1 ANGLES TO MODE A.
2V1STO2S
STORE MODEA
EXIT
CS RADMODES # SWAP MODEA AND MODEB IF RR IN MODE 2.
MASK ANTENBIT
CCS A
TCF +4
DXCH MODEA
DXCH MODEB
DXCH MODEA
TC INTPRET
GOTO
S2
# Page 324
# GIVEN RR TRUNNION AND SHAFT (T,S) IN TANGNB,+1, FIND THE ASSOCIATED
# LINE OF SIGHT IN NAV BASE AXES. THE HALF UNIT VECTOR, .5(SIN(S)COS(T),
# -SIN(T),COS(S)COS(T)) IS LEFT IN MPAC AND 32D.
SETLOC INFLIGHT
BANK
COUNT* $$/GEOM
RRNB SLOAD RTB
TANGNB
CDULOGIC
SETPD PUSH # TRUNNION ANGLE TO 0
0
SIN DCOMP
STODL 34D # Y COMPONENT
COS PUSH # .5 COS(T) TO 0
SLOAD RTB
TANGNB +1
CDULOGIC
RRNB1 PUSH COS # SHAFT ANGLE TO 2
DMP SL1
0
STODL 36D # Z COMPONENT
SIN DMP
SL1
STOVL 32D
32D
RVQ
# THIS ENTRY TO RRNB REQUIRES THE TRUNNION AND SHAFT ANGLES IN MPAC AND MPAC +1 RESPECTIVELY
RRNBMPAC STODL 20D # SAVE SHAFT CDU IN 21.
MPAC # SET MODE TO DP. (THE PRECEEDING STORE
# MAY BE DP, TP OR VECTOR.)
RTB SETPD
CDULOGIC
0
PUSH SIN # TRUNNION ANGLE TO 0
DCOMP
STODL 34D # Y COMPONENT
COS PUSH # .5COS(T) TO 0
SLOAD RTB # PICK UP CDU'S.
21D
CDULOGIC
GOTO
RRNB1
# Page 325
# (This page has nothing on it.)

View File

@ -0,0 +1,211 @@
# Copyright: Public domain.
# Filename: LUNAR_AND_SOLAR_EPHEMERIDES_SUBROUTINES.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 785-788
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-12 RSB Adapted from Colossus249 file of the same
# name and Comanche 055 page images.
# 2009-07-26 RSB Added annotations related to computation
# of the ephemeral(?) polynomials.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 785
# LUNAR AND SOLAR EPHEMERIDES SUBROUTINES
#
# FUNCTIONAL DESCRIPTION
#
# THESE SUBROUTINES ARE USED TO DETERMINE THE POSITION AND VELOCITY
# VECTORS OF THE SUN AND THE MOON RELATIVE TO THE EARTH AT THE
# SPECIFIED GROUND ELAPSED TIME INPUT BY THE USER.
#
# THE POSITION OF THE MOON IS STORED IN THE COMPUTER IN THE FORM OF
# A NINTH DEGREE POLYNOMIAL APPROXIMATION WHICH IS VALID OVER A 15
# DAY INTERVAL BEGINNING SHORTLY BEFORE LAUNCH. THEREFORE THE TIME
# INPUT BY THE USER SHOULD FALL WITHIN THIS 15 DAY INTERVAL.
## The 9th-degree polynomial spoken of here is a pad load, meaning
## that it is not actually hardcoded into the software. Additional
## information about calculating the polynomial can be found on the
## <a href="http://nassp.sourceforge.net/wiki/Lunar_Ephemeris_Polynomials">
## <b>Orbiter</b> NASSP wiki</a>, as well as information about calculation
## of the <a href="http://nassp.sourceforge.net/wiki/Solar_Ephemeris">
## solar ephemerides</a>.
#
# LSPOS COMPUTES THE POSITION VECTORS OF THE SUN AND THE MOON.
#
# LUNPOS COMPUTES THE POSITION VECTOR OF THE MOON.
#
# LUNVEL COMPUTES THE VELOCITY VECTOR OF THE MOON.
#
# SOLPOS COMPUTES THE POSITION VECTOR OF THE SUN.
#
# CALLING SEQUENCE
#
# DLOAD CALL
# TIME GROUND ELAPSED TIME
# SUBROUTINE LSPOS OR LUNPOS OR LUNVEL OR SOLPOS
#
# INPUT
#
# 1) SPECIFIED GROUND ELAPSED TIME IN CS x B-28 LOADED IN MPAC.
#
# 2) TIMEMO -- TIME AT THE CENTER OF THE RANGE OVER WHICH THE LUNAR
# POSITION POLYNOMIAL IS VALID IN CS x B-42.
#
# 3) VECOEM -- VECTOR COEFFICIENTS OF THE LUNAR POSITION POLYNOMIAL
# LOADED IN DESCENDING SEQUENCE IN METERS/CS**N x B-2
#
# 4) RESO -- POSITION VECTOR OF THE SUN RELATIVE TO THE EARTH AT
# TIMEMO IN METERS x B-38
#
# 5) VESO -- VELOCITY VECTOR OF THE SUN RELATIVE TO THE EARTH AT
# TIMEMO IN METERS/CS x B-9
#
# 6) OMEGAES -- ANGULAR VELOCITY OF THE VECTOR RESO AT TIMEMO IN
# REV/CS x B+26
#
# ALL EXCEPT THE FIRST INPUT ARE INCLUDED IN THE PRE-LAUNCH
# ERASABLE DATA LOAD.
#
# OUTPUT -- LSPOS
# Page 786
#
# 1) 2D OF VAC AREA CONTAINS THE POSITION VECTOR OF THE SUN RELATIVE
# TO THE EARTH AT TIME INPUT BY THE USER IN METERS x B-38.
#
# 2) MPAC CONTAINS THE POSITION VECTOR OF THE MOON RELATIVE TO THE
# EARTH AT TIME INPUT BY THE USER IN METERS x B-29
#
# OUTPUT -- LUNPOS
#
# MPAC CONTAINS THE POSITION VECTOR OF THE MOON RELATIVE TO THE
# EARTH AT THE TIME INPUT BY USER IN METERS x B-29
#
# OUTPUT -- LUNVEL
#
# MPAC CONTAINS THE VELOCITY VECTOR OF THE MOON RELATIVE TO THE
# EARTH AT THE TIME INPUT BY THE USER IN METERS/CS x B-7
#
# OUTPUT -- SOLPOS
#
# MPAC CONTAINS THE POSITION VECTOR OF THE SUN RELATIVE TO THE EARTH
# AT TIME INPUT BY THE USER IN METERS x B-38.
#
# SUBROUTINES USED
#
# NONE
#
# REMARKS
#
# THE VAC AREA IS USED FOR STORAGE OF INTERMEDIATE AND FINAL RESULTS
# OF COMPUTATIONS.
#
# S1, X1, AND X2 ARE USED BY THESE SUBROUTINES.
#
# PRELAUNCH ERASABLE DATA LOAD ARE ONLY ERASABLE STORAGE USED BY
# THESE SUBROUTINES.
#
# RESTARTS DURING OPERATION OF THESE SUBROUTINES MUST BE HANDLED BY
# THE USER.
BANK 36
SETLOC EPHEM
BANK
COUNT* $$/EPHEM
EBANK= END-E7
LSPOS AXT,2 # COMPUTES POSITION VECTORS OF BOTH THE
RESA # SUN AND THE MOON. THE POSITION VECTOR
AXT,1 GOTO # OF THE SUN IS STORED IN 2D OF THE VAC
RES # AREA. THE POSITION VECTOR OF THE MOON
LSTIME # IS STORED IN MPAC.
LUNPOS AXT,1 GOTO # COMPUTES THE POSITION VECTOR OF THE MOON
REM # AND STORES IT IN MPAC.
LSTIME
# Page 787
LUNVEL AXT,1 GOTO # COMPUTES THE VELOCITY VECTOR OF THE MOON
VEM # AND STORES IT IN MPAC.
LSTIME
SOLPOS STQ AXT,1 # COMPUTES THE POSITION VECTOR OF THE SUN
X2 # AND STORES IT IN MPAC.
RES
LSTIME SETPD SR
0D
14D
TAD DCOMP
TEPHEM
TAD DCOMP
TIMEMO
SL SSP
16D
S1
6D
GOTO
X1
RES PUSH DMP # PD- 2
OMEGAES
PUSH COS # PD- 4
VXSC PDDL # PD- 8
RESO
SIN PDVL # PD-10
RESO
PUSH UNIT # PD-16
VXV UNIT
VESO
VXV VSL1 # PD-10
VXSC VAD # PD-02
VSL1 GOTO # RES IN METERS x B-38 IN MPAC.
X2
RESA STODL 2D # RES IN METERS x B-38 IN 2D OF VAC. PD- 0
REM AXT,1 PDVL # PD- 2
54D
VECOEM
REMA VXSC VAD*
0D
VECOEM +60D,1
TIX,1 VSL2 # REM IN METERS x B-29 IN MPAC.
REMA
RVQ
VEM AXT,1 PDDL # PD- 2
48D
NINEB4
PUSH VXSC # PD- 4
VECOEM
VEMA VXSC
0D
# Page 788
STODL 4D # PD- 2
DSU PUSH # PD- 4
ONEB4
VXSC* VAD
VECOEM +54D,1
4D
TIX,1 VSL2 # VEM IN METERS/CS x B-7 IN MPAC.
VEMA
RVQ
NINEB4 2DEC 9.0 B-4
ONEB4 2DEC 1.0 B-4

View File

@ -1,5 +1,5 @@
# Copyright: Public domain. # Copyright: Public domain.
# Filename: LUNAR_LANDING_GUIDANCE_EQUATIONS.s # Filename: LUNAR_LANDING_GUIDANCE_EQUATIONS.agc
# Purpose: Part of the source code for Luminary 1A build 099. # Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM) # It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11. # Apollo Guidance Computer (AGC), for Apollo 11.
@ -1240,7 +1240,7 @@ DESCBITS MASK BIT7 # COME HERE FROM MARKRUPT CODING WITH BIT
# N N-1 # N N-1
# ROOTPSRS FINDS ONE ROOT OF THE POWER SERIES A X + A X + ... + A X + A # ROOTPSRS FINDS ONE ROOT OF THE POWER SERIES A X + A X + ... + A X + A
# N N-1 1 0 # N N-1 1 0
# USING NETON'S METHOD STARTING WITH AN INITIAL GUESS FOR THE ROOT. THE ENTERING DATA MUST BE AS FOLLOWS: # USING NEWTON'S METHOD STARTING WITH AN INITIAL GUESS FOR THE ROOT. THE ENTERING DATA MUST BE AS FOLLOWS:
# A SP LOC-3 ADRES FOR REFERENCING PWR COF TABL # A SP LOC-3 ADRES FOR REFERENCING PWR COF TABL
# L SP N-1 N IS THE DEGREE OF THE POWER SERIES # L SP N-1 N IS THE DEGREE OF THE POWER SERIES
# MPAC DP X INITIAL GUESS FOR ROOT # MPAC DP X INITIAL GUESS FOR ROOT

View File

@ -0,0 +1,34 @@
# Copyright: Public domain.
# Filename: LUNAR_LANDMARK_SELECTION_FOR_CM.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Jim Lawton <jim.lawton@gmail.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 936
# Mod history: 2009-05-11 JVL Adapted from the Colossus249/ file
# of the same name, using Comanche055 page
# images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 936
# *** END OF TROUBLE .043 ***

168
MAIN.s Normal file
View File

@ -0,0 +1,168 @@
# Copyright: Public domain.
# Filename: MAIN.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC) Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo
# Mod history: 2009-05-05 RSB Adapted from Colossus249/MAIN.agc.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
#
# This file is a little different from the other Comanche055 files I'm providing,
# in that it doesn't represent anything that appears directly in the original source.
# What I (RSB) have done for organizational purposes is to split the huge monolithic
# source code into smaller, more manageable chunks--i.e., into individual source
# files. Those files are rejoined within this file as "includes". It just makes
# it a little easier to work with. The code chunks correspond to natural divisions
# into sub-programs. In fact, these divisions are more-or-less specified by
# the source code itself. Refer to the "SUBROUTINE CALLS" at the
# very beginning of the file ASSEMBLY_AND_OPERATION_INFORMATION.agc.
#
# It may be reasonably asked why tens of thousands of lines of source are joined by
# means of inclusion, rather than simply assembling the source files individually and
# then linking them to form the executable. The answer is that the original
# development team had no linker. The builds were monolithic just like this.
# There was a big emphasis on reusability of the code in the original project,
# apparently, but this reusability took the form of inserting your deck of
# punch-cards at the appropriate position in somebody else's deck of punch-cards.
# (Actually, I think the card-decks were turned into tape libraries, and the modules
# were mixed-and-matched from the tape libraries, but the principle is the same.)
# So, indeed, the method of file-inclusion is a very fair representation of the
# methods used in the original development ... with the improvement, of course,
# that you no longer have to worry about dropping the card deck. On the other hand,
# I wasn't there at the time, so I may have no idea what I'm talking about.
#
# Finally, note that the original Apollo AGC assembler (called "YUL") is no longer
# available (as far as I can tell). Actually, it had already been replaced by another
# assembler (called "GAP") by the time of Apollo 11, but GAP isn't available either.
# The replacement assembler yaYUL accepts a slightly different format for the source
# code from what YUL or GAP accepted, so the source code has been targeted for
# assembly with yaYUL.
# What follows is simply a bunch of file-includes for the individual code chunks.
# I've marked the page numbers to make proof-reading easier. The page images also
# contain a lot of interesting tables (cross-referenced to page numbers) created by GAP,
# but not duplicated by yaYUL, so it's still valuable even if the source-files
# listed below are in hand.
$CONTRACT_AND_APPROVALS.agc # p. 1
$ASSEMBLY_AND_OPERATION_INFORMATION.agc # pp. 2-26
$TAGS_FOR_RELATIVE_SETLOC.agc # pp. 27-35
# p. 36 contains no code.
# COMERASE
$ERASABLE_ASSIGNMENTS.agc # pp. 37-130
# COMAID
$INTERRUPT_LEAD_INS.agc # pp. 131-132
$T4RUPT_PROGRAM.agc # pp. 133-169
$DOWNLINK_LISTS.agc # pp. 170-180
$FRESH_START_AND_RESTART.agc # pp. 181-210
$RESTART_TABLES.agc # pp. 211-221
$SXTMARK.agc # pp. 222-235
$EXTENDED_VERBS.agc # pp. 236-267
$PINBALL_NOUN_TABLES.agc # pp. 268-284
$CSM_GEOMETRY.agc # pp. 285-296
$IMU_COMPENSATION_PACKAGE.agc # pp. 297-306
$PINBALL_GAME_BUTTONS_AND_LIGHTS.agc # pp. 307-389
$R60_62.agc # pp. 390-398
$ANGLFIND.agc # pp. 399-411
$GIMBAL_LOCK_AVOIDANCE.agc # pp. 412-413
$KALCMANU_STEERING.agc # pp. 414-419
$SYSTEM_TEST_STANDARD_LEAD_INS.agc # pp. 420-422
$IMU_CALIBRATION_AND_ALIGNMENT.agc # pp. 423-455
# COMEKISS
$GROUND_TRACKING_DETERMINATION_PROGRAM.agc # pp. 456-459
$P34-35_P74-75.agc # pp. 460-504
$R31.agc # pp. 505-510
$P76.agc # pp. 511-513
$R30.agc # pp. 514-524
$STABLE_ORBIT.agc # pp. 525-532
# TROUBLE
$P11.agc # pp. 533-550
$TPI_SEARCH.agc # pp. 551-561
$P20-P25.agc # pp. 562-634
$P30-P37.agc # pp. 635-648
$P32-P33_P72-P73.agc # pp. 649-683
$P40-P47.agc # pp. 684-736
$P51-P53.agc # pp. 737-784
$LUNAR_AND_SOLAR_EPHEMERIDES_SUBROUTINES.agc # pp. 785-788
$P61-P67.agc # pp. 789-818
$SERVICER207.agc # pp. 819-836
$ENTRY_LEXICON.agc # pp. 837-843
$REENTRY_CONTROL.agc # pp. 844-882
$CM_BODY_ATTITUDE.agc # pp. 883-889
$P37_P70.agc # pp. 890-933
$S-BAND_ANTENNA_FOR_CM.agc # pp. 934-935
$LUNAR_LANDMARK_SELECTION_FOR_CM.agc # pp. 936
# TVCDAPS
$TVCINITIALIZE.agc # pp. 937-944
$TVCEXECUTIVE.agc # pp. 945-950
$TVCMASSPROP.agc # pp. 951-955
$TVCRESTARTS.agc # pp. 956-960
$TVCDAPS.agc # pp. 961-978
$TVCSTROKETEST.agc # pp. 979-983
$TVCROLLDAP.agc # pp. 984-998
$MYSUBS.agc # pp. 999-1001
$RCS-CSM_DIGITAL_AUTOPILOT.agc # pp. 1002-1024
$AUTOMATIC_MANEUVERS.agc # pp. 1025-1036
$RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc # pp. 1037-1038
$JET_SELECTION_LOGIC.agc # pp. 1039-1062
$CM_ENTRY_DIGITAL_AUTOPILOT.agc # pp. 1063-1092
# CHIEFTAN
$DOWN-TELEMETRY_PROGRAM.agc # pp. 1093-1102
$INTER-BANK_COMMUNICATION.agc # pp. 1103-1106
$INTERPRETER.agc # pp. 1107-1199
$FIXED_FIXED_CONSTANT_POOL.agc # pp. 1200-1204
$INTERPRETIVE_CONSTANTS.agc # pp. 1205-1206
$SINGLE_PRECISION_SUBROUTINES.agc # p. 1207
$EXECUTIVE.agc # pp. 1208-1220
$WAITLIST.agc # pp. 1221-1235
$LATITUDE_LONGITUDE_SUBROUTINES.agc # pp. 1236-1242
$PLANETARY_INERTIAL_ORIENTATION.agc # pp. 1243-1251
$MEASUREMENT_INCORPORATION.agc # pp. 1252-1261
$CONIC_SUBROUTINES.agc # pp. 1262-1308
$INTEGRATION_INITIALIZATION.agc # pp. 1309-1333
$ORBITAL_INTEGRATION.agc # pp. 1334-1354
$INFLIGHT_ALIGNMENT_ROUTINES.agc # pp. 1355-1364
$POWERED_FLIGHT_SUBROUTINES.agc # pp. 1365-1372
$TIME_OF_FREE_FALL.agc # pp. 1373-1388
$STAR_TABLES.agc # pp. 1389-1393
$AGC_BLOCK_TWO_SELF-CHECK.agc # pp. 1394-1403
$PHASE_TABLE_MAINTENANCE.agc # pp. 1404-1413
$RESTARTS_ROUTINE.agc # pp. 1414-1419
$IMU_MODE_SWITCHING_ROUTINES.agc # pp. 1420-1448
$KEYRUPT_UPRUPT.agc # pp. 1449-1451
$DISPLAY_INTERFACE_ROUTINES.agc # pp. 1452-1484
$SERVICE_ROUTINES.agc # pp. 1485-1492
$ALARM_AND_ABORT.agc # pp. 1493-1496
$UPDATE_PROGRAM.agc # pp. 1497-1507
$RT8_OP_CODES.agc # pp. 1508-1516
# pp. 1517-1751: GAP-generated tables.

503
MEASUREMENT_INCORPORATION.s Normal file
View File

@ -0,0 +1,503 @@
# Copyright: Public domain.
# Filename: MEASUREMENT_INCORPORATION.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1252-1261
# Mod history: 2009-05-14 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1252
# INCORP1 -- PERFORMS THE SIX DIMENSIONAL STATE VECTOR DEVIATION FOR POSITION
# AND VELOCITY OR THE NINE-DIMENSIONAL DEVIATION OF POSITION, VELOCITY, AND
# RADAR OR LANDMARK BIAS. THE OUTPUT OF THE BVECTOR ROUTINE ALONG WITH THE
# ERROR TRANSITION MATRIX (W) ARE USED AS INPUT TO THE ROUTINE. THE DEVIATION
# IS OBTAINED BY COMPUTING AN ESTIMATED TRACKING MEASUREMENT FROM THE
# CURRENT STATE VECTOR AND COMPARING IT WITH AN ACTUAL TRACKING MEASUREMENT
# AND APPLYING A STATISTICAL WEIGHTING VECTOR.
#
# INPUT
# DMENFLG = 0 (6-DIMENSIONAL BVECTOR), =1 (9-DIMENSIONAL)
# W = ERROR TRANSITION MATRIX 6X6 OR 9X9
# VARIANCE = VARIANCE (SCALAR)
# DELTAQ = MEASURED DEVIATION (SCALAR)
# BVECTOR = 6 OR 9 DIMENSIONAL BVECTOR
#
# OUTPUT
# DELTAX = STATE VECTOR DEVIATIONS 6 OR 9 DIMENSIONAL
# ZI = VECTOR USED FOR THE INCORPORATION 6 OR 9 DIMENSIONAL
# GAMMA = SCALAR
# OMEGA = OMEGA WEIGHTING VECTOR 6 OR 9 DIMENSIONAL
#
# CALLING SEQUENCE
# L CALL INCORP1
#
# NORMAL EXIT
# L+1 OF CALLING SEQUENCE
BANK 37
SETLOC MEASINC
BANK
COUNT* $$/INCOR
EBANK= W
INCORP1 STQ
EGRESS
AXT,1 SSP
54D
S1
18D # IX1 = 54 S1= 18
AXT,2 SSP
18D
S2
6 # IX2 = 18 S2=6
Z123 VLOAD MXV*
BVECTOR # BVECTOR (0)
W +54D,1
STORE ZI +18D,2
VLOAD
BVECTOR +6 # BVECTOR (1)
# Page 1253
MXV* VAD*
W +108D,1
ZI +18D,2
STORE ZI +18D,2
VLOAD
BVECTOR +12D # BVECTOR (2)
MXV* VAD*
W +162D,1
ZI +18D,2 # B(0)*W+B(1)*(W+54)+B(2)*(W+108) FIRST PASS
STORE ZI +18D,2 # ZI THEN Z2 THEN Z3
TIX,1
INCOR1
INCOR1 TIX,2 BON
Z123 # LOOP FOR Z1,Z2,Z3
DMENFLG
INCOR1A
VLOAD
ZEROVECS
STORE ZI +12D
INCOR1A SETPD VLOAD
0
ZI
VSQ RTB
TPMODE
PDVL VSQ
ZI +6
RTB TAD
TPMODE
PDVL VSQ
ZI +12D
RTB TAD
TPMODE
TAD AXT,2
VARIANCE
0
STORE TRIPA # ZI*2 + Z2*2 + Z3*2 + VARIANCE
TLOAD BOV
VARIANCE # CLEAR OVFIND
+1
STORE TEMPVAR # TEMP STORAGE FOR VARIANCE
BZE
INCOR1C
INCOR1B SL2 BOV
INCOR1C
STORE TEMPVAR
INCR,2 GOTO
DEC 1
INCOR1B
INCOR1C TLOAD ROUND
TRIPA
# Page 1254
DMP SQRT
TEMPVAR
SL* TAD
0,2
TRIPA
NORM INCR,2
X2
DEC -2
SXA,2 AXT,2
NORMGAM # NORMALIZATION COUNT -2 FOR GAMMA
162D
BDDV SETPD
DP1/4TH
0
STORE GAMMA
TLOAD NORM
TRIPA
X1
DLOAD PDDL # PD 0-1 = NORM (A)
MPAC
DELTAQ
NORM
S1
XSU,1 SR1
S1
DDV PUSH # PD 0-1 = DELTAQ/A
GOTO
NEWZCOMP
-3 SSP
S2
54D
INCOR2 VLOAD VXM* # COMPUT OMEGA1,2,3
ZI
W +162D,2
PUSH VLOAD
ZI +6
VXM* VAD
W +180D,2
PUSH VLOAD
ZI +12D
VXM* VAD
W +198D,2
PUSH TIX,2 # PD 2-7=OMEGA1, 8-13=OMEGA2, 14-19=OMEGA3
INCOR2
VLOAD STADR
STORE OMEGA +12D
VLOAD STADR
STORE OMEGA +6
VLOAD STADR
STORE OMEGA
# Page 1255
BON VLOAD
DMENFLG
INCOR2AB
ZEROVECS
STORE OMEGA +12D
INCOR2AB AXT,2 SSP
18D
S2
6
INCOR3 VLOAD*
OMEGA +18D,2
VXSC VSL*
0 # DELTAQ/A
0,1
STORE DELTAX +18D,2
TIX,2 VLOAD
INCOR3
DELTAX +6
VSL3
STORE DELTAX +6
GOTO
EGRESS
# Page 1256
# INCORP2 -- INCORPORATES THE COMPUTED STATE VECTOR DEVIATIONS INTO THE
# ESTIMATED STATE VECTOR. THE STATE VECTOR UPDATED MAY BE FOR EITHER THE
# LEM OR THE CSM. DETERMINED BY FLAG VEHUPFLG. (ZERO = LEM) (1 = CSM)
#
# INPUT
# PERMANENT STATE VECTOR FOR EITHER THE LEM OR CSM
# VEHUPFLG = UPDATE VEHICLE C=LEM 1=CSM
# W = ERROR TRANSITION MATRIX
# DELTAX = COMPUTED STATE VECTOR DEVIATIONS
# DMENFLG = SIZE OF W MATRIX (ZERO=6X6) (1=9X9)
# GAMMA = SCALAR FOR INCORPORATION
# ZI = VECTOR USED IN INCORPORATION
# OMEGA = WEIGHTING VECTOR
#
# OUTPUT
# UPDATED PERMANENT STATE VECTOR
#
# CALLING SEQUENCE
# L CALL INCORP2
#
# NORMAL EXIT
# L+1 OF CALLING SEQUENCE
#
SETLOC MEASINC1
BANK
COUNT* $$/INCOR
INCORP2 STQ CALL
EGRESS
INTSTALL
VLOAD VXSC # CALC. GAMMA*OMEGA1,2,3
OMEGA
GAMMA
STOVL OMEGAM1
OMEGA +6
VXSC
GAMMA
STOVL OMEGAM2
OMEGA +12D
VXSC
GAMMA
STORE OMEGAM3
EXIT
CAF 54DD # INITIAL IX 1 SETTING FOR W MATRIX
TS WIXA
TS WIXB
CAF ZERO
TS ZIXA # INITIAL IX 2 SETTING FOR Z COMPONENT
TS ZIXB
FAZA TC PHASCHNG
# Page 1257
OCT 04022
TC UPFLAG
ADRES REINTFLG
FAZA1 CA WIXB # START FIRST PHASE OF INCORP2
TS WIXA # TO UPDATE 6 OR 9 DIM. W MATRIX IN TEMP
CA ZIXB
TS ZIXA
TC INTPRET
LXA,1 LXA,2
WIXA
ZIXA
SSP DLOAD*
S1
6
ZI,2
DCOMP NORM # CALC UPPER 3X9 PARTITION OF W MATRIX
S2
VXSC XCHX,2
OMEGAM1
S2
LXC,2 XAD,2
X2
NORMGAM
VSL* XCHX,2
0,2
S2
VAD*
W +54D,1
STORE HOLDW
DLOAD* DCOMP # CALC MIDDLE 3X9 PARTITION OF W MATRIX
ZI,2
NORM VXSC
S2
OMEGAM2
XCHX,2 LXC,2
S2
X2
XAD,2 VSL*
NORMGAM
0,2
XCHX,2 VAD*
S2
W +108D,1
STORE HOLDW +6
BOFF
DMENFLG # BRANCH IF 6 DIMENSIONAL
FAZB
DLOAD* DCOMP # CALC LOWER 3X9 PARTITION OF W MATRIX
ZI,2
NORM VXSC
# Page 1258
S2
OMEGAM3
XCHX,2 LXC,2
S2
X2
XAD,2 VSL*
NORMGAM
0,2
XCHX,2 VAD*
S2
W +162D,1
STORE HOLDW +12D
FAZB CALL
GRP2PC
EXIT
FAZB1 CA WIXA # START 2ND PHASE OF INCORP2 TO TRANSFER
AD 6DD # TEMP REG TO PERM W MATRIX
TS WIXB
CA ZIXA
AD MINUS2
TS ZIXB
TC INTPRET
LXA,1 SSP
WIXA
S1
6
VLOAD
HOLDW
STORE W +54D,1
VLOAD
HOLDW +6
STORE W +108D,1
BOFF VLOAD
DMENFLG
FAZB5
HOLDW +12D
STORE W +162D,1
FAZB2 TIX,1 GOTO
+2
FAZC # DONE WITH W MATRIX. UPDATE STATE VECTOR
RTB
FAZA
FAZB5 SLOAD DAD
ZIXB
12DD
BHIZ GOTO
FAZC
FAZB2
FAZC CALL
GRP2PC
# Page 1259
VLOAD VAD # START 3RD PHASE OF INCORP2
X789 # 7TH, 8TH, 9TH COMPONENTN OF STATE VECTOR
DELTAX +12D # INCORPORATION FOR X789
STORE TX789
BON RTB
VEHUPFLG
DOCSM
MOVEPLEM
FAZAB BOVB AXT,2
TCDANZIG
0
BOFF AXT,2
MOONTHIS
+2
2
VLOAD VSR*
DELTAX # B27 IF MOON ORBIT, B29 IF EARTH
0 -7,2
VAD BOV
TDELTAV
FAZAB1
STOVL TDELTAV
DELTAX +6 # B5 IF MOON ORBIT, B7 IF EARTH
VSR* VAD
0 -4,2
TNUV
BOV
FAZAB2
STCALL TNUV
FAZAB3
FAZAB1 VLOAD VAD
RCV
DELTAX
STORE RCV
FAZAB2 VLOAD VAD
VCV
DELTAX +6
STORE VCV
SXA,2 CALL
PBODY
RECTIFY
FAZAB3 CALL
GRP2PC
BON RTB
VEHUPFLG
DOCSM1
MOVEALEM
CALL
SVDWN2 # STORE DOWNLINK STATE VECTOR
FAZAB4 CALL
# Page 1260
GRP2PC # PHASE CHANGE
BOFF VLOAD
DMENFLG
FAZAB5 # 6 DIMENSIONAL
TX789 # 9 DIMENSIONAL
STORE X789
FAZAB5 LXA,1 SXA,1
EGRESS
QPRET
EXIT
TC POSTJUMP # EXIT
CADR INTWAKE
DOCSM RTB GOTO
MOVEPCSM
FAZAB
DOCSM1 RTB CALL
MOVEACSM
SVDWN1 # STORE DOWNLINK STATE VECTOR
GOTO
FAZAB4
ZEROD = ZEROVECS
54DD DEC 54
6DD DEC -6
12DD DEC 12
SETLOC MEASINC2
BANK
COUNT* $$/INCOR
NEWZCOMP VLOAD ABVAL
ZI
STOVL NORMZI
ZI +6
ABVAL PUSH
DSU BMN
NORMZI
+3
DLOAD STADR
STORE NORMZI
VLOAD ABVAL
ZI +12D
PUSH DSU
NORMZI
BMN DLOAD
NEWZCMP1
STADR
STCALL NORMZI # LARGEST ABVAL
NEWZCMP1
SETLOC MEASINC3
BANK
# Page 1261
NEWZCMP1 DLOAD SXA,1
NORMZI
NORMZI # SAVE X1
NORM INCR,1
X1
DEC 2
VLOAD VSL*
ZI
0,1
STOVL ZI
ZI +6
VSL*
0,1
STOVL ZI +6
ZI +12D
VSL* SXA,1
0,1
NORMZI +1 # SAVE SHIFT
STORE ZI +12D
LXA,1 XSU,1
NORMGAM
NORMZI +1
XSU,1
NORMZI +1
SXA,1 LXC,1
NORMGAM
NORMZI +1
XAD,1 SETPD
NORMZI
2D
GOTO
INCOR2 -3
NORMZI = 36D

92
MYSUBS.s Normal file
View File

@ -0,0 +1,92 @@
# Copyright: Public domain.
# Filename: MYSUBS.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 999-1001
# Mod history: 2009-05-13 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
# 2009-05-20 RSB Corrections: EBANK= changed from MPAC to KMPAC.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 999
BANK 20
SETLOC MYSUBS
BANK
EBANK= KMPAC
SPCOS1 EQUALS SPCOS
SPSIN1 EQUALS SPSIN
SPCOS2 EQUALS SPCOS
SPSIN2 EQUALS SPSIN
COUNT 21/DAPMS
# ONE AND ONE HALF PRECISION MULTIPLICATION ROUTINE
SMALLMP TS KMPTEMP # A(X+Y)
EXTEND
MP KMPAC +1
TS KMPAC +1 # AY
CAF ZERO
XCH KMPAC
EXTEND
MP KMPTEMP # AX
DAS KMPAC # AX+AY
TC Q
# SUBROUTINE FOR DOUBLE PRECISION ADDITIONS OF ANGLES
# A AND L CONTAIN A DP(1S) ANGLE SCALED BY 180 DEGS TO BE ADDED TO KMPAC.
# RESULT IS PLACED IN KMPAC. TIMING = 6 MCT (22 MCT ON OVERFLOW)
DPADD DAS KMPAC
EXTEND
BZF TSK +1 # NO OVERFLOW
CCS KMPAC
TCF DPADD+ # + OVERFLOW
TCF +2
TCF DPADD- # - OVERFLOW
CCS KMPAC +1
TCF DPADD2+ # UPPER = 0, LOWER +
TCF +2
COM # UPPER = 0, LOWER -
AD POSMAX # LOWER = 0, A = 0
TS KMPAC +1 # CAN NOT OVERFLOW
CA POSMAX # UPPER WAS = 0
TSK TS KMPAC
TC Q
DPADD+ AD NEGMAX # KMPAC GREATER THAN 0
TCF TSK
# Page 1000
DPADD- COM
AD POSMAX # KMPAC LESS THAN 0
TCF TSK
DPADD2+ AD NEGMAX # CAN NOT OVERFLOW
TS KMPAC +1
CA NEGMAX # UPPER WAS = 0
TCF TSK
# Page 1001 (empty page)

949
ORBITAL_INTEGRATION.s Normal file
View File

@ -0,0 +1,949 @@
# Copyright: Public domain.
# Filename: ORBITAL_INTEGRATION.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1334-1354
# Mod history: 2009-05-14 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
# 2009-05-20 RSB Corrections: DAT -> DAD in one place,
# BWM -> BMN, DEFEQCNT -> DIFEQCNT.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1334
# ORBITAL INTEGRATION
# DELETE
BANK 13
SETLOC ORBITAL
BANK
COUNT 11/ORBIT
# DELETE
KEPPREP LXA,2 SETPD
PBODY
0
DLOAD* SQRT # SQRT(MU) (+18 OR +15) 0D PL 2D
MUEARTH,2
PDVL UNIT # PL 8D
RCV
PDDL NORM # NORM R (+29 OR +27 - N1) 2D PL 4D
36D
X1
PDVL
DOT PDDL # F*SQRT(MU) (+7 OR +5) 4D PL 6D
VCV
TAU. # (+28)
DSU NORM
TC
S1
SR1
DDV PDDL
2D
DMP PUSH # FS (+6 +N1-N2) 6D PL 8D
4D
DSQ PDDL # (FS)SQ (+12 +2(N1-N2)) 8D PL 10D
4D
DSQ PDDL* # SSQ/MU (-2 OR +2(N1-N2)) 10D PL 12D
MUEARTH,2
SR3 SR4
PDVL VSQ # PREALIGN MU (+43 OR +37) 12D PL 14D
VCV
DMP BDSU # PL 12D
36D
DDV DMP # PL 10D
2D # -(1/R-ALPHA) (+12 +3N1-2N2)
DMP SL*
DP2/3
0 -3,1 # 10L(1/R-ALPHA) (+13 +2(N1-N2))
XSU,1 DAD # 2(FS)SQ - ETCETERA PL 8D
S1 # X1 = N2-N1
SL* DSU # -FS+2(FS)SQ ETC (+6 +N1-N2) PL 6D
8D,1
DMP DMP
0D
4D
SL* SL*
# Page 1335
8D,1
0,1 # S(-FS(1-2FS)-1/6...) (+17 OR +16)
DAD PDDL # PL 6D
XKEP
DMP SL* # S(+17 OR +16)
0D
1,1
BOVB DAD
TCDANZIG
STADR
STORE XKEPNEW
STQ AXC,1
KEPRTN
DEC 10
BON AXC,1
MOONFLAG
KEPLERN
DEC 2
GOTO
KEPLERN
# Page 1336
FBR3 LXA,1 SSP
DIFEQCNT
S1
DEC -13
DLOAD SR
DT/2
9D
TIX,1 ROUND
+1
PUSH DAD
TC
STODL TAU.
DAD
TET
STCALL TET
KEPPREP
# Page 1337
# AGC ROUTINE TO COMPUTE ACCELERATION COMPONENTS.
ACCOMP LXA,1 LXA,2
PBODY
PBODY
VLOAD
ZEROVEC
STOVL FV
ALPHAV
VSL* VAD
0 -7,2
RCV
STORE BETAV
BOF XCHX,2
DIM0FLAG
+5
DIFEQCNT
STORE VECTAB,2
XCHX,2
DIFEQCNT
VLOAD UNIT
ALPHAV
STODL ALPHAV
36D
STORE ALPHAM
CALL
GAMCOMP
VLOAD SXA,1
BETAV
S2
STODL ALPHAV
BETAM
STORE ALPHAM
BOF DLOAD
MIDFLAG
OBLATE
TET
CALL
LSPOS
AXT,2 LXA,1
2
S2
BOF
MOONFLAG
+3
VCOMP AXT,2
0
STORE BETAV
STOVL RPQV
# Page 1338
2D
STORE RPSV
BOF VLOAD
DIM0FLAG
GETRPSV
ALPHAV
VXSC VSR*
ALPHAM
1,2
VSU XCHX,2
BETAV
DIFEQCNT
STORE VECTAB +6,2
XCHX,2
DIFEQCNT
GETRPSV VLOAD INCR,1
RPQV
4
CLEAR BOF
RPQFLAG
MOONFLAG
+5
VSR VAD
9D
RPSV
STORE RPSV
CALL
GAMCOMP
AXT,2 INCR,1
4
4
VLOAD
RPSV
STCALL BETAV
GAMCOMP
GOTO
OBLATE
GAMCOMP VLOAD VSR1
BETAV
VSQ SETPD
0
NORM ROUND
31D
PDDL NORM # NORMED B SQUARED TO PD LIST
ALPHAM # NORMALIZE (LESS ONE) LENGTH OF ALPHA
32D # SAVING NORM SCALE FACTOR IN X1
SR1 PDVL
BETAV # C(PDL+2) = ALMOST NORMED ALPHA
UNIT
STODL BETAV
# Page 1339
36D
STORE BETAM
NORM BDDV # FORM NORMALIZE QUOTIEN ALPHAM/BETAM
33D
SR1R PUSH # C(PDL+2) = ALMOST NORMALIZE RHO.
DLOAD*
ASCALE,1
STORE S1
XCHX,2 XAD,2
S1
32D
XSU,2 DLOAD
33D
2D
SR* XCHX,2
0 -1,2
S1
PUSH SR1R # RHO/4 TO 4D
PDVL DOT
ALPHAV
BETAV
SL1R BDSU # (RHO/4) - 2(ALPHAV/2.BETAV/2)
PUSH DMPR # TO PDL+6
4
SL1
PUSH DAD
DQUARTER
PUSH SQRT
DMPR PUSH
10D
SL1 DAD
DQUARTER
PDDL DAD # (1/4)+2((Q+1)/4) TO PD+14D
10D
HALFDP
DMPR SL1
8D
DAD DDV
THREE/8
14D
DMPR VXSC
6
BETAV
PDVL VSR3 # (G/2)(C(PD+4))B/2 TO PD+16D
ALPHAV
VAD PUSH # A12 + C(PD+16D) TO PD+16D
DLOAD DMP
0
12D
NORM ROUND
# Page 1340
30D
BDDV DMP*
2
MUEARTH,2
DCOMP VXSC
XCHX,2 XAD,2
S1
S2
XSU,2 XSU,2
30D
31D
BOV # CLEAR OVIND
+1
VSR* XCHX,2
0 -1,2
S1
VAD
FV
STORE FV
BOV RVQ # RETURN IF NO OVERFLOW
+1
GOBAQUE VLOAD ABVAL
TDELTAV
BZE
INT-ABRT
DLOAD SR
H
9D
PUSH BDSU
TC
STODL TAU.
TET
DSU STADR
STCALL TET
KEPPREP
CALL
RECTIFY
SETGO
RPQFLAG
TESTLOOP
INT-ABRT EXIT
TC P00DOO
OCT 00430
# Page 1341
# THE OBLATE ROUTINE COMPUTES THE ACCELERATION DUE TO OBLATENESS. IT USES THE UNIT OF THE VEHICLE
# POSITION VECTOR FOUND IN ALPHAV AND THE DISTANCE TO THE CENTER IN ALPHAM. THIS IS ADDED TO THE SUM OF THE
# DISTURBING ACCELERATIONS IN FV AND THE PROPER DIFEQ STAGE IS CALLED VIA X1.
OBLATE LXA,2 DLOAD
PBODY
ALPHAM
SETPD DSU*
0
RDE,2
BPL BOF # GET URPV
NBRANCH
MOONFLAG
COSPHIE
VLOAD PDDL
ALPHAV
TET
PDDL CALL
3/5
R-TO-RP
STORE URPV
VLOAD VXV
504LM
ZUNIT
VAD VXM
ZUNIT
MMATRIX
UNIT # PROBABLY UNNECESSARY.
COMTERM STORE UZ
DLOAD DMPR
COSPHI/2
3/32
PDDL DSQ # P2/64 TO PD0
COSPHI/2
DMPR DSU
15/16
3/64
PUSH DMPR # P3/32 TO PD2
COSPHI/2
DMP SL1R
7/12
PDDL DMPR
0
2/3
BDSU PUSH # P4/128 TO PD4
DMPR DMPR
COSPHI/2 # BEGIN COMPUTING P5/1024
9/16
PDDL DMPR
2
5/128
# Page 1342
BDSU
DMP*
J4REQ/J3,2
DDV DAD # -3
ALPHAM # (((P5/256)B 2 /R+P4/32) /R+P3/8)ALPHAV
4 # 4 3
DMPR* DDV
2J3RE/J2,2
ALPHAM
DAD VXSC
2
ALPHAV
STODL TVEC
DMP* SR1
J4REQ/J3,2
DDV DAD
ALPHAM
DMPR* SR3
2J3RE/J2,2
DDV DAD
ALPHAM
VXSC VSL1
UZ
BVSU
TVEC
STODL TVEC
ALPHAM
NORM DSQ
X1
DSQ NORM
S1 # 4
PUSH BDDV* # NORMED R TO 0D
J2REQSQ,2
VXSC BOV
TVEC
+1 # (RESET OVERFLOW INDICATOR)
XAD,1 XAD,1
X1
X1
XAD,1 VSL*
S1
0 -22D,1
VAD BOV
FV
GOBAQUE
STCALL FV
QUALITY1
QUALITY3 DSQ # J22 TERM X R**4 IN 2D. SCALED B61
# AS VECTOR.
PUSH DMP # STORE COSPHI**2 SCALED B2 IN 8D.
# Page 1343
5/8 # 5 SCALED B3
PDDL SR2 # PUT 5 COSPHI**2, D5, IN 8D. GET
# COSPHI**2 D2 FROM 8D
DAD BDSU # END UP WITH (1-7 COSPHI**2), B5
8D # ADDING COSPHI**2 B4 SAME AS COSPHI**2
# X 2 D5
D1/32 # 1 SCALED B5
DMP DMP
URPV # X COMPONENT
5/8 # 5 SCALED B3
VXSC VSL5 # AFTER SHIFT, SCALED B5
URPV # VECTOR, B1.
PDDL # VECTOR INTO 8D, 10D, 12D, SCALED B5.
# GET 5 COSPHI**2 OUT OF 8D
DSU DAD
D1/32 # 1 B5
8D # X COMPONENT (SAME AS MULTIPLYING
# BY UNITX)
STODL 8D
URPV # X COMPONENT
DMP DMP
URPV +4 # Z COMPONENT
5/8 # 5 B3 ANSWER B5
SL1 DAD # FROM 12D FOR Z COMPONENT (SL1 GIVES 10
# INSTEAD OF 5 FOR COEFFICIENT)
PDDL NORM # BACK INTO 12D FOR Z COMPONENT
ALPHAM # SCALED B27 FOR MOON
X2
PUSH SLOAD # STORE IN 14D, DESTROYING URPV
# X COMPONENT
E32C31RM
DDV VXSC # IF X2 = 0, DIVISION GIVES B53, VXSC
# out of 8D B5 GIVES B58
VSL* VAD # SHIFT MAKES B61, FOR ADDITION OF
# VECTOR IN 2D
0 -3,2
VSL* V/SC # OPERAND FROM 0D, B108 FOR X1 = 0
0 -27D,1 # FOR X1 = 0, MAKES B88, GIVING B-20
# FOR RESULT.
PDDL PDDL
TET
5/8 # ANY NON-ZERO CONSTANT
LXA,2 CALL # POSITION IN 0D, TIME IN 6D. X2 LEFT
# ALONE.
PBODY
RP-TO-R
VAD BOV # OVERFLOW INDICATOR RESET IN *RP-TO-R*
FV
GOBAQUE
STORE FV
# Page 1344
NBRANCH SLOAD LXA,1
DIFEQCNT
MPAC
DMP CGOTO
-1/12
MPAC
DIFEQTAB
COSPHIE DLOAD
ALPHAV +4
STOVL COSPHI/2
ZUNIT
GOTO
COMTERM
DIFEQTAB CADR DIFEQ+0
CADR DIFEQ+1
CADR DIFEQ+2
TIMESTEP BOF CALL
MIDFLAG
RECTEST # SKIP ORIGIN CHANGE LOGIC
CHKSWTCH
BMN
DOSWITCH
RECTEST VLOAD ABVAL # RECTIFY IF
TDELTAV
BOV
CALLRECT
DSU BPL # 1) EITHER TDELTAV OR TNUV EQUALS OR
3/4 # EXCEEDS 3/4 IN MAGNITUDE
CALLRECT #
DAD SL* # OR
3/4 #
0 -7,2 # 2) ABVAL(TDELTAV) EQUALS OR EXCEEDS
DDV DSU # .01(ABVAL(RCV))
10D
RECRATIO
BPL VLOAD
CALLRECT
TNUV
ABVAL DSU
3/4
BOV
CALLRECT
BMN
INTGRATE
CALLRECT CALL
RECTIFY
INTGRATE VLOAD
TNUV
# Page 1345
STOVL ZV
TDELTAV
STORE YV
CLEAR
JSWITCH
DIFEQ0 VLOAD SSP
YV
DIFEQCNT
0
STODL ALPHAV
DPZERO
STORE H # START H AT ZERO. GOES 0(DELT/2)DELT.
BON GOTO
JSWITCH
DOW..
ACCOMP
CHKSWTCH STQ BOF
ORIGEX
RPQFLAG
RPQOK # MOON POSITION IS AVAILABLE
DLOAD CALL
TET
LUNPOS # GET MOON POSITION
BOF VCOMP
MOONFLAG
+1
STORE RPQV
RPQOK LXA,2 VLOAD # RESTORE X2 AFTER USING LUNPOS
PBODY
TDELTAV # _
VSL* VAD # |RQC|-RSPHERE WHEN OUTSIDE THE SPHERE.
0 -7,2 # _ _ _
RCV # R = RDEVIATION + RCONIC
BOF ABVAL
MOONFLAG
EARSPH
SR2 BDSU # INSIDE
RSPHERE
GOTO
ORIGEX
EARSPH VSU ABVAL # OUTSIDE
RPQV
DSU GOTO
RSPHERE
ORIGEX
DOSWITCH CALL
ORIGCHNG
GOTO
INTGRATE
# Page 1346
ORIGCHNG STQ CALL
ORIGEX
RECTIFY
VLOAD VSL*
RCV
0,2
VSU VSL*
RPQV
2,2
STORE RRECT
STODL RCV
TET
CALL
LUNVEL
BOF VCOMP
MOONFLAG
+1
PDVL VSL*
VCV
0,2
VSU
VSL*
0 +2,2
STORE VRECT
STORE VCV
LXA,2 SXA,2
ORIGEX
QPRET
BON GOTO
MOONFLAG
CLRMOON
SETMOON
# Page 1347
# THE RECTIFY SUBROUTINE IS CALLED BY THE INTEGRATION PROGRAM AND OCCASIONALLY BY THE MEASUREMENT INCORPORATION
# ROUTINES TO ESTABLISH A NEW CONIC.
RECTIFY LXA,2 VLOAD
PBODY
TDELTAV
VSL* VAD
0 -7,2
RCV
STORE RRECT
STOVL RCV
TNUV
VSL* VAD
0 -4,2
VCV
MINIRECT STORE VRECT
STOVL VCV
ZEROVEC
STORE TDELTAV
STODL TNUV
ZEROVEC
STORE TC
STORE XKEP
RVQ
# Page 1348
# THE THREE DIFEQ ROUTINES -- DIFEQ+0, DIFEQ+12, DIFEQ+24 -- ARE ENTERED TO PROCESS THE CONTRIBUTIONS AT THE
# BEGINNING, MIDDLE, AND END OF THE TIMESTEP, RESPECTIVELY. THE UPDATING IS DONE BY THE NYSTROM METHOD.
DIFEQ+0 VLOAD VSR3
FV
STCALL PHIV
DIFEQCOM
DIFEQ+1 VLOAD VSR1
FV
PUSH VAD
PHIV
STOVL PSIV
VSR1 VAD
PHIV
STCALL PHIV
DIFEQCOM
DIFEQ+2 DLOAD DMPR
H
DP2/3
PUSH VXSC
PHIV
VSL1 VAD
ZV
VXSC VAD
H
YV
STOVL YV
FV
VSR3 VAD
PSIV
VXSC VSL1
VAD
ZV
STORE ZV
BOFF CALL
JSWITCH
ENDSTATE
GRP2PC
LXA,2 VLOAD
COLREG
ZV
VSL3 # ADJUST W-POSITION FOR STORAGE
STORE W +54D,2
VLOAD
YV
VSL3 BOV
WMATEND
STORE W,2
CALL
GRP2PC
# Page 1349
LXA,2 SSP
COLREG
S2
0
INCR,2 SXA,2
6
YV
TIX,2 CALL
RELOADSV
GRP2PC
LXA,2 SXA,2
YV
COLREG
NEXTCOL CALL
GRP2PC
LXA,2 VLOAD*
COLREG
W,2
VSR3 # ADJUST W-POSITION FOR INTEGRATION
STORE YV
VLOAD* AXT,1
W +54D,2
0
VSR3 # ADJUST W-VELOCITY FOR INTEGRATION
STCALL ZV
DIFEQ0
ENDSTATE BOV VLOAD
GOBAQUE
ZV
STOVL TNUV
YV
STORE TDELTAV
BON BOFF
MIDAVFLG
CKMID2 # CHECK FOR MID2 BEFORE GOING TO TIMEINC
DIM0FLAG
TESTLOOP
EXIT
TC PHASCHNG
OCT 04022 # PHASE 1
TC UPFLAG # PHASE CHANGE HAS OCCURRED BETWEEN
ADRES REINTFLG # INTSTALL AND INTWAKE
TC INTPRET
SSP
QPRET
AMOVED
BON GOTO
VINTFLAG
# Page 1350
ATOPCSM
ATOPLEM
AMOVED SET SSP
JSWITCH
COLREG
DEC -30
BOFF SSP
D6OR9FLG
NEXTCOL
COLREG
DEC -48
GOTO
NEXTCOL
RELOADSV DLOAD # RELOAD TEMPORARY STATE VECTOR
TDEC # FROM PERMANENT IN CASE OF
STCALL TDEC1
INTEGRV2 # BY STARTING AT INTEGRV2.
DIFEQCOM DLOAD DAD # INCREMENT H AND DIFEQCNT.
DT/2
H
INCR,1 SXA,1
DEC -12
DIFEQCNT # DIFEQCNT SET FOR NEXT ENTRY.
STORE H
VXSC VSR1
FV
VAD VXSC
ZV
H
VAD
YV
STORE ALPHAV
BON GOTO
JSWITCH
DOW..
FBR3
WMATEND CLEAR CLEAR
DIM0FLAG # DON'T INTEGRATE W THIS TIME
ORBWFLAG # INVALIDATE W
CLEAR
RENDWFLG
SET EXIT
STATEFLG # PICK UP STATE VECTOR UPDATE
TC ALARM
OCT 421
TC INTPRET
# Page 1351
GOTO
TESTLOOP # FINISH INTEGRATING STATE VECTOR
# Page 1352
# ORBITAL ROUTINE FOR EXTRAPOLATION OF THE W MATRIX. IT COMPUTES THE SECOND DERIVATIVE OF EACH COLUMN POSITION
# VECTOR OF THE MATRIX AND CALLS THE NYSTROM INTEGRATION ROUTINES TO SOLVE THE DIFFERENTIAL EQUATIONS. THE PROGRAM
# USES A TABLE OF VEHICLE POSITION VECTORS COMPUTED DURING THE INTEGRATION OF THE VEHICLE'S POSITION AND VELOCITY.
DOW.. LXA,2 DLOAD*
PBODY
MUEARTH,2
STCALL BETAM
DOW..1
STORE FV
BOF INCR,1
MIDFLAG
NBRANCH
DEC -6
LXC,2 DLOAD*
PBODY
MUEARTH -2,2
STCALL BETAM
DOW..1
BON VSR6
MOONFLAG
+1
VAD
FV
STCALL FV
NBRANCH
DOW..1 VLOAD VSR4
ALPHAV
PDVL* UNIT
VECTAB,1
PDVL VPROJ
ALPHAV
VXSC VSU
3/4
PDDL NORM
36D
S2
PUSH DSQ
DMP
NORM PDDL
34D
BETAM
SR1 DDV
VXSC
LXA,2 XAD,2
S2
S2
XAD,2 XAD,2
S2
34D
VSL* RVQ
# Page 1353
0 -8D,2
SETLOC ORBITAL1
BANK
3/5 2DEC .6 B-2
THREE/8 2DEC .375
.3D 2DEC .3 B-2
3/64 2DEC 3 B-6
DP1/4 2DEC .25
DQUARTER EQUALS DP1/4
POS1/4 EQUALS DP1/4
3/32 2DEC 3 B-5
15/16 2DEC 15. B-4
3/4 2DEC 3.0 B-2
7/12 2DEC .5833333333
9/16 2DEC 9 B-4
5/128 2DEC 5 B-7
DPZERO EQUALS ZEROVEC
DP2/3 2DEC .6666666667
2/3 EQUALS DP2/3
OCT27 OCT 27
BANK 13
SETLOC ORBITAL2
BANK
# IT IS VITAL THAT THE FOLLOWING CONSTANTS NOT BE SHUFFLED
DEC -11
DEC -2
DEC -9
DEC -6
DEC -2
DEC -2
DEC 0
DEC -12
DEC -9
DEC -4
ASCALE DEC -7
DEC -6
# Page 1354
2DEC* 1.32715445 E16 B-54* # S
2DEC* 4.9027780 E8 B-30* # M
MUEARTH 2DEC* 3.986032 E10 B-36*
2DEC 0
J4REQ/J3 2DEC* .4991607391 E7 B-26*
2DEC -176236.02 B-25
2J3RE/J2 2DEC* -.1355426363 E5 B-27*
2DEC* .3067493316 E18 B-60*
J2REQSQ 2DEC* 1.75501139 E21 B-72*
3J22R2MU 2DEC* 9.20479048 E16 B-58*
5/8 2DEC 5 B-3
-1/12 2DEC -.1
MUM = MUEARTH -2
RECRATIO 2DEC .01
RSPHERE 2DEC 64373.76 E3 B-29
RDM 2DEC 16093.44 E3 B-27
RDE 2DEC 80467.20 E3 B-29
RATT EQUALS 00
VATT EQUALS 6D
TAT EQUALS 12D
RATT1 EQUALS 14D
VATT1 EQUALS 20D
MU(P) EQUALS 26D
TDEC1 EQUALS 32D
URPV EQUALS 14D
COSPHI/2 EQUALS URPV +4
UZ EQUALS 20D
TVEC EQUALS 26D

1056
P-AXIS_RCS_AUTOPILOT.s Normal file

File diff suppressed because it is too large Load Diff

922
P11.s Normal file
View File

@ -0,0 +1,922 @@
# Copyright: Public domain.
# Filename: P11.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 533-550
# Mod history: 2009-05-13 HG Started adapting from the Colossus249/ file
# of the same name, using Comanche055 page
# images 0533.jpg - 0550.jpg.
# 2009-05-20 RSB Corrections: ERTHALT -> EARTHALT,
# STATSW -> SATSW.
# 2009-05-23 RSB At end of RESCALES, corrected TC 0 to TC Q.
# Added an SBANK= prior to a 2CADR.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 533
# EARTH ORBIT INSERTION MONITOR PROGRAM
# *************************************
#
# PROGRAM DESCRIPTION -P11-
#
# MOD NO. 1
# MOD BY ELIASSEN
#
# FUNCTIONAL DESCRIPTION
#
# P11 IS INITIATED BY
#
# A) GYROCOMPASS PRG P02 WHEN LIFTOFF DISCRETE IS RECEIVED OR
# B) BACKUP THRU VERB 75 ENTER
#
# PROGRAM WILL
# 1. ZERO CMC CLOCK AT LIFTOFF (OR UPON RECEIPT OF BACKUP)
# 2. UPDATE TEPHEM TO TIME CMC CLOCK WAS ZEROED
# 3. INITIATE SERVICER AT PREREAD1
# 4. CHANGE MAJOR MODE TO 11
# 5. CLEAR DSKY IN CASE OF V 75
# 6. STORE LIFTOFF IMU-CDU ANGLES FOR ATT. ERROR DISPLAY
# 7. TERMINATE GYROCOMPASSING __ __
# 8. COMPUTE INITIAL VECTORS RN, VN _ _ _
# 9. COMPUTE REFSMMAT FOR PRELAUNCH ALIGNMENT WHERE U ,U ,U ARE
# _ _ X Y Z
# U =(UNIT(-R) LOCAL VERTICAL AT TIME OF LIFTOFF
# _Z _ _
# U =UNIT(A), A=HOR VECTOR AT LAUNCH AZIMUTH
# _X _ _
# U =U * U
# U Z X
# 10. SET REFSMMAT KNOWN FLAG
# 11. SET AVGEXIT IN SERVICER TO VHHDOT TO
# COMPUTE AND DISPLAY NOUN 62 EVERY 2 SECONDS
#
# R1 V1 -- INERTIAL VELOCITY MAGNITUDE IN FPS
# R2 HDOT -- RATE OF CHANGE OF VEHICLE VEL IN FPS
# R3 H -- VEHICLE ALTITUDE ABOVE PAD IN NM
#
# 12. DISPLAY BODY AXES ATT. ERRORS ON FDAI NEEDLES
#
# A) FROM L.O. TO RPSTART (APPROX. 0 TO +10SECS AFTER L.O.)
# DESIRED ATTITUDE IS AS STORED AT L.O.
# B) FROM RPSTART TO POLYSTOP (APPROX. +10 TO +133SECS AFTER LO)
# DESIRED ATTITUDE IS SPECIFIED BY CMC PITCH AND ROLL
# POLYNOMIALS DURING SATURN ROLLOUT AND PITCHOVER
# Page 534
# THE DISPLAY IS RUN AS LOW PRIORITY JOB APPROX.
# EVERY 1/2 SEC OR LESS AND IS DISABLED UPON OVFLO OF TIME1
#
# SUBROUTINES CALLED
#
# 2PHSCHNG BANKCALL CALCGRA CDUTRIG CLEANDSP DANZIG
# DELAYJOB EARTHR ENDOFJOB FINDVAC IBNKCALL
# INTPRET LALOTORV NEEDLER NEWMODEX PHASCHNG
# POSTJUMP POWRSERS PREREAD1 REGODSPR S11.1
# SERVEXIT TASKOVER TCDANZIG V1STO2S WAITLIST
#
# ASTRONAUT REQUESTS (IF ALTITUDE ABOVE 300,000 FT)
#
# DSKY --
# MONITOR DISPLAY OF TIME TO PERIGEE R1 HOURS
# R2 MINUTES
#
# DSKY --
# MONITOR DISPLAY OF R1 APOGEE ALTITUDE IN NAUTICAL MILES
# R2 PERIGEE ALTITUDE IN NAUTICAL MILES
# R3 TFF IN MINUTES/SECS
#
# IF ASTRONAUT HAS REQUESTED ANY OF THESE DISPLAYS HE MUST
# HIT PROCEED TO RETURN TO NORMAL NOUN 62 DISPLAY.
# NORMAL EXIT MODE
#
# ASTRONAUT VERB 37 ENTER 00 ENTER
#
# ALARM MODES -- NONE
#
# ABORT EXIT MODES --
#
# OUTPUT
#
# TLIFTOFF (DP) TEPHEM (TP)
# REFSMMAT
# DSKY DISPLAY
# FDAI DISPLAY
#
# ERASABLE INITIALIZATION
#
# AZO, AXO, -AYO
# LATITUDE
# PADLONG
# TEPHEM
# PGNCSALT
# POLYNUM THRU POLYNUM +14D
# RPSTART
# POLYSTOP
# FLAGS SET OR RESET
# Page 535
# SET REFSMFLG
# SET DVMON IDLE FLAG
# CLEAR ERADFLAG
#
# DEBRIS
#
# LIFTTEMP
# POLYNUM THRU POLYNUM +7
# SPOLYARG
# BODY1, BODY2, BODY3
# VMAG2, ALTI, HDOT
# CENTRALS, CORE SET, AND VAC AREAS
COUNT 34/P11
BITS5-6 = SUPER011
BANK 42
SETLOC P11ONE
BANK
EBANK= TEPHEM
P11 CA EBANK3
TS EBANK
EXTEND
DCA REP11S # DIRECT RESTARTS TO REP11
DXCH -PHASE3
CS ZERO
ZL
TS LIFTTEMP
DXCH -PHASE5 # INACTIVE GROUP 5, PRELAUNCH PROTECTION
P11+7 EXTEND
DCA REP11SA
DXCH TLIFTOFF
EXTEND
DCA TIME2
DXCH LIFTTEMP # FORE RESTARTS
CA ZERO
ZL
DXCH TIME2
REP11A-2 DXCH TLIFTOFF
REP11A-1 DXCH -PHASE3 # RESET PHASE
REP11A INHINT
EXTEND
DCA TEPHEM +1
DXCH TEPHEM1 +1
CA TEPHEM
# Page 536
XCH TEPHEM1
EXTEND
DCA TLIFTOFF
DAS TEPHEM1 +1
ADS TEPHEM1 # CORRECT FOR OVERFLOW
TC PHASCHNG
OCT 05023
OCT 22000
INHINT
EXTEND
DCA TEPHEM1
DXCH TEPHEM
CA TEPHEM1 +2
XCH TEPHEM +2
CAF EBDVCNT
TS EBANK
EBANK= DVCNTR
TC IBNKCALL
CADR PREREAD1 # ZERO PIPS AND INITIALIZE AVERAGEG
TC PHASCHNG
OCT 05023 # CONTINUE HERE ON RESTART
OCT 22000
CAF .5SEC # START ATT ERROR DISPLAY
TC WAITLIST # IN .5 SEC
EBANK= BODY3
2CADR ATERTASK
TC NEWMODEX # DISPLAY MM 11
MM 11
TC UPFLAG
ADRES NODOP01
CA POWDNCOD # SWITCH TO POWERED FLIGHT DOWNLIST
TS DNLSTCOD
TC BANKCALL
CADR CLEANDSP # CLEAR DSKY IN CASE OF V75
TC 2PHSCHNG
OCT 40514 # PROTECT ATERTASK
OCT 00073
CAF EBQPLACE
# Page 537
TS EBANK
EBANK= QPLACES
CA P11XIT # SET EXIT FROM PROUT IN EARTHR
TS QPLACES
TC INTPRET
VLOAD MXV
THETAN
XSM
VSL1 VAD
ERCOMP
STODL ERCOMP
TLIFTOFF
SSP GOTO
S2
CADR PROUT # RETURN FROM EARTHR
EARTHR +3
MATRXJOB ZL # STORE DP GIMBAL ANGLES FOR ATTITUDE
CA CDUX # ERROR DISPLAY AFTER LIFTOFF
DXCH OGC
ZL
CA CDUY
DXCH IGC
ZL
CA CDUZ
DXCH MGC
TC INTPRET _
VLOAD VSR1 # SCALE OGC B-1
OGC
STORE OGC
SSP # ZERO RTX2
RTX2 # FOR
0 # EARTH
DLOAD PDDL
PGNCSALT # ALTITUDE OF PGNCS
PADLONG # LONGITUDE
PDDL VDEF
LATITUDE # GEODETIC LATITUDE
STODL LAT # LAT,LONG,ALT ARE CONSECUTIVE
HI6ZEROS # TIME = 0
CLEAR CALL
ERADFLAG
LALOTORV # CONVERT TO POSITION VECTOR IN REF. COORDS.
STCALL RN1 # _
GETDOWN # RETURN WITH VECTOR FOR DOWN DIRECTION
VCOMP UNIT
STOVL REFSMMAT +12D # UNITZ = UNIT(GRAV)
RN1
VXV VXSC
# Page 538
UNITW # SCALED AT 1
-ERTHRAT # V = EARTHRATE X R
VSL4 # SCALE TO 2(7) M/CS
STOVL VN1
REFSMMAT +12D
VXV UNIT
UNITW # (REF3 X UNITW) = EAST
PUSH VXV
REFSMMAT +12D # (EAST X REF3) = -SOUTH
UNIT PDDL
LAUNCHAZ # COS(AZ)*SOUTH
COS VXSC
STADR
STODL REFSMMAT # TEMPORARY STORAGE
LAUNCHAZ
SIN VXSC # SIN(AZ)*EAST
VAD UNIT # SIN(AZ)*EAST - COS(AZ)*SOUTH = REF1
REFSMMAT
STORE REFSMMAT
VXV UNIT # (REF1 X REF3) = -REF3
REFSMMAT +12D
VCOMP
STORE REFSMMAT +6
DLOAD DSU
DPHALF # 1/2 REV
LAUNCHAZ
DAD PDDL
AZIMUTH
SATRLRT # SET SATRLRT = -SATRLRT IF
SIGN STADR # (1/2REV -LAVNCHAZ +AZIMUTH) IS NEGATIVE
STORE SATRLRT # FOR ROLL CALC IN FDAI ATT. ERROR DISPLAY
SET EXIT
REFSMFLG # SET REFSMMAT KNOWN FLAG
TC PHASCHNG
OCT 04023
EXTEND
DCA P11SCADR
DXCH AVGEXIT # SET AVGEXIT
CA PRIO31 # 2 SECONDS AT 2(+8)
TS 1/PIPADT
EBANK= RCSFLAGS
CA EBANK6
TS EBANK
INHINT
# Page 539
CS ZERO
TS TBASE5 # RESTART READACCS 2 SECONDS AFTER LIFTOFF
CS TIME1
AD 2SECS # DO READACCS 2 SECONDS AFTER LIFTOFF
CCS A # CHECK TO INSURE DT IS POSITIVE
TCF +3 # TIME POSITIVE
TCF +2 # CANNOT GET HERE
CA ZERO # TIME NEGATIVE -- SET TO 1
AD ONE # RESTORE TIME -- OR MAKE POSITIVE
TC WAITLIST
EBANK= AOG
2CADR READACCS
TC 2PHSCHNG
OCT 00003 # TURN OFF GROUP 3
OCT 00025 # PROTECT NORMLIZE AND READACCS
TC POSTJUMP
CADR NORMLIZE # DO NORMLIZE AND ENDOFJOB
EBANK= TEPHEM
REP11 INHINT
CCS PHASE5
TC ENDOFJOB
CCS LIFTTEMP
TCF +4
TCF +3
TCF +2
TCF P11+7
CS TLIFTOFF
EXTEND
BZMF ENDREP11
CCS TIME2 # ** TIME2 MUST BE NON-ZERO AT LIFTOFF **
TCF REP11A -5 # T2,T1 NOT YET ZEROED, GO AND DO IT
EXTEND # T2,T1 ZEROED, SET TLIFTOFF
DCA LIFTTEMP
TCF REP11A-2
ENDREP11 EXTEND
DCA REP11SA
TCF REP11A-1
#Page 540
REP11S 2OCT 7776600011
REP11SA 2OCT 7776400013
P11XIT GENADR P11OUT
-ERTHRAT 2DEC* -7.292115138 E-7 B18* # - EARTH RATE AT 2(18)
EBANK= BODY3
P11SCADR 2CADR VHHDOT
POWDNCOD EQUALS THREE
EBANK= BODY3
# VHHDOT IS EXECUTED EVERY 2 SECONDS TO DISPLAY ON DSKY
# VI INERTIAL VELOCITY MAGNITUDE
# HDOT RATE OF CHANGE OF ALT ABOVE L PAD RADIUS
# H ALTITUDE ABOVE L PAD RADIUS
VHHDOT TC INTPRET
CALL # LOAD VMAGI, ALTI,
S11.1 # HDOT FOR DISPLAY
EXIT
TC PHASCHNG
OCT 00035
CAF V06N62 # DISPLAY IN R1 R2 R3
TC BANKCALL # VI HDOT H
CADR REGODSP
ATERTASK CAF PRIO1 # ESTABLISH JOB TO DISPLAY ATT ERRORS
TC FINDVAC # COMES HERE AT L.O. + .33 SEC
EBANK= BODY3
2CADR ATERJOB
CS RCSFLAGS # SET BIT3 FOR
MASK BIT3 # NEEDLER
ADS RCSFLAGS # INITIALIZATION PASS
TC IBNKCALL # AND GO
CADR NEEDLER # DO IT
CA BIT1 # SET SW
TS SATSW # FOR DISPLAY
TC TASKOVER
GETDOWN STQ SETPD
INCORPEX
0D
DLOAD
HI6ZEROS
#Page 541
STODL 6D
DPHALF
STCALL 8D
LALOTORV +5
# THIS SECTION PROVIDES ATTITUDE ERROR DISPLAYS TO THE FDAI DURING SONE BOOST
#
# COMPUTE DESIRED PITCH W.R.T. PAD LOCAL VERTICAL AT LIFTOFF
# 2 3 4 5 6
# PITCH = A0+A1T+A2T +A3T +A4T +A5T +A6T
# SCALED TO 32 REVS. -14
# IF TL = TIME IN SECS FROM L.O., THEN T = 100(TL-RPSTART0)2
# WHERE TL GE RPSTART
# TL LE (-POLYSTOP + RPSTART)
# COMPUTE DESIRED ROLL WEHRE ROLL EQUALS ANGLE FROM
# LAUNCHAZ TO -Z(S/C) AS SEEN FROM X(S/C).
# ROLL = LAUNCHAZ-AZIMUTH-.5+SATRLRT*T IN REV
# SATRLRT = RATE OF ROLL IN REV/CENTI-SEC
# T, IN CENTI-SEC, IS DEFINED AS ABOVE, INCLUSIVE OF TIME RESTRICTIONS
#
# FOR SIMPLICITY, LET P = 2*PI*PITCH
# R = 2*PI*ROLL
#
# CONSTRUCT THE TRANSFORMATION MATRIX, TSMV, GIVING DESIRED S/C AXES IN
# TERMS OF SM COORDINATES. LET THE RESULTING ROWS EQUAL THE VECTORS XDC,
# YDC, AND ZDC.
#
# * ( SIN(P) 0 -COS(P) ) (XDC)
# TSMV = (-SIN(R)*COS(P) -COS(R) -SIN(R)*SIN(P)) = (YDC)
# (-COS(R)*COS(P) SIN(R) -COS(R)*SIN(P)) (ZDC)
#
# XDC,YDC,ZDC ARE USED AS INPUT TO CALCGTA FOR THE EXTRACTION OF THE
# EULER SET OF ANGLES WHICH WILL BRING THE SM INTO THE DESIRED
# ORIENTATION. THIS EULER SET, OGC, IGC, AND MGC, MAY BE IDENTIFIED
# AS THE DESIRED CDU ANGLES.
#
# (XDC) (OGC)
# (YDC) ---) CALCGTA ---) (IGC)
# (ZDC) (MGC)
# _
# DEFINE THE VECTOR DELTACDU.
#
# _ (OGC) (CDUX)
# DELTACDU = (IGC) - (CDUY)
# (MGC) (CDUZ)
# _ _ * _
# COMPUTE ATTITUDE ERRORS, A, WHERE A = TGSC*DELTACDU
#
# * (1 SIN(CDUZ) 0 ) THE GIMBAL ANGLES
#Page 542
# TGSC = (0 COS(CDUX)*COS(CDUZ) SIN(CDUX)) = TO SPACECRAFT AXES
# (0 -SIN(CDUX)*COS(CDUZ) COS(CDUX)) CONVERSION MATRIX
# _
# THE ATTITUDE ERRORS, A, ARE STORED ONE HALF SINGLE PRECISION IN
# THE REGISTERS AK, AK1, AK2 AS INPUT TO NEEDLER, THE FDAI ATTITUDE
# ERROR DISPLAY ROUTINE.
ATERJOB CAE FLAGWRD6 # CHECK FLAGWRD6
MASK OCT60000 # BITS 14, 15
EXTEND
BZF +2 # OK -- CONTINUE
TC ENDOFJOB # STAURN STICK ON -- KILL JOB
CAF BIT10 # CHECK IF S/C CONTROL
EXTEND # OF SATURN PANEL
RAND CHAN30 # SWITCH IS ON
EXTEND
BZF STRSAT # IT IS -- GO STEER
CCS SATSW # IT IS NOT -- WAS IT ON LAST CYCLE
TC ATTDISP # NO -- CONTINUE
TC ATRESET # YES -- REINITIALIZE NEEDLER
TC ATRESET # YES -- REINITIALIZE NEEDLER
ATTDISP CS RPSTART # PITCH/ROLL START TIME
AD TIME1
EXTEND
BZMF NOPOLY # IF MINUS THEN ATTITUDE HOLD
TS MPAC # MPAC = TIME1 - RPSTART
TS SPOLYARG # SAVE FOR USE IN ROLL CALCULATION
AD POLYSTOP # NEG PITCHOVER TIME IN CSECS
EXTEND
BZMF +2
TC NOPOLY # GO TO ATTITUDE HOLD
CA TIME2
EXTEND
BZMF +2
TC NOPOLY # GO TO ATTITUDE HOLD
CAE POLYNUM
TS L
CAF COEFPOLY # EVALUATE PITCH POLYNOMIAL
TC POWRSERS # SCALED TO 32 REVOLUTIONS
CA ZERO # RETURN WITH PITCH(32REV)
TS MODE # STORED MPAC, MPAC +1
TC INTPRET
SETPD SL # 32(PITCH(32REV)) = PITCH(REV)
0
5
PUSH # LET P(RAD) = 2*PI*PITCH(REV)
GOTO
ATTDISP1 # AROUND SETLOC
#Page 543
# *
# CONSTRUCT SM TO S/C MATRIX, TSMV
SETLOC P11TWO
BANK # 36 IN COL., 34 IN DISK
COUNT 36/P11
ATTDISP1 COS DCOMP
STODL 14D # -.5*COS(P)
SIN
STODL 10D # .5*SIN(P)
ZEROVECS
STORE 12D # 0
# EVALUATE ROLL = LAUNCHAZ-AZIMUTH-.5+SATRLRT*T
SLOAD DMP
SPOLYARG # TIME1 - RSPSTART, CSECS B-14.
SATRLRT
SL DSU
14D
DPHALF
DAD DSU # ASSUMING X(SM) ALONG LAUNCH AZIMUTH,
LAUNCHAZ # LAUNCHAZ = ANGLE FROM NORTH TO X(SM).
AZIMUTH # AZIMUTH = -ANGLE FROM NORTH TO Z(S/C)
RTB # DETERMINE IF ROLLOUT
RLTST # IS COMPLETED
ATTDISPR PUSH COS # CONTINUE COMPUTING TSMV
PUSH # LET R(RAD) = 2*PI*ROLL(REV)
DMP SL1
14D
STODL 22D # -.5*COS(R)*COS(P)
DCOMP
STORE 18D # -.5*COS(R)
DMP SL1
10D
STODL 26D # -.5*COS(R)*SIN(P)
SIN PUSH
STORE 24D # .5*SIN(R)
DMP SL1
14D
STODL 16D # -.5*SIN(R)*COS(P)
DCOMP
DMP SL1
10D
STOVL 20D # -.5*SIN(R)*SIN(P)
10D
# FROM TSMV FIND THE HALF UNIT VECTORS XDC,YDC,ZDC = INPUT TO CALCGTA
# Page 544
UNIT
STOVL XDC # XDC = .5*UNIT(SIN(P),0,-COS(P))
16D
UNIT
STOVL YDC # YDC = .5*UNIT(-SIN(R)*COS(P),-COS(R),
22D # -SIN(R)*SIN(P))
UNIT
STCALL ZDC # ZDC = .5*UNIT(-COS(R)*COS(P),SIN(R),
CALCGTA # -COS(R)*SIN(P))
# CALL CALCGTA TO COMPUTE DESIRED SM ORIENTATION OGC,IGC, AND MGC
# _ _ _
# FIND DIFFERENCE VECTOR DELTACDU = OGC-CDUX
#
# ENTER HERE IF ATTITUDE HOLD
NOPOLYM VLOAD PUSH # OGC IGC
OGC # CHANGE IGC TO MGC FOR COMPATIBILITY
PUSH CALL # MGC OGC
CDUTRIG # WITH Y,Z,X ORDER OF CDUSPOT
VLOAD RTB # _ DPHI OGC-CDUX , PD4
2 # DELTACDU = DTHETA = IGC-CDUY , 0
V1STO2S # DPSI MGC-CDUZ , 2
STOVL BOOSTEMP
ZEROVECS
STOVL 0
CDUSPOT
RTB RTB
V1STO2S
DELSTOR
STODL 10D
SINCDUZ
DMP SL1
0
DAD SR2 # CHANGE SCALE OF AK TO 2REVS
4
GOTO
ATTDISP2
SETLOC P11ONE
BANK
COUNT 34/P11
ATTDISP2 STODL 16D # 16D, .5(DPHI + DTHETA*SIN(CDUZ))
COSCDUZ
DMP PUSH
0
DMP SL1
COSCDUX
PDDL DMP
# Page 545
SINCDUX
2
DAD SL1
STADR
STODL 17D # 17D, .5(DTHETA*COS(CDUX)*COS(CDUZ)
DMP SL1 # +DPSI*SIN(CDUX))
SINCDUX
PDDL DMP
COSCDUX
2
DSU SL1
STADR
STORE 18D # 18D, .5(-DTHETA*SIN(CDUX)*COS(CDUZ)
TLOAD # +DPSI*COS(CDUX))
16D
STORE AK # STORE ATTITUDE ERRORS IN AK,AK1,AK2
EXIT
CA SATSW
CCS A # CHK TAKEOVER STATUS
TC SATOUT # POS -- DISPLAY ONLY
TC AKLOAD # 0 STORE BIAS
STEERSAT TC INTPRET # NEG STEER L/V
TLOAD TAD
BIASAK
AK
STORE AK # AKS = AKS - STORED BIAS
EXIT
CA AK
TC RESCALES
TS AK
CA AK1
TC RESCALES
TS AK1
CA AK2
TC RESCALES
TS AK2
# DISPLAY ATTITUDE ERRORS ON FDAI VIA NEEDLER
SATOUT TC BANKCALL
CADR NEEDLER
ATERSET CAF OCT31 # DELAY .25 SEC
TC BANKCALL # EXECUTION + DELAY = .56SEC APPROX
CADR DELAYJOB
TC ATERJOB # END OF ATT ERROR DISPLAY CYCLE
AKLOAD CS AK # STORE AKS
TS BIASAK # INTO BIAS
CS AK1 # COMPLEMENTED
TS BIASAK +1
# Page 546
CS AK2
TS BIASAK +2
CS BIT1 # SET SW
TS SATSW # TO STEER
TC STEERSAT # GO STEER
STRSAT CA SATSW # CHECK IF NEDLER
EXTEND # HAS BEEN INITIALIZED
BZMF ATTDISP # YES -- CONTINUE
ATRESET CS RCSFLAGS # NO -- SET
MASK BIT3 # INITIALIZATION SW
ADS RCSFLAGS # FOR NEDLER
TC BANKCALL # AND GO
CADR NEEDLER # DO IT
CAF REVCNT # OCT 6
TC BANKCALL # DELAY JOB
CADR DELAYJOB # 60 MS --WAIT TILL IMUERRCNTR ZEROED
CCS SATSW # CHECK SW STATUS
TC TAKEON # POS STEER INIT.
TC +1 # 0 RETURN TO DISPLAY
CA BIT1 # NEG RETURN TO DISPLAY
TS SATSW # SW = DISPLAY ON
CS BIT9 # DISABLE
EXTEND # SIVB
WAND CHAN12 # TAKEOVER
TC SATOUT # DISPLAY
TAKEON CAF BIT9 # ENABLE
EXTEND # SIVB
WOR CHAN12 # TAKEOVER
CA ZERO # INDICATE NEEDLER
TS SATSW # WAS INITIALIZED
TC SATOUT
S11.1 VLOAD ABVAL
VN
STOVL VMAGI # VI SCALED 2(7) IN METERS/CSEC
RN
UNIT DOT
VN
SL1
STODL HDOT
RPAD
BOF VLOAD
AMOONFLG
EARTHALT
RLS
ABVAL SR2
EARTHALT BDSU
36D
STORE ALTI
RVQ
DELSTOR CA BOOSTEMP
# Page 547
EXTEND # STORE DELTACDU INTO PDL 0,2,4
MSU MPAC
INDEX FIXLOC
TS 0
CA BOOSTEMP +1
EXTEND
MSU MPAC +1
INDEX FIXLOC
TS 2
CA BOOSTEMP +2
EXTEND
MSU MPAC +2
INDEX FIXLOC
TS 4
TCF DANZIG
RLTST CA MPAC # DETERMINE IF ROLLOUT
EXTEND # IS COMPLETED
MP SATRLRT +1
EXTEND
BZMF DANZIG # UNLIKE SIGNS STILL ROLLING
EXTEND # ROLLOUT COMPLETED
DCA MBDYTCTL +2 # ZERO OUT ROLL CONTRIBUTION
DXCH MPAC
TC DANZIG
NOPOLY TC INTPRET # COMES HERE IF
SETPD GOTO # ATTITUDE HOLD
0
NOPOLYM
COEFPOLY ADRES POLYLOC
V06N62 VN 0662
RESCALES EXTEND # RESCALE AK S FOR
MP SATSCALE # NEW HARDWARE
DDOUBL # SCALING FOR
DDOUBL # STEERING
TC Q # SATURN
# SATURN TAKEOVER FUNCTION
# ************************
#
# PROGRAM DESCRIPTION
#
# MOD NUMBER 1
# MOD BY ELIASSEN
#
# FUNCTIONAL DESCRIPTION
#
# DURING THE COASTING PHASE OF SIVB ATTACHED, THE
# ASTRONAUT MAY REQUEST SATURN TAKEOVER THROUGH
# EXTENDED VERB 46 (BITS 13,14 OF DAPDATR1 SET ).
# THE CMC REGARDS RHC COMMANDS AS BODY-AXES RATE
# COMMANDS AND IT TRANSMITS THESE TO SATURN AS DC
#Page 548
# VOLTAGES. THE VALUE OF THE CONSTANT RATE COMMAND
# IS 0.5 DEG/SEC. AN ABSENCE OF RHC ACTIVITY RE-
# SULTS IN A ZERO RATE COMMAND.
#
# THE FDAI ERROR NEEDLES WILL INDICATE THE VALUE
# OF THE RATE COMMAND.
#
# CALLING SEQUENCE
#
# DAPFIG +9D TC POSTJUMP
# CADR SATSTKON
#
# SUBROUTINES CALLED
#
# ENDEXT
# IBNKCALL
# STICKCHK
# NEEDLER
# T5RUPT
# RESUME
#
# ASTRONAUT REQUESTS
#
# ENTRY -- VERB 46 ENTER
# (CONDITION -- BITS 13, 14 OF DAPDATR1 SET)
#
# EXIT -- VERB 48 ENTER (FLASH V06N46)
# VERB 21 ENTER AXXXX ENTER WHERE A=0 OR 1
# VERB 34 ENTER
# VERB 46 ENTER
#
# NORMAL EXIT MODE
#
# VERB 46 ENTER (SEE ASTRONAUT ABOVE)
#
# ALARM OR ABORT EXIT MODES
#
# NONE
#
# OUTPUT
#
# SATURN RATES IN CDUXCMD, CDUYCMD, CDUZCMD
#
# ERASABLE INITIALIZATION
#
# DAPDATR1 (BITS 13, 14 MUST BE SET)
#
# DEBRIS
#
# CENTRALS
#Page 549
# CDUXCMD, CDUYCMD, CDUZCMD
BANK 43
SETLOC EXTVERBS
BANK
COUNT 23/STTKE
SATSTKON EXTEND
DCA 2REDOSAT
INHINT
DXCH T5LOC
CAF POSMAX
TS TIME5
CS FLAGWRD6 # TURN ON BITS 15,14 OF
MASK RELTAB11 # FLAGWRD6
ADS FLAGWRD6 # SATSTICK CONTROL OF T5
TC IBNKCALL # ZERO JET CHANNELS IN 14 MS AND THEN
CADR ZEROJET # LEAVE THE T6 CLOCK DISABLED
RELINT
TC GOPIN # EXIT THUS BECAUSE WE CAME VIA V46
SBANK= PINSUPER # Added RSB 2009
EBANK= BODY3
2REDOSAT 2CADR REDOSAT
SBANK= LOWSUPER
BANK 32
SETLOC P11FOUR
BANK
REDOSAT LXCH BANKRUPT # ALSO COMES HERE FOR RESTARTS
EXTEND
QXCH QRUPT
CS RCSFLAGS # TURN ON BIT3 OF RCSFLAGX
MASK BIT3 # FOR
ADS RCSFLAGS # NEEDLER INITIALIZATION
TC IBNKCALL
CADR NEEDLER # DISABLE IMU ERR COUNTERS ETC.
CAF BIT9 # SIVB
EXTEND # TAKEOVER
WOR CHAN12 # ENABLE
EXTEND # SET UP T5 CYCLE
DCA 2SATSTCK
DXCH T5LOC
CAF 100MST5 # IN 100 MSECS
TS TIME5
TCF RESUME # END OF SATURN STICK INITIALIZATION
# THIS SECTION IS EXECUTED EVERY 100 MSECS.
#Page 550
SATSTICK LXCH BANKRUPT
EXTEND
QXCH QRUPT
CAF 2SATSTCK # SET UP RUPT
TS T5LOC # LO ORDER LOC SET
CAF 100MST5 # 100 MSECS
TS TIME5
CAF STIKBITS
EXTEND
RXOR CHAN31 # CHECK IF MAN ROT BITS SAME
MASK STIKBITS
TC IBNKCALL # SET RATE INDICES
CADR STICKCHK # FOR PITCH YAW AND ROLL
INDEX RMANNDX # SET SATURN RATES
CA SATRATE
TS AK # ROLL
INDEX PMANNDX
CA SATRATE
TS AK1 # PITCH
INDEX YMANNDX
CA SATRATE
TS AK2 # YAW
TC IBNKCALL # FOR SATURN INTERFACE AND FDAI DISPLAY
CADR NEEDLER
TCF RESUME # END OF SATURN STICK CONTROL
STIKBITS OCT 00077
100MST5 DEC 16374
EBANK= BODY3
2SATSTCK 2CADR SATSTICK

245
P12.s Normal file
View File

@ -0,0 +1,245 @@
# Copyright: Public domain.
# Filename: P12.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 838-842
# Mod history: 2009-05-23 HG Transcribed from page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 838
BANK 24
SETLOC P12
BANK
EBANK= DVCNTR
COUNT* $$/P12
P12LM TC PHASCHNG
OCT 04024
TC BANKCALL
CADR R02BOTH # CHECK THE STATUS OF THE IMU.
TC UPFLAG
ADRES MUNFLAG
TC UPFLAG # INSURE 4-JET TRANSLATION CAPABILITY.
ADRES ACC4-2FL
TC UPFLAG # PREVENT R10 FROM ISSUING CROSS-POINTER
ADRES R10FLAG # OUTPUTS.
TC CLRADMOD # INITIALIZE RADMODES FOR R29
TC DOWNFLAG # CLEAR RENDEVOUS FLAG FOR P22
ADRES RNDVZFLG
CAF THRESH2 # INITIALIZE DVMON
TS DVTHRUSH
CAF FOUR
TS DVCNTR
CA ZERO
TS TRKMKCNT # SHOW THAT R29 DOWNLINK DATA IS NOT READY.
CAF V06N33A
TC BANKCALL # FLASH TIG
CADR GOFLASH
TCF GOTOP00H
TCF +2 # PROCEED
TCF -5 # ENTER
TC PHASCHNG
OCT 04024
TC INTPRET
CALL # INITIALZE WM AND /LAND/
GUIDINIT
SET CALL
FLPI
P12INIT
# Page 839
P12LMB DLOAD
(TGO)A # SET TGO TO AN INITIAL NOMINAL VALUE.
STODL TGO
TIG
STCALL TDEC1
LEMPREC # ROTATE THE STATE VECTORS TO THE
VLOAD MXV # IGNITION TIME.
VATT
REFSMMAT
VSL1
STOVL V1S # COMPUTE V1S = VEL(TIG)*2(-7) M/CS.
RATT
MXV VSL6
REFSMMAT
STCALL R # COMPUTE R = POS(TIG)*2(-24) M.
MUNGRAV # COMPUTE GDT1/2(TIG)*2(-T)M/CS.
VLOAD UNIT
R
STCALL UNIT/R/ # COMPUTE UNIT/R/ FOR YCOMP.
YCOMP
SR DCOMP
5D
STODL XRANGE # INITIALIZE XRANGE FOR NOUN 76
VINJNOM
STODL ZDOTD
RDOTDNOM
STORE RDOTD
EXIT
TC PHASCHNG
OCT 04024
NEWLOAD CAF V06N76 # FLASH CROSS-RANGE, AND APOLUNE VALUES.
TC BANKCALL
CADR GOFLASH
TCF GOTOP00H
TCF +2 # PROCEED
TCF NEWLOAD # ENTER NEW DATA.
CAF P12ADRES
TS WHICH
TC PHASCHNG
OCT 04024
TC INTPRET
DLOAD SL
XRANGE
5D
DAD
# Page 840
Y
STOVL YCO
UNIT/R/
VXSC VAD
49FPS
V1S
STORE V # V(TIPOVER) = V(IGN) + 57FPS (UNIT/R/)
DOT SL1
UNIT/R/
STOVL RDOT # RDOT = 2(-7)
UNIT/R/
VXV UNIT
QAXIS
STORE ZAXIS1
SETGO
FLVR
ASCENT
P12RET DLOAD
ATP # ATP(2)*2(18)
DSQ PDDL
ATY # ATY(2)*2(18)
DSQ DAD
BZE SQRT
YAWDUN
SL1 BDDV
ATY
ARCSIN
YAWDUN STOVL YAW
UNFC/2
UNIT DOT
UNIT/R/
SL1 ARCCOS
DCOMP
STORE PITCH
EXIT
TC PHASCHNG
OCT 04024
TC DOWNFLAG
ADRES FLPI
INHINT
TC IBNKCALL
CADR PFLITEDB
RELINT
TC POSTJUMP
CADR BURNBABY
P12INIT DLOAD # INITIALIZE ENGINE DATA. USED FOR P12 AND
# Page 841
(1/DV)A # P71.
STORE 1/DV3
STORE 1/DV2
STODL 1/DV1
(AT)A
STODL AT
(TBUP)A
STODL TBUP
ATDECAY
DCOMP SL
11D
STORE TTO
SLOAD DCOMP
APSVEX
SR2
STORE VE
BOFF RVQ
FLAP
COMMINIT
COMMINIT DLOAD DAD # INITIALIZE TARGET DATA. USED BY P12, P70
HINJECT # AND P71 IF IT DOES NOT FOLLOW P70.
/LAND/
STODL RCO
HI6ZEROS
STORE TXO
STORE YCO
STORE RDOTD
STOVL YDOTD
VRECTCSM
VXV MXV
RRECTCSM
REFSMMAT
UNIT
STORE QAXIS
RVQ
P12ADRES REMADR P12TABLE
SETLOC P12A
BANK
COUNT* $$/P12
GUIDINIT STQ SETPD
TEMPR60
0D
VLOAD PUSH
UNITZ
RTB PUSH
LOADTIME
CALL
RP-TO-R
# Page 842
MXV VXSC
REFSMMAT
MOONRATE
STOVL WM
RLS
ABVAL SL3
STCALL /LAND/
TEMPR60
49FPS 2DEC .149352 B-6 # EXPECTED RDOT AT TIPOVER
VINJNOM 2DEC 16.7924 B-7 # 5509.5 FPS(APO=30NM WITH RDOT=19.5FPS)
RDOTDNOM 2DEC .059436 B-7 # 19.5 FPS

3529
P20-P25.s Normal file

File diff suppressed because it is too large Load Diff

630
P30-P37.s Normal file
View File

@ -0,0 +1,630 @@
# Copyright: Public domain.
# Filename: P30-P37.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 635-648
# Mod history: 2009-05-10 RSB Adapted from the Colossus249/ file
# of the same name, using Comanche055 page
# images.
# 2009-05-20 RSB Corrected BDV -> BOV.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 635
BANK 32
SETLOC P30S1
BANK
EBANK= +MGA
COUNT 35/P34
DISPMGA STQ EXIT # USED IN P30
RGEXIT
TC COMPTGO
DISP45 CAF V16N45
TC BANKCALL
CADR GOFLASHR
TC GOTOP00H
TC END45
TC DISP45
P30PHSI TC PHASCHNG
OCT 14
TCR ENDOFJOB
END45 TC INTPRET
CLEAR GOTO
TIMRFLAG
RGEXIT
COMPTGO EXTEND # USED TO COMPUTE TTOGO
QXCH PHSPRDT6 # ** GROUP 6 TEMPORARY USED, BEWARE **
TC UPFLAG # SET TIMRFLAG
ADRES TIMRFLAG # BIT 11 FLAG 7
CAF ZERO
TS NVWORD1
CAF ONE
TC WAITLIST
EBANK= TIG
2CADR CLOKTASK
TC 2PHSCHNG
OCT 40036 # 6.3SPOT FOR CLOKTASK
OCT 05024 # GROUP 4 CONTINUES HERE
OCT 13000
TC PHSPRDT6
# Page 636
# PROGRAM DESCRIPTION P30 DATE 3-6-67
# MOD. I BY S. ZELDIN: TO ADD P31 AND ADAPT P30 FOR P31 USE. 22DEC67
#
# FUNCTIONAL DESCRIPTION
# P30 (EXTERNAL DELTA-V TARGETING PROGRAM)
# ACCEPTS ASTRONAUT INPUTS OF TIG,DELV(LV) AND COMPUTES, FOR DISPLAY,
# APOGEE, PERIGEE, DELV(MAG), MGA ASSOCIATED WITH DESIRED MANEUVER.
# P31 (GENERAL LAMBERT AIMPOINT GUIDANCE)
# A GROUND RULE FOR P31 IS THE ANGLE BETWEEN THE TARGET VECTOR AND
# POSITION VECTOR AT TIG IS NOT 165-195 DEGREES APART
# BASED ON STORED INPUT OF OFFSET TARGET(B+29) AND DELTA T TRANS, AND
# ASTRONAUT ENTRY OF TIG, P31 COMPUTES REQUIRED VELOCITY FOR MANEUVER
# AND, FOR DISPLAY, APOGEE, PERIGEE, DELV(7AG), +MGA ASSOCIATED WITH
# DESIRED MANEUVER.
#
# THE FOLLOWING SUBROUTINES ARE USED IN P30 AND P31
# S30.1 (P30 ONLY)
# S31.1 (P31 ONLY)
# P30/P31 -- DISPLAYS TIG
# CNTUP30 -- DISPLAYS DELV(LV)
# PARAM30 -- DISPLAYS APOGEE, PERIGEE, DELV(MAG), MGA, TIME FROM TIG,
# MARKS SINCE LAST THRUSTING MANEUVER
#
# CALLING SEQUENCE VIA JOB FROM V37
#
# EXIT VIA V37 OR GOTOP00H
#
# OUTPUT FOR POWERED FLIGHT
# VTIG X
# RTIG X SEE S30.1
# DELVSIN X
# VGDISP
# RTARG X
# TPASS4 X SEE S31.1
# X
COUNT 35/P30
P30 TC P30/P31
TC CNTNUP30
TC DOWNFLAG # RESET UPDATFLG
ADRES UPDATFLG # BIT 7 FLAG 1
TC INTPRET
CALL
S30.1
EXIT
TC PARAM30
TC UPFLAG
# Page 637
ADRES XDELVFLG # SET XDELVFLG BIT 8 FLAG 2
TCF GOTOP00H
P31 TC P30/P31
TC DOWNFLAG
ADRES UPDATFLG # RESET UPDATFLG BIT 7 FLAG 1
TC DOWNFLAG
ADRES NORMSW # RESET NORMSW BIT 10 FLAG 7
TC INTPRET
CALL
S31.1
EXIT
TC CNTNUP30
TC PARAM30
TC DOWNFLAG
ADRES XDELVFLG # BIT 8 FLAG 2.
TCF GOTOP00H
P30/P31 XCH Q
TS P30/31RT
TC UPFLAG
ADRES UPDATFLG # SET UPDATFLG BIT 7 FLAG 1
TC UPFLAG
ADRES TRACKFLG # SET TRACKFLG BIT 5 FLAG 1
CAF V06N33 # T OF IGN
TC BANKCALL
CADR GOFLASHR
TCF GOTOP00H
TC P30/31RT
TCF P30/P31 +4
TC PHASCHNG
OCT 00014
TC ENDOFJOB
CNTNUP30 XCH Q
TS P30/RET
CAF V06N81
TC BANKCALL
CADR GOFLASH
TCF GOTOP00H
TC P30/RET
TCF CNTNUP30 +2
PARAM30 XCH Q
TS P30/31RT
CAF V06N42
TC BANKCALL
CADR GOFLASH
TC GOTOP00H # ON TERMINATION GOTOP00H
TCF REFTEST # ON PROCEED GO DO REFTEST
# Page 638
TCF PARAM30 +2
REFTEST CAF BIT13
MASK STATE +3 # REFSMFLAG
EXTEND
BZF NOTSET # REFSMFLAG =0, THEN BRANCH TO NOTSET
TC INTPRET
VLOAD PUSH
DELVSIN
CALL
GET+MGA
GOTO
FLASHMGA
NOTSET EXTEND
DCS MARSDP
DXCH +MGA # +MGA, +MGA+1 CONTAINS (-00001)
TC INTPRET
FLASHMGA CALL
DISPMGA
EXIT
TC P30/31RT
MARSDP OCT 00000 # (00000) (16440) = (+00001)
OCT 35100
# ( .01 ) DEGREES IN THE LOW ORDER REGISTER
V06N33 VN 0633
V06N42 VN 0642
V16N35 VN 1635
V06N45 VN 0645
# Page 639
# PROGRAM DESCRPTION S30.1 DATE 9NOV66
# MOD NO 1 LOG SECTION P30,P37
# MOD BY RAMA AIYAWAR **
# MOD.2 BY S.ZELDIN -- TO CORRECT MOD.1 FOR COLOSSUS 29DEC67
#
# FUNCTIONAL DESCRIPTION
# BASED ON STORED TARGET PARAMETERS (R OF IGNITION (RTIG), V OF
# IGNITION (VTIG), TIME OF IGNITION (TIG)), DELV(LV), COMPUTE PERIGEE ALTITUDE
# APOGEE ALTITUDE AND DELTA-V REQUIRED IN REF. COORDS. (DELVSIN).
#
# CALLING SEQUENCE
# L CALL
# L+1 S30.1
#
# NORMAL EXIT MODE
# AT L+2 OR CALLING SEQUENCE (GOTO L+2)
#
# SUBROUTINES CALLED
# THISPREC
# PERIAPO
#
# ALARM OR ABORT EXIT MODES
# NONE
#
# ERASABLE INITIALIZATION REQUIRED
# TIG TIME OF IGNITION DP B28CS
# DELVSLV SPECIFIED DELTA-V IN LOCAL VERT.
# COORDS. OF ACTIVE VEHICLE AT
# TIME OF IGNITION VCT. B+7 M/CS
#
# OUTPUT
# RTIG POSITION AT TIG VCT. B+29 M
# VTIG VELOCITY AT TIG VCT. B+7 M
# HAPO APOGEE ALT. DP B+29 M
# HPER PERIGEE ALT. DP B+29 M
# DELVSIN DELVSLV IN REF COORDS VCT. B+7 M/CS
# VGDISP MAG. OF DELVSIN DP B+7 M/CS
#
# DEBRIS QTEMP TEMP.ERASABLE
# QPRET, MPAC
# PUSHLIST
SETLOC P30S1A
BANK
COUNT 35/S30S
S30.1 STQ DLOAD
QTEMP
TIG # TIME IGNITION SCALED AT 2(+28)CS
STCALL TDEC1
THISPREC # ENCKE ROUTINE FOR
VLOAD SXA,2
VATT
RTX2
STOVL VTIG
# Page 640
RATT
STORE RTIG
STORE RACT3
VXV UNIT
VTIG
STCALL UNRM
LOMAT
VLOAD VXM
DELVSLV
0
VSL1 SXA,1
RTX1
STORE DELVSIN
ABVAL
STOVL VGDISP # MAG DELV
RTIG
PDVL VAD
DELVSIN
VTIG
CALL
PERIAPO1
CALL
SHIFTR1
CALL
MAXCHK
STODL HPER # PERIGEE ALT B+29
4D
CALL
SHIFTR1
CALL
MAXCHK
STCALL HAPO # APOGEE ALT B+29
QTEMP
# Page 641
# S31.1 PROGRAM DESCRIPTION 28DEC67
# MOD.1 BY S.ZELDIN
#
# S31.1 COMPUTES DELV IN REF AND LV COORDS,MAG OF DELV,INTERCEPT TIME,
# APOGEE AND PERIGEE ALT FOR REQUIRED MANEUVER
#
# CALLING SEQUENCE
# L CALL
# L+1 S31.1
#
# NORMAL EXIT MODE
# AT L +2 OF CALLING SEQUENCE (GOTO L+2)
#
# SUBROUTINES CALLED
# AGAIN
# PERIAPO1
# SHIFTR1
# MIDGIM
#
# NO ALARM OR ABORT MODES
#
# INPUT
# DELLT4 DP +28
# TIG DP +28
# RTARG VCT +29
#
# OUTPUT
# DELVLVC VCT +7
# VGDISP DP +7
# HAPO DP +29
# HPER DP +29
# TPASS4 DP +28
#
# DEBRIS -- QTEMP
S31.1 STQ DLOAD
QTEMP
TIG
STCALL TDEC1
AGAIN # RETURNS RTX2,RTX1,RATT,VATT,VIPRIME
VLOAD PDVL # DELUEET3
RTIG
VIPRIME
CALL
PERIAPO1
CALL
SHIFTR1
CALL
MAXCHK
STODL HPER # B29
4D
CALL
SHIFTR1
CALL
MAXCHK
STOVL HAPO # B29
# Page 642
DELVEET3
STORE 0
SET CALL
AVFLAG
MIDGIM # GET DELVLVC B7 FOR DISPLAY
ABVAL
STODL VGDISP # B+7 FOR DISPLAY
DELLT4
DAD
TIG
STCALL TPASS4 # FOR S40.1
QTEMP
# Page 643
# SUBROUTINE NAME: DELRSPL (CONTINUATION OF V 82 IN CSM IF P11 ACTIVE)
# TRANSFERRED COMPLETELY FROM SUNDISK, P30S REV 33. 9 SEPT 67.
# MOD NO: 0 MOD BY: ZELDIN DATE:
# MOD NO: 1 MOD BY: RR BAIRNSFATHER DATE: 11 APR 67
# MOD NO: 2 MOD BY: RR BAIRNSFATHER DATE: 12 MAY 67 ADD UR.RT CALC WHEN BELOW 300K FT
# MOD NO: 2.1 MOD BY: RR BAIRNSFATHER DATE: 5 JULY 67 FIX ERROR ON MOD. 2
# MOD NO: 3 MOD BY: RR BAIRNSFATHER DATE: 12 JUL 67 CHANGE SIGN OF DISPLAYED ERROR.
# MOD 4 MOD BY S.ZELDIN DATE: 3 APRIL 68 CHANGE EQUATIONS FOR L/D=.16 WHICH REPLA
#
# FUNCTION: CALCULATE (FOR DISPLAY ON CALL) AN APPROXIMATE MEASURE OF IN-PLANE SPLASH DOWN
# ERROR. IF THE FREE-FALL TRANSFER ANGLE TO 300K FT ABOVE PAD RADIUS IS POSITIVE:
# SPLASH ERROR= -RANGE TO TARGET + FREE-FALL TRANSFER ANGLE + ESTIMATED ENTRY ANGLE.
# THE TARGET LOCATION AT ESTIMATED TIME OF IMPACT IS USED. IF THE FREE-FALL TRANSFER
# ANGLE IS NEGATIVE: SPASH ERROR= -RANGE TO TARGET.
# THE PRESENT TARGET LOCATION IS USED.
#
# CALLING SEQUENCE: CALLED AFTER SR30.1 IF IN CSM AND IF P11 OPERATING (UNDER CONTROL OF V82)
#
# SUBROUTINES CALLED: VGAMCALC, TFF/TRIG, LALOTORV.
#
# EXIT: RETURN DIRECTLY TO V 82 PROG. AT SPLRET
#
# ERASABLE INITIALIZATION: LEFT BY SR30.1 AND V82GON1
#
# OUTPUT: RSP-RREC RANGE IN REVOLUTIONS. DSKY DISPLAY IN N. MI.
#
# DEBRIS: QPRET, PDL0 ... PDL7, PDL10.
# THETA(1)
BANK 32
SETLOC DELRSPL1
BANK
COUNT* $$/P30 # PROGRAMS: P30 EXTERNAL DELTA V
DELRSPL STORE 8D
BPL DSU
CANTDO # GONE PAST 300K FT ALT
1BITDP
BOV CALL
CANTDO # POSMAX INDICATES NO 300K FT SOLUTION.
VGAMCALC # +GAMMA(REV) IN PMAC,V300 MAG(B-7)=PDL 0
PUSH CALL
TFF/TRIG
CALL
AUGEKUGL
PDDL ACOS # T ENTRY PDL 6
CDELF/2
DAD
4
GETARG STOVL THETA(1)
LAT(SPL)
STODL LAT
HI6ZEROS
STODL ALT # ALT=0 = LAT +4
PIPTIME
# Page 644
BON DLOAD
V37FLAG
+2
TSTART82
DSU DAD
8D
CLEAR CALL
ERADFLAG
LALOTORV # R RECOV. IN ALPHAV AND MPAC
UNIT PDVL
RONE
UNIT DOT
SL1 ARCCOS
BDSU # ERROR = THETA EST - THETA TARG
# NEGATIVE NUMBER SIGNIFIES THAT WILL FALL SHORT.
# POSITIVE NUMBER SIGNIFIES THAT WILL OVERSHOOT.
THETA(1)
DELRDONE STCALL RSP-RREC # DOWNRANGE RECOVERY RANGE ERROR /360
INTWAKE0
CALL
SPLRET
CANTDO DLOAD PDDL # INITIALIZE ERASE TO DOT TARGET AND UR
# FOR RANGE ANGLE.
HIDPHALF # TO PDL 0 FOR DEN INDDV.
HI6ZEROS
PUSH # ZERO TO PDL 2 FOR PHI ENTRY
STCALL 8D
GETARG # GO SET RSP-RREC =0
AUGEKUGL VLOAD
X1CON -2
STODL X1 -2
0
DSU BMN
V(21K)
LOOPSET
XSU,1 XCHX,2
S1
X1
XCHX,2 DSU
S1
V(3K)
BMN XCHX,2
LOOPSET
S1
DSU BMN
V(4K)
LOOPSET
XCHX,2 XCHX,2
# Page 645
S1
X1
DSU BMN
V(400)
LOOPSET
SXA,1
S1
LOOPSET INCR,1 GOTO
DEC 1
K1K2LOOP
K2CALC SXA,1
S1
K1K2LOOP DLOAD DSU*
0
V(32K) +1,1
DMP* DAD*
YK1K2 +1,1
CK1K2 +1,1
PDDL TIX,1
2
K2CALC
DSU BDDV
PUSH BOV
MAXPHI
BMN DSU
MAXPHI
MAXPHIC
BPL
MAXPHI
PHICALC DLOAD DSU # PHI ENTRY PDL 4D
0
V(26K)
BPL DLOAD
TGR26
TLESS26
DDV
0
TENT DMP RVQ
4D
TGR26 DLOAD GOTO
TGR26CON
TENT
MAXPHI DLOAD PDDL
MAXPHIC
GOTO
PHICALC
MAXPHIC 2DEC .09259298 # 2000 NM FOR MAXIMUM PHI ENTRY
# Page 646
COUNT* $$/P30
# BELOW
# **** TABLE IS INDEXED. KEEP IN ORDER ***
# Page 641
2DEC 7.07304526 E-4 # 5500
2DEC 3.08641975 E-4 # 2400
2DEC 3.08641975 E-4 # 2400
2DEC -8.8888888 E-3 # -3.2
2DEC 2.7777777 E-3 # 1
CK1K2 2DEC 6.6666666 E-3 # 2.4
2DEC 0 # 0
2DEC* -1.86909989 E-5 B7* # -.443
2DEC 0
2DEC* 1.11639691 E-3 B7* # .001225
2DEC* 9.56911636 E-4 B7* # .00105
YK1K2 2DEC* 2.59733157 E-4 B7* # .000285
V(400) 2DEC 1.2192 B-7
V(28K) 2DEC 85.344 B-7
V(3K) 2DEC 9.144 B-7
V(24K) 2DEC 73.152 B-7
2DEC 85.344 B-7
V(32K) 2DEC 97.536 B-7
V(4K) 2DEC 12.192 B-7
V(21K) 2DEC 64.000 B-7
TLESS26 2DEC* 5.70146688 E7 B-35* # 8660PHI/V
TGR26CON 2DEC 7.2 E5 B-28 # PHI/3
V(26K) 2DEC 79.248 B-7 # 26000
# Page 647
X1CON DEC 10
DEC 8
DEC 6
# **** TABLE IS INDEXED. KEEP IN ORDER ***
# ABOVE
# Page 648
# ***** AVFLAG/P *****
#
# SUBROUTINES USED
#
# UPFLAG
# DOWNFLAG
SETLOC P30SUBS
BANK
EBANK= SUBEXIT
AVFLAGA EXTEND # AVFLAG = CSM
QXCH SUBEXIT
TC DOWNFLAG
ADRES AVFLAG # BIT 5 FLAG 2
CAF EBANK7
TS EBANK
EBANK= ECSTEER
CAF BIT13
TS ECSTEER # SET ECSTEER = 1
CAF EBANK4
TS EBANK
EBANK= SUBEXIT
TC SUBEXIT
AVFLAGP EXTEND # AVFLAG = LEM
QXCH SUBEXIT
TC UPFLAG
ADRES AVFLAG # BIT 5 FLAG 2
TC SUBEXIT
P20FLGON EXTEND
QXCH SUBEXIT
TC UPFLAG
ADRES TRACKFLG
TC UPFLAG
ADRES UPDATFLG
TC SUBEXIT # DP B4

193
P30_P37.s Normal file
View File

@ -0,0 +1,193 @@
# Copyright: Public domain.
# Filename: P30_P37.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 614-617
# Mod history: 2009-05-17 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
# 2009-06-05 RSB Removed 4 lines of code that shouldn't
# have survived from Luminary 131.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 614
# PROGRAM DESCRIPTION P30 DATE 3-6-67
#
# MOD.1 BY RAMA AIYAWAR
#
# FUNCTIONAL DESCRIPTIONS
# ACCEPT ASTRONAUT INPUTS OF TIG,DELV(LV)
# CALL IMU STATUS CHECK ROUTINE (R02)
# DISPLAY TIME TO GO, APOGEE, PERIGEE, DELV(MAG), MGA AT IGN
# REQUEST BURN PROGRAM
#
# CALLING SEQUENCE VIA JOB FROM V37
#
# EXIT VIA V37 CALL OR TO GOTOP00H (V34E)
#
# SUBROUTINE CALLS -- FLAGUP, PHASCHNG, BANKCALL, ENDOFJOB, GOFLASH, GOFLASHR
# GOPERF3R, INTPRET, BLANKET, GOTOP00H, R02BOTH, S30.1,
# TIG/N35, MIDGIM, DISPMGA
#
# ERASABLE INITIALIZATION -- STATE VECTOR
#
# OUTPUT -- RINIT, VINIT, +MGA, VTIG, RTIG, DELVSIN, DELVSAB, DELVSLV, HAPO,
# HPER, TTOGO
#
# DEBRIS -- A, L, MPAC, PUSHLIST
BANK 32
SETLOC P30S
BANK
EBANK= +MGA
COUNT* $$/P30
P30 TC UPFLAG # SET UPDATE FLAG
ADRES UPDATFLG
TC UPFLAG # SET TRACK FLAG
ADRES TRACKFLG
P30N33 CAF V06N33 # T OF IGN
TC VNP00H # RETURN ON PROCEED, P00H ON TERMINATE
CAF V06N81 # DISPLAY DELTA V (LV)
TC VNP00H # REDISPLAY ON RECYCLE
TC DOWNFLAG # RESET UPDATE FLAG
ADRES UPDATFLG
TC INTPRET
CALL
S30.1
SET EXIT
UPDATFLG
PARAM30 CAF V06N42 # DISPLAY APOGEE,PERIGEE,DELTA V
TC VNP00H
# Page 615
TC INTPRET
SETGO
XDELVFLG # FOR P40'S: EXTERNAL DELTA-V GUIDANCE.
REVN1645 # TRKMKCNT, T60, +MGA DISPLAY
V06N33 VN 0633
V06N42 VN 0642
# Page 616
# PROGRAM DESCRPTION S30.1 DATE 9NOV66
# MOD NO 1 LOG SECTION P30,P37
# MOD BY RAMA AIYAWAR **
#
# FUNCTIONAL DESCRIPTION
# BASED ON STORED TARGET PARAMETERS (R OF IGNITION (RTIG), V OF
# IGNITION (VTIG), TIME OF IGNITION (TIG)), COMPUTE PERIGEE ALTITUDE
# APOGEE ALTITUDE AND DELTAV REQUIRED (DELVSIN).
#
# CALLING SEQUENCE
# L CALL
# L+1 s30.1
#
# NORMAL EXIT MODE
# AT L+2 OR CALLING SEQUENCE (GOTO L+2)
#
# SUBROUTINES CALLED
# LEMPREC
# PERIAPO
#
# ALARM OR ABORT EXIT MODES
# NONE
#
# ERASABLE INITIALIZATION REQUIRED
# TIG TIME OF IGNITION DP B28CS
# DELVSLV SPECIFIED DELTA-V IN LOCAL VERT.
# COORDS. OF ACTIVE VEHICLE AT
# TIME OF IGNITION VECTOR B+7 METERS/CS
#
# OUTPUT
# RTIG POSITION AT TIG VECTOR B+29 METERS
# VTIG VELOCITY AT TIG VECTOR B+29 METERS/CS
# PDL 4D APOGEE ALTITUDE DP B+29 M, B+27 METERS.
# HAPO APOGEE ALTITUDE DP B+29 METERS
# PDL 8D PERIGEE ALTITUDE DP B+29 M, B+27 METERS.
# HPER PERIGEE ALTITUDE DP B+29 METERS
# DELVSIN SPECIFIED DELTA-V IN INTERTIAL
# COORD. OF ACTIVE VEHICLE AT
# TIME OF IGNITION VECTOR B+7 METERS/CS
# DELVSAB MAG. OF DELVSIN VECTOR B+7 METERS/CS
#
# DEBRIS QTEMP TEMP.ERASABLE
# QPRET, MPAC
# PUSHLIST
SETLOC P30S1
BANK
COUNT* $$/S30S
S30.1 STQ DLOAD
QTEMP
TIG # TIME IGNITION SCALED AT 2(+28)CS
STCALL TDEC1
LEMPREC # ENCKE ROUTINE FOR LEM
VLOAD SXA,2
# Page 617
RATT
RTX2
STORE RTIG # RADIUS VECTOR AT IGNITION TIME
UNIT VCOMP
STOVL DELVSIN # ZRF/LV IN DELVSIN SCALED AT 2
VATT # VELOCITY VECTOR AT TIG, SCALED 2(7) M/CS
STORE VTIG
VXV UNIT
RTIG
SETPD SXA,1
0
RTX1
PUSH VXV # YRF/LV PDL 0 SCALED AT 2
DELVSIN
VSL1 PDVL
PDVL PDVL # YRF/LV PDL 6 SCALED AT 2
DELVSIN # ZRF/LV PDL 12D SCALED AT 2
DELVSLV
VXM VSL1
0
STORE DELVSIN # DELTAV IN INERT. COOR. SCALED TO B+7M/CS
ABVAL
STOVL DELVSAB # DELTA V MAG.
RTIG # (FOR PERIAPO)
PDVL VAD # VREQUIRED = VTIG + DELVSIN (FOR PERIAPO)
VTIG
DELVSIN
CALL
PERIAPO1
CALL
SHIFTR1 # RESCALE IF NEEDED
CALL # LIMIT DISPLAY TO 9999.9 N. MI.
MAXCHK
STODL HPER # PERIGEE ALT 2(29) METERS FOR DISPLAY
4D
CALL
SHIFTR1 # RESCALE IF NEEDED
CALL # LIMIT DISPLAY TO 9999.9 N. MI.
MAXCHK
STCALL HAPO # APOGEE ALT 2(29) METERS FOR DISPLAY
QTEMP

1408
P32-P33_P72-P73.s Normal file

File diff suppressed because it is too large Load Diff

1394
P32-P35_P72-P75.s Normal file

File diff suppressed because it is too large Load Diff

1739
P34-35_P74-75.s Normal file

File diff suppressed because it is too large Load Diff

1950
P37_P70.s Normal file

File diff suppressed because it is too large Load Diff

2429
P40-P47.s Normal file

File diff suppressed because it is too large Load Diff

2213
P51-P53.s Normal file

File diff suppressed because it is too large Load Diff

1226
P61-P67.s Normal file

File diff suppressed because it is too large Load Diff

434
P70-P71.s Normal file
View File

@ -0,0 +1,434 @@
# Copyright: Public domain.
# Filename: P70-P71.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 829-837
# Mod history: 2009-05-23 HG Transcribed from page images.
# 2009-06-05 RSB Fixed a typo.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 829
BANK 21
SETLOC R11
BANK
EBANK= DVCNTR
COUNT* $$/R11
R10,R11 CS FLAGWRD7 # IS SERVICER STILL RUNNING?
MASK AVEGFBIT
CCS A
TCF TASKOVER # LET AVGEND TAKE CARE OF GROUP 2.
CCS PIPCTR
TCF +2
TCF LRHTASK # LAST PASS. CALL LRHTASK.
+2 TS PIPCTR1
PIPCTR1 = LADQSAVE
PIPCTR = PHSPRDT2
CAF OCT31
TC TWIDDLE
ADRES R10,R11
R10,R11A CS IMODES33 # IF LAMP TEST, DO NTO CHANGE LR LITES
MASK BIT1
EXTEND
BZF 10,11
FLASHH? MASK FLGWRD11 # C(A) = 1 - HFLASH BIT
EXTEND
BZF FLASHV? # H FLASH OFF, SO LEAVE ALONE
CA HLITE
TS L
TC FLIP # FLIP H LITE
FLASHV? CA VFLSHBIT # VLASHBIT MUST BE BIT 2.
MASK FLGWRD11
EXTEND
BZF 10,11 # V FLASH OFF
CA VLITE
TS L
TC FLIP # FLIP V LITE
10,11 CA FLAGWRD9 # IS THE LETABORT FLAG SET ?
MASK LETABBIT
EXTEND
BZF LANDISP # NO. PROCEED TO R10.
P71NOW? CS MODREG # YES. ARE WE IN P71 NOW?
# Page 830
AD 1DEC71
EXTEND
BZF LANDISP # YES. PROCEED TO R10.
EXTEND # NO. IS AN ABORT STAGE COMMANDED?
READ CHAN30
COM
TS L
MASK BIT4
CCS A
TCF P71A # YES.
P70NOW? CS MODREG # NO. ARE WE IN P70 NOW?
AD 1DEC70
EXTEND
BZF LANDISP # YES. PROCEED TO R10.
CA L # NO. IS AN ABORT COMMANDED?
MASK BIT1
CCS A
TCF P70A # YES.
TCF LANDISP # NO. PROCEED TO R10.
COUNT* $$/P70
P70 TC LEGAL?
P70A CS ZERO
TCF +3
P71 TC LEGAL?
P71A CAF TWO
+3 TS Q
INHINT
EXTEND
DCA CNTABTAD
DTCB
EBANK= DVCNTR
CNTABTAD 2CADR CONTABRT
1DEC70 DEC 70
1DEC71 DEC 71
BANK 05
SETLOC ABORTS1
BANK
COUNT* $$/P70
CONTABRT CAF ABRTJADR
TS BRUPT
RESUME
# Page 831
ABRTJADR TCF ABRTJASK
ABRTJASK CAF OCTAL27
AD Q
TS L
COM
DXCH -PHASE4
INDEX Q
CAF MODE70
TS MODREG
TS DISPDEX # INSURE DISPDEX IS POSITIVE.
CCS Q # SET APSFLAG IF P71.
CS FLGWRD10 # SET APSFLAG PRIOR TO THE ENEMA.
MASK APSFLBIT
ADS FLGWRD10
CS DAPBITS # DAPBITS = OCT 640 = BITS 6, 8, 9
MASK DAPBOOLS # (TURN OFF ULLAGE, DRIFT, AND XOVINHIB
TS DAPBOOLS
CS FLAGWRD5 # SET ENGONFLG.
MASK ENGONBIT
ADS FLAGWRD5
CS PRIO30 # INSURE THAT THE ENGINE IS ON, IF ARMED.
EXTEND
RAND DSALMOUT
AD BIT13
EXTEND
WRITE DSALMOUT
CAF LRBYBIT # TERMINATE R12.
TS FLGWRD11
CS FLAGWRD0 # SET R10FLAG TO SUPPRESS OUTPUTS TO THE
MASK R10FLBIT # CROSS-POINTER DISPLAY.
ADS FLAGWRD0 # THE FOLLOWING ENEMA WILL REMOVE THE
# DISPLAY INERTIAL DATA OUTBIT.
TC CLRADMOD # INSURE RADMODES PROPERLY SET FOR R29.
EXTEND # LOAD TEVENT FOR THE DOWNLINK.
DCA TIME2
DXCH TEVENT
EXTEND
DCA SVEXITAD
DXCH AVGEXIT
# Page 832
EXTEND
DCA NEG0
DXCH -PHASE1
EXTEND
DCA NEG0
DXCH -PHASE3
EXTEND
DCA NEG0
DXCH -PHASE6
CAF THREE # SET UP 4.3SPOT FOR GOABORT
TS L
COM
DXCH -PHASE4
# the 3 in OCT37774 could be something else, garbled
CAF OCT37774 # SET T5RUPT TO CALL DAPIDLER IN
TS TIME5 # 40 MILLISECONDS.
TC POSTJUMP
CADR ENEMA
EBANK= DVCNTR
SVEXITAD 2CADR SERVEXIT
MODE70 DEC 70
OCTAL27 OCT 27
MODE71 DEC 71
DAPBITS OCT 00640
BANK 32
SETLOC ABORTS
BANK
COUNT* $$/P70
GOABORT TC INTPRET
CALL
INITCDUW
EXIT
CAF FOUR
TS DVCNTR
CAF WHICHADR
TS WHICH
TC DOWNFLAG
ADRES FLRCS
# Page 833
TC DOWNFLAG
ADRES FLUNDISP
TC DOWNFLAG
ADRES IDLEFLAG
TC UPFLAG # INSURE 4-JET TRANSLATION CAPABILIITY.
ADRES ACC4-2FL
TC CHECKMM
70DEC DEC 70
TCF P71RET
P70INIT TC INTPRET
CALL
TGOCOMP
DLOAD SL
MDOTDPS
4D
BDDV
MASS
STODL TBUP
MASS
DDV SR1
K(1/DV)
STORE 1/DV1
STORE 1/DV2
STORE 1/DV3
BDDV
K(AT)
STODL AT
DTDECAY
DCOMP SL
11D
STORE TTO
SLOAD DCOMP
DPSVEX
SR2
STORE VE # INITIALIZE DPS EXHAUST VELOCITY
SET CALL
FLAP
COMMINIT
AXC,1 GOTO # RETURN HERE IN P70, SET X1 FOR DPS COEFF.
0D
BOTHPOLY
INJTARG AXC,1 # RETURN HERE IN P71, SET X1 FOR APS COEFF.
8D
BOTHPOLY DLOAD* DMP # TGO D
ABTCOF,1
TGO
# Page 834
DAD* DMP
ABTCOF +2,1 # TGO(C+TGO )
TGO
DAD* DMP
ABTCOF +4,1 # TGO(B+TGO d))
TGO
DAD*
ABTCOF +6,1 # A+TGO(B+TGO(C+TGO D))
STORE ZDOTD # STORE TENTATIVELY IN ZDOTD
DSU BPL # CHECK AGAINST MINIMUM
VMIN
UPRATE # IF BIG ENOUGH, LEAVE ZDOTD AS IS .
DLOAD
VMIN
STORE ZDOTD # IF TOO SMALL, REPLCAE WITH MINIMUM.
UPRATE DLOAD
ABTRDOT
STCALL RDOTD # INITIALZE RDOTD.
YCOMP # COMPUTE Y
ABS DSU
YLIM # /Y/-DYMAX
BMN SIGN # IF <0, XR<.5DEG, LEAVE YCO AT 0
YOK # IF >0, FIX SIGN OF DEFICIT. THIS IS YCO.
Y
STORE YCO
YOK DLOAD DSU
YCO
Y # COMPUTE XRANGE IN CASE ASTRONAUT WANTS
SR
5D
STORE XRANGE # TO LOOK.
UPTHROT SET EXIT
FLVR
TC UPFLAG # SET ROTFLAG
ADRES ROTFLAG
TC THROTUP
TC PHASCHNG
OCT 04024
-3 TC BANKCALL # VERIFY THAT THE PANEL SWITCHES
CADR P40AUTO # ARE PROPERLY SET.
TC THROTUP
UPTHROT1 EXTEND # SET SERVICER TO CALL ASCENT GUIDANCE.
DCA ATMAGAD
DXCH AVGEXIT
# Page 835
GRP4OFF TC PHASCHNG # TERMINATE USE OF GROUP 4.
OCT 00004
TCF ENDOFJOB
P71RET TC DOWNFLAG
ADRES LETABORT
CAF THRESH2 # SET DVMON THRESHOLD TO THE ASCENT VALUE.
TS DVTHRUSH
TC INTPRET
BON CALL
FLAP
OLDTIME
TGOCOMP # IF FLAP=0, TGO=T-TIG
SSP GOTO
QPRET
CADR INJTARG
P12INIT # WILL EXIT P12INIT TO INJTARG
OLDTIME DLOAD SL1 # IF FLAP=1,GTO=2 TGO
TGO
STCALL TGO1
P12INIT
EXIT
TC PHASCHNG
OCT 04024
EXTEND
DCA TGO1
DXCH TGO
TCF UPTHROT1 -3
TGO1 = VGBODY
# *************************************************************************
BANK 21
SETLOC R11
BANK
COUNT* $$/P70
LEGAL? CS MMNUMBER # IS THE DESIRED PGM ALREADY IN PROGRESS?
AD MODREG
EXTEND
BZF ABORTALM
CS FLAGWRD9 # ARE THE ABORTS ENABLED?
MASK LETABBIT
CCS A
# Page 836
TCF ABORTALM
CA FLAGWRD7 # IS SERVICER ON THE AIR?
MASK AVEGFBIT
CCS A
TC Q # YES. ALL IS WELL.
ABORTALM TC FALTON
TC RELDSP
TC POSTJUMP
CADR PINBRNCH
BANK 32
SETLOC ABORTS
BANK
COUNT* $$/P70
# **********************************************************************
TGOCOMP RTB DSU
LOADTIME
TIG
SL
11D
STORE TGO
RVQ
# ************************************************************************
THROTUP CAF BIT13
TS THRUST
CAF BIT4
EXTEND
WOR CHAN14
TC Q
# ************************************************************************
10SECS 2DEC 1000
HINJECT 2DEC 18288 B-24 # 60,000 FEET EXPRESSED IN METERS.
(TGO)A 2DEC 37000 B-17
K(AT) 2DEC .02 # SCALING CONSTANT
WHICHADR REMADR ABRTABLE
# ************************************************************************
# Page 837
EBANK= DVCNTR
ATMAGAD 2CADR ATMAG
ORBMANAD ADRES ORBMANUV

162
P76.s Normal file
View File

@ -0,0 +1,162 @@
# Copyright: Public domain.
# Filename: P76.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: pp 511-513
# Mod history: 2009-05-08 HG Adapting from the Luminary131/ file
# of the same name, using Comanche055 page
# images 0511.jpg - 0513.jpg.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 511
# 1) PROGRAM NAME -- TARGET DELTA V PROGRAM (P76).
# 2) FUNCTIONAL DESCRIPTION -- UPON ENTRY BY ASTRONAUT ACTION, P76 FLASHES DSKY REQUESTS TO THE ASTRONAUT
# TO PROVIDE VIA DSKY (1) THE DELTA V TO BE APPLIED TO THE OTHER VEHICLE STATE VECTOR AND (2) THE
# TIME (TIG) AT WHICH THE OTHER VEHICLE VELOCITY WAS CHANGED BY EXECUTION OF A THRUSTING MANEUVER. THE
# OTHER VEHICLE STATE VECTOR IS INTEGRATED TO TIG AND UPDATED BY THE ADDITION OF DELTA V (DELTA V HAVING
# BEEN TRANSFORMED FROM LV TO REF COSYS). USING INTEGRVS, THE PROGRAM THEN INTEGRATES THE OTHER
# VEHICLE STATE VECTOR TO THE STATE VECTOR OF THIS VEHICLE, THUS INSURING THAT THE W-MATRIX AND BOTH VEHICLE
# STATES CORRESPOND TO THE SAME TIME.
# 3) ERASABLE INIITIALIZATION REQUIRED -- NONE.
# 4) CALLING SEQUENCES AND EXIT MODES -- CALLED BY ASTRONAUT REQUEST THRU DSKY V 37 E 76E.
# EXITS BY TCF ENDOFJOB.
# 5) OUTPUT -- OTHER VEHICLE STATE VECTOR INTEGRATED TO TIG AND INCREMENTED BY DELTA V IN REF COSYS.
# THE PUSHLIST CONTAINS THE MATRIX BY WHICH THE INPUT DELTA V MUST BE POST-MULTIPLIED TO CONVERT FROM LV
# TO REF COSYS.
# 6) DEBRIS -- OTHER VEHICLE STATE VECTOR.
# 7) SUBROUTINES CALLED -- BANKCALL, GOXDSPF, CSMPREC (OR LEMPREC), ATOPCSM (OR ATOPLEM), INTSTALL, INTWAKE, PHASCHNG
# INTPRET, INTEGRVS, AND MINIRECT.
# 8) FLAG USE -- MOONFLAG, CMOONFLG, INTYPFLG, RASFLAG, AND MARKCTR.
BANK 30
SETLOC P76LOC
BANK
COUNT* $$/P76
EBANK= TIG
P76 TC UPFLAG
ADRES TRACKFLG
CAF V06N84 # FLASH LAST DELTA V.
TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
CADR GOFLASH
TCF ENDP76
TC +2 # PROCEED
TC -5 # STORE DATA AND REPEAT FLASHING
CAF V06N84 +1 # FLASH VERB 06 NOUN 33, DISPLAY LAST TIG,
TC BANKCALL # AND WAIT FOR KEYBOARD ACTION.
CADR GOFLASH
TCF ENDP76
TC +2
TC -5
TC INTPRET # RETURN TO INTERPRETIVE CODE
DLOAD # SET D(MPAC)=TIG IN CSEC B28
TIG
STCALL TDEC1 # SET TDEC1=TIG FOR ORBITAL INTEGRATION
OTHPREC
COMPMAT VLOAD UNIT
RATT
# Page 512
VCOMP # U(-R)
STORE 24D # U(-R) TO 24D
VXV UNIT # U(-R) X V = U(V X R)
VATT
STORE 18D
VXV UNIT # U(V X R) X U(-R) = U((R X V) X R)
24D
STOVL 12D
DELVOV
VXM VSL1 # V(MPAC)=DELTA V IN REFCOSYS
12D
VAD
VATT
STORE 6 # V(PD6)=VATT + DELTA V
CALL # PREVENT WOULD-BE USER OF ORBITAL
INTSTALL # INTEG FROM INTERFERING WITH UPDATING
CALL
P76SUB1
VLOAD VSR*
6
0,2
STOVL VCV
RATT
VSR*
0,2
STODL RCV
TIG
STORE TET
CLEAR DLOAD
INTYPFLG
TETTHIS
INTOTHIS STCALL TDEC1
INTEGRVS
CALL
INTSTALL
CALL
P76SUB1 # SET/CLEAR MOONFLAG
VLOAD
RATT1
STORE RRECT
STODL RCV
TAT
STOVL TET
VATT1
CALL
MINIRECT
EXIT
TC PHASCHNG
OCT 04024
# Page 513
TC UPFLAG
ADRES REINTFLG
TC INTPRET
CALL
ATOPOTH
SSP EXIT
QPRET
OUT
TC BANKCALL # PERMIT USE OF ORBITAL INTEGRATION
CADR INTWAKE1
OUT EXIT
ENDP76 CAF ZERO
TS MARKCTR # CLEAR RR TRACKING MARK COUNTER
TS VHFCNT
CAF NEGONE
TS MRKBUF2 # INVALIDATE MARK BUFFER
TCF GOTOP00H
V06N84 NV 0684
NV 0633
P76SUB1 CLEAR SLOAD
MOONFLAG
X2
BHIZ SET # X2=0...CLEAR MOONFLAG
+2 # =2.....SET MOONFLAG
MOONFLAG
RVQ

406
PHASE_TABLE_MAINTENANCE.s Normal file
View File

@ -0,0 +1,406 @@
# Copyright: Public domain.
# Filename: PHASE_TABLE_MAINTENANCE.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1404-1413
# Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
# from the Colossus249/ file of the same
# name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1404
# SUBROUTINE TO UPDATE THE PROGRAM NUMBER DISPLAY ON THE DSKY.
COUNT 02/PHASE
BLOCK 02
SETLOC FFTAG1
BANK
NEWMODEX INDEX Q # UPDATE MODREG. ENTRY FOR MODE IN FIXED.
CAF 0
INCR Q
NEWMODEA TS MODREG # ENTRY FOR MODE IN A.
MMDSPLAY CAF +3 # DISPLAY MAJOR MODE.
PREBJUMP LXCH BBANK # PUTS BBANK IN L
TCF BANKJUMP # PUTS Q INTO A
CADR SETUPDSP
# RETURN TO CALLER +3 IF MODE = THAT AT CALLER +1. OTHERWISE RETURN TO CALLER +2.
CHECKMM INDEX Q
CS 0
AD MODREG
EXTEND
BZF Q+2
TCF Q+1 # NO MATCH
TCQ = Q+2 +1
BANK 14
SETLOC PHASETAB
BANK
COUNT 10/PHASE
SETUPDSP INHINT
DXCH RUPTREG1 # SAVE CALLER'S RETURN 2CADR
CAF PRIO30 # EITHER A TASK OR JOB CAN COME TO
TC NOVAC # NEWMODEX
EBANK= MODREG
2CADR DSPMMJOB
DXCH RUPTREG1
RELINT
DXCH Z # RETURN
DSPMMJOB EQUALS DSPMMJB
BLOCK 02
# Page 1405
SETLOC FFTAG1
BANK
# Page 1406
# PHASCHNG IS THE MAIN WAY OF MAKING PHASE CHANGES FOR RESTARTS. THERE ARE THREE FORMS OF PHASCHNG, KNOWN AS TYPE
# A, TYPE B, AND TYPE C. THEY ARE ALL CALLED AS FOLLOWS, WHERE OCT XXXXX CONTAINS THE PHASE INFORMATION,
# TC PHASCHNG
# OCT XXXXX
# TYPE A IS CONCERNED WITH FIXED PHASE CHANGES, THAT IS, PHASE INFORMATION THAT IS STORED PERMANENTLY. THESE
# OPTIONS ARE, WHERE G STANDS FOR A GROUP AND .X FOR THE PHASE,
# G.0 INACTIVE, WILL NOT PERMIT A GROUP G RESTART
# G.1 WILL CAUSE THE LAST DISPLAY TO BE REACTIVATED, USED MAINLY IN MANNED FLIGHTS
# G.EVEN A DOUBLE TABLE RESTART, CAN CAUSE ANY COMBINATION OF TWO JOBS, TASKS, AND/OR
# LONGCALL TO BE RESTARTED.
# G.ODD NOT .1 A SINGLE TABLE RESTART, CAN CAUSE EITHER A JOB, TASK, OR LONGCALL RESTART.
#
# THIS INFORMATION IS PUT INTO THE OCTAL WORD AFTER TC PHASCHNG AS FOLLOWS
# TL0 00P PPP PPP GGG
# WHERE EACH LETTER OR NUMBER STANTS FOR A BIT. THE G'S STAND FOR THE GROUP, OCTAL 1-7, THE P'S FOR THE PHASE,
# OCTAL 0 - 127. 0'S MUST BE 0. IF ONE WISHES TO HAVE THE TBASE OF GROUP G TO BE SET AT THIS TIME,
# T IS SET TO 1, OTHERWISE IT IS SET TO 0. SIMILARLY IF ONE WISHES TO SET LONGBASE, THEN L IS SET TO 1, OTHERWISE
# IT IS SET TO 0. SOME EXAMLES,
# TC PHASCHNG # THIS WILL CAUSE GROUP 3 TO BE SET TO 0,
# OCT 00003 # MAKING GROUP 3 INACTIVE
#
# TC PHASCHNG # IF A RESTART OCCURS THIS WOULD CAUSE
# OCT 00012 # GROUP 2 TO RESTART THE LAST DISPLAY
#
# TC PHASCHNG # THIS SETS THE TBASE OF GROUP 4 AND IN
# OCT 40064 # CASE OF A RESTART WOULD START UP THE TWO
# # THINGS LOCATED IN THE DOUBLE 4.6 RESTART
# # LOCATION.
#
# TC PHASCHNG # THIS SETS LONGBASE AND UPON A RESTART
# OCT 20135 # CAUSES 5.13 TO BE RESTARTED (SINCE
# # LONGBASE WAS SET THIS SINGLE ENTRY
# # SHOULD BE A LONGCALL)
#
# TC PHASCHNG # SINCE BOTH TBASE4 AND LONGBASE ARE SET,
# OCT 60124 # 4.12 SHOULD CONTAIN BOTH A TASK AND A
# # LONGCALL TO BE RESTARTED
#
# TYPE C PHASCHNG CONTAINS THE VARIABLE TYPE OF PHASCHNG INFORMATION. INSTEAD OF THE INFORMATION BEING IN A
# PERMANENT FORM, ONE STORES THE DESIRED RESTART INFORMATION IN A VARIABLE LOCATION. THE BITS ARE AS FOLLOWS,
# TL0 1AD XXX CJW GGG
# WHERE EACH LETTER OR NUMBER STANDS FOR A BIT. THE G'S STAND FOR THE GROUP, OCTAL 1 - 7. IF THE RESTART IS TO
# BE BY WAITLIST, W IS SET TO 1, IF IT IS A JOB, J IS SET TO 1, IF IT IS A LONGCALL, C IS SET TO 1. ONLY ONE OF
# THESE THREE BITS MAY BE SET. X'S ARE IGNORED, 1 MUST BE 1, AND 0 MUST BE 0. AGAIN T STANDS FOR THE TBASE,
# Page 1407
# AND L FOR LONGBASE. THE BITS A AND D ARE CONCERNED WITH THE VARIABLE INFORMATION. IF D IS SET TO 1, A PRIORITY
# OR DELTA TIME WILL BE READ FROM THE NEXT LOCATION AFTER THE OCTAL INFORMATION., IF THIS IS TO BE INDIRECT, THAT
# IS, THE NAME OF A LOCATION CONTAINING THE INFORMATION (DELTA TIME ONLY), THEN THIS IS GIVEN AS THE -GENADR OF
# THAT LOCATION WHICH CONTAINS THE DELTA TIME. IF THE OLD PRIORITY OR DELTA TIME IS TO BE USED, THAT WHICH IS
# ALREADY IN THE VARIABLE STORAGE, THEN D IS SET TO 0. NEXT THE A BIT IS USED. IF IT IS SET TO 0, THE ADDRESS
# THAT WOULD BE RESTARTED DURING A RESTART IS THE NEXT LOCATION AFTER THE PHASE INFORMATION, THAT IS, EITHER
# (TC PHASCHNG) +2 OR +3, DEPENDING ON WHETHER D HAD BEEN SET OR NOT. IF A IS SET TO 1, THEN THE ADDRESS THAT
# WOULD BE RESTARTED IS THE 2CADR THAT IS READ FROM THE NEXT TWO LOCATION. EXAMPLES,
# AD TC PHASCHNG # THIS WOULD CAUSE LOCATION AD +3 TO BE
# AD+1 OCT 05023 # RESTARTED BY GROUP THREE WITH A PRIORITY
# AD+2 OCT 23000 # OF 23. NOTE UPON RETURNING IT WOULD
# AD+3 # ALSO GO TO AD+3
#
# AD TC PHASCHNG # GROUP 1 WOULD CAUSE CALLCALL TO BE
# AD+1 OCT 27441 # BE STARTED AS A LONGCALL FROM THE TIME
# AD+2 -GENADR DELTIME # STORED IN LONGBASE (LONGBASE WAS SET) BY
# AD+3 2CADR CALLCALL # A DELTATIME STORED IN DELTIME. THE
# AD+4 # BBCON OF THE 2CADR SHOULD CONTAIN THE E
# AD+5 # BANK OF DELTIME. PHASCHNG RETURNS TO
# # LOCATION AD+5
#
# NOTE THAT IF A VARIABLE PRIORITY IS GIVEN FOR A JOB, THE JOB WILL BE RESTARTED AS A NOVAC IF THE PRIORITY IS
# NEGATIVE, AS A FINDVAC IF THE PRIORITY IS POSITIVE.
#
# TYPE B PHASCHNG IS A COMBINATION OF VARIABLE AND FIXED PHASE CHANGES. IT WILL START UP A JOB AS INDICATED
# BELOW AND ALSO START UP ONE FIXED RESTART, THAT IS EITHER AN G.1 OR A G.ODD OR THE FIRST ENTRY OF G.EVEN
# DOUBLE ENTRY. THE BIT INFORMATION IS AS FOLLOW,
# TL1 DAP PPP PPP GGG
# WHERE EACH LETTER OR NUMBER STANDS FOR A BIT. THE G'S STAND FOR THE GROUP, OCTAL 1 - 7, THE P'S FOR THE FIXED
# PHASE INFORMATION, OCTAL 0 - 127. 1 MUST BE 1. AND AGAIN T STANDS FOR THE TBASE AND L FOR LONGBASE. D THIS
# TIME STANDS ONLY FOR PRIORITY SINCE THIS WILL BE CONSIDERED A JOB, AND IT MUST BE GIVEN DIRECTLY IF GIVEN.
# AGAIN A STANDS FOR THE ADDRESS OF THE LOCATION TO BE RESTARTED, 1 IF THE 2CADR IS GIVEN, OR 0 IF IT IS TO BE
# THE NEXT LOCATION. (THE RETURN LOCATION OF PHASCHNG) EXAMPLES,
# AD TC PHASCHNG # TBASE IS SET AND A RESTART CAUSE GROUP 3
# AD+1 OCT 56043 # TO START THE JOB AJOBAJOB WITH PRIORITY
# AD+2 OCT 31000 # 31 AND THE FIRST ENTRY OF 3.4SPOT (WE CAN
# AD+3 2CADR AJOBAJOB # ASSUME IT IS A TASK SINCE WE SET TBASE3)
# AD+4 # UPON RETURN FROM PHASCHNG CONTROL WOULD
# AD+5 # GO TO AD+5
#
# AD TC PHASCHNG # UPON A RESTART THE LAST DISPLAY WOULD BE
# AD+1 OCT 10015 # RESTARTED AND A JOB WITH THE PREVIOUSLY
# AD+2 # STORED PRIORITY WOULD BE BEGUN AT AD+2
# # BY MEANS OF GROUP 5
# Page 1408
# THE NOVAC-FINDVAC CHOICE FOR JOBS HOLDS HERE ALSO -- NEGATIVE PRIORITY CAUSES A NOVAC CALL, POSITIVE A FINDVAC.
# SUMMARY OF BITS:
# TYPE A TL0 00P PPP PPP GGG
# TYPE B TL1 DAP PPP PPP GGG
# TYPE C TL0 1AD XXX CJW GGG
# Page 1409
# 2PHSCHNG IS USED WHEN ONE WISHES TO START UP A GROUP OR CHANGE A GROUP WHILE UNDER THE CONTROL OF A DIFFERENT
# GROUP. FOR EXAMPLE, CHANGE THE PHASE OF GROUP 3 WHILE THE PORTION OF THE PROGRAM IS UNDER GROUP 5. ALL 2PHSCHNG
# CALLS ARE MADE IN THE FOLLOWING MANNER,
# TC 2PHSCHNG
# OCT XXXXX
# OCT YYYYY
# WHERE OCT XXXXX MUST BE OF TYPE A AND OCT YYYYY MAY BE OF EITHER TYPE A OR TYPE B OR TYPE C. THERE IS ONE
# DIFFERENCE --- NOTE: IF LONGBASE IS TO BE SET THIS INFORMATION IS GIVEN IN THE OCT YYYYY INFORMATION, IT WILL
# BE DISREGARDED IF GIVEN WITH THE OCT XXXXX INFORMATION. A COUPLE OF EXAMPLES MAY HELP,
# AD TC 2PHACHNG # SET TBASE3 AND IF A RESTART OCCURS START
# AD+1 OCT 40083 # THE TWO ENTRIES IN 3.8 TABLE LOCATION
# AD+2 OCT 05025 # THIS IS OF TYPE C, SET THE JOB TO BE
# AD+3 OCT 18000 # TO BE LOCATION AD+4, WITH A PRIORITY 18,
# AD+4 # FOR GROUP 5 PHASE INFORMATION.
COUNT 02/PHASE
2PHSCHNG INHINT # THE ENTRY FOR A DOUBLE PHASE CHANGE
NDX Q
CA 0
INCR Q
TS TEMPP2
MASK OCT7
DOUBLE
TS TEMPG2
CA TEMPP2
MASK OCT17770 # NEED ONLY 1770, BUT WHY GET A NEW CONST.
EXTEND
MP BIT12
XCH TEMPP2
MASK BIT15
TS TEMPSW2 # INDICATES WHETHER TO SET TBASE OR NOT
TCF PHASCHNG +3
PHASCHNG INHINT
CA ONE # INDICATES CAME FROM A PHASCHNG ENTRY
TS TEMPSW2
NDX Q
CA 0
INCR Q
TS TEMPSW
# Page 1410
EXTEND
DCA ADRPCHN2 # OFF TO SWITCHED BANK
DTCB
EBANK= LST1
ADRPCHN2 2CADR PHSCHNG2
ONEORTWO LXCH TEMPBBCN
LXCH BBANK
LXCH TEMPBBCN
MASK OCT14000 # SEE WHAT KIND OF PHASE CHANGE IT IS
CCS A
TCF CHECKB # IT IS OF TYPE `B'.
CA TEMPP
MASK BIT7
CCS A # SHALL WE USE THE OLD PRIORITY
TCF GETPRIO # NO GET A NEW PRIORITY (OR DELTA T)
OLDPRIO NDX TEMPG # USE THE OLD PRIORITY (OR DELTA T)
CA PHSPRDT1 -2
TS TEMPPR
CON1 CA TEMPP # SEE IF A 2CADR IS GIVEN
MASK BIT8
CCS A
TCF GETNEWNM
CA Q
TS TEMPNM
CA BB
EXTEND # PICK UP USER'S SUPERBANK
ROR SUPERBNK
TS TEMPBB
TOCON2 CA CON2ADR # BACK TO SWITCHED BANK
LXCH TEMPBBCN
DTCB
CON2ADR GENADR CON2
GETPRIO NDX Q # DON'T CARE IF DIRECT OR INDIRECT
CA 0 # LEAVE THAT DECISION TO RESTARTS
INCR Q # OBTAIN RETURN ADDRESS
TCF CON1 -1
GETNEWNM EXTEND
# Page 1411
INDEX Q
DCA 0
DXCH TEMPNM
CA TWO
ADS Q # OBTAIN RETURN ADDRESS
TCF TOCON2
OCT14000 EQUALS PRIO14
TEMPG EQUALS ITEMP1
TEMPP EQUALS ITEMP2
TEMPNM EQUALS ITEMP3
TEMPBB EQUALS ITEMP4
TEMPSW EQUALS ITEMP5
TEMPSW2 EQUALS ITEMP6
TEMPPR EQUALS RUPTREG1
TEMPG2 EQUALS RUPTREG2
TEMPP2 EQUALS RUPTREG3
TEMPBBCN EQUALS RUPTREG4
BB EQUALS BBANK
BANK 14
SETLOC PHASETAB
BANK
EBANK= PHSNAME1
COUNT 10/PHASE
PHSCHNG2 LXCH TEMPBBCN
CA TEMPSW
MASK OCT7
DOUBLE
TS TEMPG
CA TEMPSW
MASK OCT17770
EXTEND
MP BIT12
TS TEMPP
CA TEMPSW
MASK OCT60000
XCH TEMPSW
MASK OCT14000
CCS A
TCF ONEORTWO
# Page 1412
CA TEMPP # START STORING THE PHASE INFORMATION
NDX TEMPG
TS PHASE1 -2
BELOW1 CCS TEMPSW2 # IS IT A PHASCHNG OR A 2PHSCHNG
TCF BELOW2 # IT'S A PHASCHNG
TCF +1 # IT'S A 2PHSCHNG
CS TEMPP2
LXCH TEMPP2
NDX TEMPG2
DXCH -PHASE1 -2
CCS TEMPSW2
NOOP # CAN'T GET HERE
TCF BELOW2
CS TIME1
NDX TEMPG2
TS TBASE1 -2
BELOW2 CCS TEMPSW # SEE IF WE SHOULD SET TBASE OR LONGBASE
TCF BELOW3 # SET LONGBASE ONLY
TCF BELOW4 # SET NEITHER
CS TIME1 # SET TBASE TO BEGIN WITH
NDX TEMPG
TS TBASE1 -2
CA TEMPSW # SHALL WE NOW SET LONGBASE
AD BIT14COM
CCS A
NOOP # ***** CAN'T GET HERE *****
BIT14COM OCT 17777 # ***** CAN'T GET HERE *****
TCF BELOW4 # NO WE NEED ONLY SET TBASE
BELOW3 EXTEND # SET LONGBASE
DCA TIME2
DXCH LONGBASE
BELOW4 CS TEMPP # AND STORE THE FINAL PART OF THE PHASE
NDX TEMPG
TS -PHASE1 -2
CA Q
LXCH TEMPBBCN
RELINT
DTCB
CON2 LXCH TEMPBBCN
# Page 1413
CA TEMPP
NDX TEMPG
TS PHASE1 -2
CA TEMPPR
NDX TEMPG
TS PHSPRDT1 -2
EXTEND
DCA TEMPNM
NDX TEMPG
DXCH PHSNAME1 -2
TCF BELOW1
BLOCK 02
SETLOC FFTAG1
BANK
COUNT 02/PHASE
CHECKB MASK BIT12 # SINCE THIS IS OF TYPE B, THIS BIT SHOULD
CCS A # BE HERE IF WE ARE TO GET A NEW PRIORITY
TCF GETPRIO # IT IS, SO GET NEW PRIORITY
TCF OLDPRIO # IT ISN'T, USE THE OLD PRIORITY.

File diff suppressed because it is too large Load Diff

867
PINBALL_NOUN_TABLES.s Normal file
View File

@ -0,0 +1,867 @@
# Copyright: Public domain.
# Filename: PINBALL_NOUN_TABLES.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 268-284
# Contact: Ron Burkey <info@sandroid.org>,
# Fabrizio Bernardini <fabrizio@spacecraft.it>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-18 FB Transcription Batch 3 Assignment.
# 2009-05-23 RSB In NNTYPTAB, corrected former 13 SPARE.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 268
# THE FOLLOWING REFERS TO THE NOUN TABLES
#
# COMPONENT CODE NUMBER INTERPRETATION
#
# 00000 1 COMPONENT
# 00001 2 COMPONENT
# 00010 3 COMPONENT
# X1XXX BIT 4 = 1. DECIMAL ONLY
# 1XXXX BIT 5 = 1. NO LOAD
#
# END OF COMPONENT CODE NUMBERS
#
# SF ROUTINE CODE NUMBER INTERPRETATION
#
# 00000 OCTAL ONLY
# 00001 STRAIGHT FRACTIONAL
# 00010 CDU DEGREES (XXX.XX)
# 00011 ARITHMETIC SF
# 00100 ARITH DP1 OUT (MULT BY 2EXP14 AT END) IN (STRAIGHT)
# 00101 ARITH DP2 OUT (STRAIGHT) IN (SL 7 AT END)
# 00110 Y OPTICS DEGREES (XX.XXX MAX 89.999)
# 00111 ARITH DP3 OUT (SL 7 AT END) IN (STRAIGHT
# 01000 WHOLE HOURS IN R1, WHOLE MINUES (MOD 60) IN R2,
# SECONDS (MOD 60) 0XX.XX IN R3. *** ALARMS IF USED WITH OCTAL
# 01001 MINUTES (MOD 60) IN D1D2, D3 BLANK, SECONDS (MOD 60) IN D4D5
# LIMITS TO 59B59 IF MAG EXCEEDS THIS VALUE.
# ALARMS IF USED WITH OCTAL ******** IN (ALARM)
# 01010 ARITH DP4 OUT (STRAIGHT) IN (SL 3 AT END)
# 01011 ARITH1 SF OUT (MULT BY 2EXP14 AT END) IN (STRAIGHT)
# 01100 2 INTEGERS IN D1D2, D4D5, D3 BLANK.
# ALARMS IF USED WITH OCTAL ******** IN (ALARM)
# 01101 DP STRAIGHT FRACTIONAL
#
# END OF SF ROUTINE CODE NUMBERS
# SF CONSTANT CODE NUMBER INTERPRETATION
#
# 00000 WHOLE USE ARITH
# 00000 DP TIME SEC (XXX.XX SEC) USE ARITHDP1
# 00001 SPARE
# 00010 CDU DEGREES USE CDU DEGREES
# 00010 Y OPTICS DEGREES USE Y OPTICS DEGREES
# 00011 DP DEGREES (90) XX.XXX DEG USE ARITHDP3
# 00100 DP DEGREES (360) XXX.XX DEG USE ARITHDP4
# 00101 DEGREES (180) XXX.XX DEG USE ARITH
# 00110 WEIGHT2 (XXXXX. LBS) USE ARITH1
# 00111 POSITION5 (XXX.XX NAUTICAL MILES)
# USE ARITHDP3
# 01000 POSITION4 (XXXX.X NAUTICAL MILES)
# Page 269
# USE ARITHDP3
# 01001 VELOCITY2 (XXXXX. FT/SEC) USE ARITHDP4
# 01010 VELOCITY3 (XXXX.X FT/SEC) USE ARITHDP3
# 01011 ELEVATION DEGREES (89.999 MAX) USE ARITH
# 01100 TRIM DEGREES (XXX.XX DEG) USE ARITH
# 01101 INERTIA (XXXXXBB. SLUG FT FT) USE ARITH
# 01101 THRUST MOMENT (XXXXXBB. FT LBS) USE ARITH
# 01110 VELOCITY/2VS (XXXXX. FT/SEC) USE ARITHDP4
# 01111 POSITION6 (XXXX.X NAUT MI) USE ARITHDP3
# 10000 DRAG ACCELERATION (XXX.XX) USE ARITHDP2
# 10001 POSITION8 (XXXX.X NAUT MI) USE ARITHDP?
# 10010 POSITION9 (XXX.XX NAUT MI) USE ARITHDP4
# 10011 VELOCITY4 (XXXX.X FT/SEC) USE ARITHDP2
#
# END OF SF CONSTANT CODE NUMBERS
# FOR GREATER THAN SINGLE PRECISION SCALES, PUT ADDRESS IN MAJOR PART INTO
# NOUN TABLES.
# OCTAL LOADS PLACE +0 INTO MAJOR PART, DATA INTO MINOR PART.
# OCTAL DISPLAYS SHOW MINOR PART ONLY.
# TO GET AT BOTH MAJOR AND MINOR PARTS (IN OCTAL), USE NOUN 01.
# A NOUN MAY BE DECLARED "DECIMAL ONLY" BY MAKING BIT4=1 OF ITS COMPONENT
# CODE NUMBER. IF THIS NOUN IS USED WITH ANY OCTAL DISPLAY VERB, OR IF
# DATA IS LOADED IN OCTAL, IT ALARMS.
# IN LOADING AN "HOURS, MINUTES, SECONDS" NOUN, ALL 3 WORDS MUST BE
# LOADED, OR ALARM.
# ALARM IF AN ATTEMPT IS MADE TO LOAD "SPLIT MINUTES/SECONDS" (MMBSS).
# THIS IS USED FOR DISPLAY ONLY.
# Page 270
# THE FOLLOWING ROUTINES ARE FOR READING THE NOUN TABLES AND THE SF TABLES
# (WHICH ARE IN A SEPARATE BANK FROM THE REST OF PINBALL). THESE READING
# ROUTINES ARE IN THE SAME BANK AS THE TABLES. THEY ARE CALLED BY DXCH Z.
# LODNNTAB LOADS NNADTEM WTIH THE NNADTAB ENTRY, NNTYPTEM WITH THE
# NNTYPTAB ENTRY. IF THE NOUN IS MIXED, IDADITEM IS LOADED WITH THE FIRST
# IDADDTAB ENTRY, IDAD2TEM THE SECOND IDADDTAB ENTRY, IDAD3TEM THE THIRD
# IDADDTAB ENTRY, RUTMXTEM WITH THE RUTMXTAB ENTRY. MIXBR IS SET FOR
# MIXED OR NORMAL NOUN.
BANK 06
SETLOC PINBALL3
BANK
COUNT 42/NOUNS
LODNNTAB DXCH IDAD2TEM # SAVE RETURN INFO IN IDAD2TEM, IDAD3TEM.
INDEX NOUNREG
CAF NNADTAB
TS NNADTEM
INDEX NOUNREG
CAF NNTYPTAB
TS NNTYPTEM
CS NOUNREG
AD MIXCON
EXTEND
BZMF LODMIXNN # NOUN NUMBER G/E FIRST MIXED NOUN
CAF ONE # NOUN NUMBER L/ FIRST MIXED NOUN
TS MIXBR # NORMAL. +1 INTO MIXBR
TC LODNLV
LODMIXNN CAF TWO # MIXED. +2 INTO MIXBR.
TS MIXBR
INDEX NOUNREG
CAF RUTMXTAB -40D # FIRST MIXED NOUN = 40.
TS RUTMXTEM
CAF LOW10
MASK NNADTEM
TS Q # TEMP
INDEX A
CAF IDADDTAB
TS IDAD1TEM # LOAD IDAD1TEM WITH FIRST IDADDTAB ENTRY
EXTEND
INDEX Q # LOAD IDAD2TEM WITH 2ND IDADDTAB ENTRY
DCA IDADDTAB +1 # LOAD IDAD3TEM WITH 3RD IDADDTAB ENTRY.
LODNLV DXCH IDAD2TEM # PUT RETURN INFO INTO A, L.
DXCH Z
MIXCON = OCT50 # FIRST MIXED NOUN =40. (DEC 40)
# GTSFOUT LOADS SFTEMP1, SFTEMP2 WTIH THE DP SFOUTAB ENTRIES.
# Page 271
GTSFOUT DXCH SFTEMP1 # 2X (SFCONUM) ARRIVES IN SFTEMP1.
EXTEND
INDEX A
DCA SFOUTAB
SFCOM DXCH SFTEMP1
DXCH Z
# GTSFIN LOADS SFTEMP1, SFTEMP2 WITH THE DP SFINTAB INTRIES.
GTSFIN DXCH SFTEMP1 # 2X (SFCONUM) ARIVES IN SFTEMP1.
EXTEND
INDEX A
DCA SFINTAB
TCF SFCOM
# NN NORMAL NOUNS
NNADTAB OCT 00000 # 00 NOT IN USE
OCT 40000 # 01 SPECIFY MACHINE ADDRESS (FRACTIONAL)
OCT 40000 # 02 SPECIFY MACHINE ADDRESS (WHOLE)
OCT 40000 # 03 SPECIFY MACHINE ADDRESS (DEGREES)
OCT 0 # 04 SPARE
ECADR DSPTEM1 # 05 ANGULAR ERROR/DIFFERENCE
ECADR OPTION1 # 06 OPTION CODE
ECADR XREG # 07 ECADR OF WORD TO BE MODIFIED
# ONES FOR BITS TO BE MODIFIED
# 1 TO SET OR 0 TO RESET SELECTED BITS
ECADR ALMCADR # 08 ALARM DATA
ECADR FAILREG # 09 ALARM CODES
OCT 77776 # 10 CHANNEL TO BE SPECIFIED
ECADR TCSI # 11 TIG OF CSI (HRS,MIN,SEC)
ECADR OPTIONX # 12 OPTION CODE
# (USED BY EXTENDED VERBS ONLY)
ECADR TCDH # 13 TIG OF CDH (HRS,MIN,SEC)
OCT 0 # 14 SPARE
OCT 77777 # 15 INCREMENT MACHINE ADDRESS
ECADR DSPTEMX # 16 TIME OF EVENT (HRS,MIN,SEC)
ECADR CPHIX # 17 ASTRONAUT TOTAL ATTITUDE
ECADR THETAD # 18 AUTO MANEUVER BALL ANGLES
ECADR THETAD # 19 BYPASS ATTITUDE TRIM MANEUVER
ECADR CDUX # 20 ICDU ANGLES
ECADR PIPAX # 21 PIPAS
ECADR THETAD # 22 NEW ICDU ANGLES
OCT 00000 # 23 SPARE
ECADR DSPTEM2 +1 # 24 DELTA TIME FOR AGC CLOCK (HRS,MIN,SEC)
ECADR DSPTEM1 # 25 CHECKLIST
# (USED WTIH PLEASE PERFORM ONLY)
ECADR DSPTEM1 # 26 PRIO/DELAY, ADRES, BBCON
ECADR SMODE # 27 SELF TEST ON/OFF SWITCH
# Page 272
OCT 0 # 28 SPARE
ECADR DSPTEM1 # 29 XSM LAUNCH AZIMUTH
ECADR DSPTEM1 # 30 TARGET CODES
ECADR DSPTEM1 # 31 TIME OF LANDING SITE (HRS,MIN,SEC)
ECADR -TPER # 32 TIME TO PERIGEE (HRS,MIN,SEC)
ECADR TIG # 33 TIME OF IGNITION (HRS,MIN,SEC)
ECADR DSPTEM1 # 34 TIME OF EVENT (HRS,MIN,SEC)
ECADR TTOGO # 35 TIME TO GO TO EVENT (HRS,MIN,SEC)
ECADR TIME2 # 36 TIME OF AGC CLOCK (HRS,MIN,SEC)
ECADR TTPI # 37 TIG OF TPI (HRS,MIN,SEC)
ECADR TET # 38 TIME OF STATE VECTOR
ECADR T3TOT4 # 39 DELTA TIME TO TRANSFER (HRS,MIN,SEC)
# END OF NNADTAB FOR NORMAL NOUNS
# NN MIXED NOUNS
OCT 64000 # 40 TIME TO IGNITION/CUTOFF
# VG
# DELTA V (ACCUMULATED)
OCT 02003 # 41 TARGET AZIMUTH
# ELEVATION
OCT 24006 # 42 APOGEE
# PERIGEE
# DELTA V (REQUIRED)
OCT 24011 # 43 LATITUDE
# LONGITUDE
# ALTITUDE
OCT 64014 # 44 APOGEE
# PERIGEE
# TFF
OCT 64017 # 45 MARKS (VHF - OPTIC)
# TTI OF NEXT BURN
# MGA
OCT 02022 # 46 AUTOPILOT CONFIGURATION
OCT 22025 # 47 THIS VEHICLE WEIGHT
# OTHER VEHICLE WEIGHT
OCT 22030 # 48 PITCH TRIM
# YAW TRIM
OCT 24033 # 49 DELTA R
# DELTA V
# VHF OR OPTICS CODE
OCT 64036 # 50 SPLASH ERROR
# PERIGEE
# TFF
OCT 22041 # 51 S-BAND ANTENNA PITCH
# YAW
OCT 00044 # 52 CENTRAL ANGLE OF ACTIVE VEHICLE
OCT 24047 # 53 RANGE
# RANGE RATE
# PHI
# Page 273
OCT 24052 # 54 RANGE
# RANGE RATE
# THETA
OCT 24055 # 55 PERIGEE CODE
# ELEVATION ANGLE
# CENTRAL ANGLE
OCT 22060 # 56 REENTRY ANGLE,
# DELTA V
OCT 20063 # 57 DELTA R
OCT 24066 # 58 PERIGEE ALT
# DELTA V TPI
# DELTA V TPF
OCT 24071 # 59 DELTA VELOCITY LOS
OCT 24074 # 60 GMAX
# VPRED
# GAMMA EI
OCT 24077 # 61 IMPACT LATITUDE
# IMPACT LONGITUDE
# HEADS UP/DOWN
OCT 24102 # 62 INERTIAL VEL MAG (V1)
# ALT RATE CHANGE (HDOT)
# ALT ABOVE PAD RADIUS (H)
OCT 64105 # 63 RANGE 297,431 TO SPLASH (RTGO)
# PREDICTED INERT VEL (VIO)
# TIME TO GO TO 297,431 (TTE)
OCT 24110 # 64 DRAG ACCELERATION
# INERTIAL VELOCITY (VI)
# RANGE TO SPLASH
OCT 24113 # 65 SAMPLED AGC TIME (HRS,MIN,SEC)
# (FETCHED IN INTERRUPT)
OCT 24116 # 66 COMMAND BANK ANGLE (BETA)
# CROSS RANGE ERROR
# DOWN RANGE ERROR
OCT 24121 # 67 RANGE TO TARGET
# PRESENT LATITUDE
# PRESENT LONGITUDE
OCT 24124 # 68 COMMAND BANK ANGLE (BETA)
# INERTIAL VELOCITY (VI)
# ALT RATE CHANGE (RDOT)
OCT 24127 # 69 BETA
# DL
# VL
OCT 04132 # 70 STAR CODE
# LANDMARK DATA
# HORIZON DATA
OCT 04135 # 71 STAR CODE
# LANDMARK DATA
# HORIZON DATA
OCT 24140 # 72 DELT ANG
# DELT ALT
# Page 274
# SEARCH OPTION
OCT 04143 # 73 ALTITUDE
# VELOCITY
# FLIGHT PATH ANGLE
OCT 04146 # 74 COMMAND BANK ANGLE (BETA)
# INERTIAL VELOCITY (VI)
# DRAG ACCELERATION
OCT 64151 # 75 DELTA ALTITUDE CDH
# DELTA TIME (CDH-CSI OR TPI-CDH)
# DELTA TIME (TPI-CDH OR TPI-NOMTPI)
OCT 0 # 76 SPARE
OCT 0 # 77 SPARE
OCT 0 # 78 SPARE
OCT 0 # 79 SPARE
OCT 64170 # 80 TIME TO IGNITION/CUTOFF
# VG
# DELTA V (ACCUMULATED)
OCT 24173 # 81 DELTA V (LV)
OCT 24176 # 82 DELTA V (LV)
OCT 24201 # 83 DELTA V (BODY)
OCT 24204 # 84 DELTA V (OTHER VEHICLE)
OCT 24207 # 85 VG (BODY)
OCT 24212 # 86 DELTA V (LV)
OCT 02215 # 87 MARK DATA SHAFT
# TRUNION
OCT 24220 # 88 HALF UNIT SUN OR PLANET VECTOR
OCT 24223 # 89 LANDMARK LATITUDE
# LONGITUDE/2
# ALTITUDE
OCT 24226 # 90 Y
# Y DOT
# PSI
OCT 02231 # 91 OCDU ANGLES SHAFT
# TRUNION
OCT 02234 # 92 NEW OPTICS ANGLES SHAFT
# TRUNION
OCT 04237 # 93 DELTA GYRO ANGLES
OCT 02242 # 94 NEW OPTICS ANGLES SHAFT
# TRUNNION
OCT 04245 # 95 PREFERRED ATTITUDE ICDU ANGLES
OCT 04250 # 96 +X-AXIS ATTITUDE ICDU ANGLES
OCT 04253 # 97 SYSTEM TEST INPUTS
OCT 04256 # 98 SYSTEM TEST RESULTS
OCT 24261 # 99 RMS IN POSITION
# RMS IN VELOCITY
# RMS OPTION
# END OF NNADTAB FOR MIXED NOUNS
# NN NORMAL NOUNS
# Page 275
NNTYPTAB OCT 00000 # 00 NOT IN USE
OCT 04040 # 01 3COMP FRACTIONAL
OCT 04140 # 02 3COMP WHOLE
OCT 04102 # 03 3COMP CDU DEGREES
OCT 0 # 04 SPARE
OCT 00504 # 05 1COMP DPDEG(360)
OCT 02000 # 06 2COMP OCTAL ONLY
OCT 04000 # 07 3COMP OCTAL ONLY
OCT 04000 # 08 3COMP OCTAL ONLY
OCT 04000 # 09 3COMP OCTAL ONLY
OCT 00000 # 10 1COMP OCTAL ONLY
OCT 24400 # 11 3COMP HMS (DEC ONLY)
OCT 02000 # 12 2COMP OCTAL ONLY
OCT 24400 # 13 3COMP HMS (DEC ONLY)
OCT 0 # 14 SPARE
OCT 00000 # 15 1COMP OCTAL ONLY
OCT 24400 # 16 3COMP HMS (DEC ONLY)
OCT 04102 # 17 3COMP CDU DEG
OCT 04102 # 18 3COMP CDU DEG
OCT 04102 # 19 3COMP CDU DEG
OCT 04102 # 20 3COMP CDU DEGREES
OCT 04140 # 21 3COMP WHOLE
OCT 04102 # 22 3COMP CDU DEGREES
OCT 00000 # 23 SPARE
OCT 24400 # 24 3COMP HMS (DEC ONLY)
OCT 04140 # 25 3COMP WHOLE
OCT 04000 # 26 3COMP OCTAL ONLY
OCT 00140 # 27 1COMP WHILE
OCT 00000 # 28 SPARE
OCT 20102 # 29 1COMP CDU DEG (DEC ONLY)
OCT 04140 # 30 3COMP WHOLE
OCT 24400 # 31 3COMP HMS (DEC ONLY)
OCT 24400 # 32 3COMP HMS (DEC ONLY)
OCT 24400 # 33 3COMP HMS (DEC ONLY)
OCT 24400 # 34 3COMP HMS (DEC ONLY)
OCT 24400 # 35 3COMP HMS (DEC ONLY)
OCT 24400 # 36 3COMP HMS (DEC ONLY)
OCT 24400 # 37 3COMP HMS (DEC ONLY)
OCT 24400 # 38 3COMP HMS (DEC ONLY)
OCT 24400 # 39 3COMP HMS (DEC ONLY)
# END OF NNTYPTAB FOR NORMAL NOUNS
# NN MIXED NOUNS
OCT 24500 # 40 3COMP MIN/SEC, VEL3, VEL3
# (NO LOAD, DEC ONLY)
OCT 00542 # 41 2COMP CDU DEG, ELEV DEG
OCT 24410 # 42 3COMP POS4, POS4, VEL3
# (DEC ONLY)
OCT 20204 # 43 3COMP DPDEG(360), DPDEG(360) POS4
# Page 276
# (DEC ONLY)
OCT 00410 # 44 3COMP POS4, POS4, MIN/SEC
# (NO LOAD, DEC ONLY)
OCT 10000 # 45 3COMP 2INT, MIN/SEC, DPDEG(360)
# (NO LOAD, DEC ONLY)
OCT 00000 # 46 2COMP OCTAL ONLY FOR EACH
OCT 00306 # 47 2COMP WEIGHT2 FOR EACH
# (DEC ONLY)
OCT 00614 # 48 2COMP TRIM DEG, TRIM DEG
# (DEC ONLY)
OCT 00510 # 49 3COMP POS4, VEL3, WHOLE
# (DEC ONLY)
OCT 00417 # 50 3COMP POS6, POS4, MIN/SEC
# (NO LOAD, DEC ONLY)
OCT 00204 # 51 2COMP DPDEG(360), DPDEG(360)
# (DEC ONLY)
OCT 00004 # 52 1COMP DPDEG(360)
OCT 10507 # 53 3COMP POS5, VEL3, DPDEG(360)
# (DEC ONLY)
OCT 10507 # 54 3COMP POS5, VEL3, DPDEG(360)
# (DEC ONLY)
OCT 10200 # 55 3COMP WHOLE, DPDEG(360), DPDEG(360)
# (DEC ONLY)
OCT 00444 # 56 2COMP DPDEG(360), VEL2
# (DEC ONLY)
OCT 00010 # 57 1COMP POS4
# (DEC ONLY)
OCT 24510 # 58 3COMP POS4, VEL3, VEL3
# (DEC ONLY)
OCT 24512 # 59 3COMP VEL3 FOR EACH
# (DEC ONLY)
OCT 10440 # 60 3COMP WHOLE, VEL2, DPDEG(360)
# (DEC ONLY)
OCT 00204 # 61 3COMP DPDEG(360), DPDEG(360), WHOLE
# (DEC ONLY)
OCT 20451 # 62 3COMP VEL2, VEL2, POS4
# (DEC ONLY)
OCT 00457 # 63 3COMP POS6, VEL2, MIN/SEC
# (NO LOAD, DEC ONLY)
OCT 36460 # 64 3COMP DRAG ACCEL, VEL2, POS6
# (DEC ONLY)
OCT 00000 # 65 3COMP HMS (DEC ONLY)
OCT 37044 # 66 3COMP DPDEG(360), POS8, POS6
# (DEC ONLY)
OCT 10217 # 67 3COMP POS6, DPDEG(360), DPDEG(360)
# (DEC ONLY)
OCT 34444 # 68 3COMP DPDEG(360), VEL2, VEL/2VS
# (DEC ONLY)
OCT 35004 # 69 3COMP DPDEG(360), DRAG ACCEL, VEL/2VS
# (DEC ONLY)
# Page 277
OCT 00000 # 70 3COMP OCTAL ONLY FOR EACH
OCT 0 # 71 3COMP OCTAL ONLY FOR EACH
OCT 00404 # 72 3COMP DPDEG(360), POS4, WHOLE
# (DEC ONLY)
OCT 10450 # 73 3COMP POS4, VEL2, DPDEG(360)
OCT 40444 # 74 3COMP DPDEG(360), VEL2, DRAG ACCEL
OCT 00010 # 75 3COMP POS4, MIN/SEC, MIN/SEC
# # (NO LOAD, DEC ONLY)
OCT 0 # 76 SPARE
OCT 0 # 77 SPARE
OCT 0 # 78 SPARE
OCT 0 # 79 SPARE
OCT 22440 # 80 3COMP MIN/SEC, VEL2, VEL2
# (NO LOAD, DEC ONLY)
OCT 24512 # 81 3COMP VEL3 FOR EACH
# (NO LOAD, DEC ONLY)
OCT 24512 # 82 3COMP VEL3 FOR EACH
# (NO LOAD, DEC ONLY)
OCT 24512 # 83 3COMP VEL3 FOR EACH
# (DEC ONLY)
OCT 24512 # 84 3COMP VEL3 FOR EACH
# (DEC ONLY)
OCT 24512 # 85 3COMP VEL3 FOR EACH
# (DEC ONLY)
OCT 22451 # 86 3COMP VEL2 FOR EACH
# (DEC ONLY)
# (DEC ONLY)
OCT 00102 # 87 2COMP CDU DEG, Y OPTICS DEG
OCT 0 # 88 3COMP FRAC FOR EACH
# (DEC ONLY)
OCT 16143 # 89 3COMP DPDEG(90), DPDEG(90), POS5
# (DEC ONLY)
OCT 10507 # 90 3COMP POS5, VEL3, DEPDEG(360)
# (DEC ONLY)
OCT 00102 # 91 2COMP CDUDEG, YOPTICS DEG
OCT 00102 # 92 2COMP CDUDEG, YOPTICS DEG
OCT 06143 # 93 3COMP DPDEG(90) FOR EACH
OCT 00102 # 94 2COMP CDUDEG, YOPTICS DEG
OCT 04102 # 95 3COMP CDU DEG FOR EACH
OCT 04102 # 96 3COMP CDU DEG FOR EACH
OCT 00000 # 97 3COMP WHOLE FOR EACH
OCT 00000 # 98 3COMP WHOLE, FRAC, WHOLE
OCT 01162 # 99 3COMP POS9, VEL4, WHOLE
# (DEC ONLY)
# END OF NNTYPTAB FOR MIXED NOUNS
SFINTAB OCT 00006 # WHOLE, DP TIME (SEC)
OCT 03240
OCT 00000 # SPARE
OCT 00000
# Page 278
OCT 00000 # CDU DEGREES, Y OPTICS DEGREES
OCT 00000 # (SFCONS IN DEGINSF, OPTDEGIN)
OCT 10707 # DP DEGREES (90)
OCT 03435 # UPPED BY 1
OCT 13070 # DP DEGREES (360) (POINT BETWN BITS 11-12)
OCT 34345 # UPPED BY 1
OCT 00005 # DEGREES (180)
OCT 21616
OCT 26113 # WEIGHT2
OCT 31713
OCT 00070 # POSITION5
OCT 20460
OCT 01065 # POSITION4
OCT 05740
OCT 11414 # VELOCITY2 (POINT BETWN BITS 11-12)
OCT 31463
OCT 07475 # VELOCITY3
OCT 16051
OCT 00001 # ELEVATION DEGREES
OCT 03434
OCT 00002 # TRIM DEGREES
OCT 22245
OCT 00014 # INERTIA, THRUST MOMENT
OCT 35607
OCT 07606 # VELOCITY/2VS
OCT 06300
OCT 16631 # POSITION 6
OCT 11307
OCT 12000 # DRAG ACCELERATION (POINT BETWN BITS 7-8)
OCT 00000
OCT 27176 # POSITION 8
OCT 14235
2DEC 30480 B-19 # POSITION 9
2DEC 30.48 B-7 # VELOCITY4
# END OF SFINTAB
SFOUTAB OCT 05174 # WHOLE, DP TIME (SEC)
OCT 13261
OCT 00000 # SPARE
OCT 00000
OCT 00000 # CDU DEGREES, Y OPTICS DEGREES
OCT 00000 # (SFCONS IN DEGOUTSF, OPTDEGOUT)
OCT 00714 # DP DEGREES (90) (POINT BETWN BITS 7-8)
OCT 31463
OCT 13412 # DP DEGREES (360)
OCT 07534
OCT 05605 # DEGREES (180)
# Page 279
OCT 03656
OCT 00001 # WEIGHT2
OCT 16170
OCT 00441 # POSITION5
OCT 34306
OCT 07176 # POSITION4
OCT 21603
OCT 15340 # VELOCITY2
OCT 15340
OCT 01031 # VELOCITY3 (POINT BETWN BITS 7-8)
OCT 21032
OCT 34631 # ELEVATION DETREES
OCT 23146
OCT 14340 # TRIM DEGREES
OCT 24145
OCT 02363 # INERTIA, THRUST MOMENT
OCT 03721
OCT 20373 # VELOCITY/ZVS
OCT 02122
OCT 00424 # POSITION 6 (POINT BETWN BITS 7-8)
OCT 30446
OCT 00631 # DRAG ACCELERATION
OCT 23146
OCT 00260 # POSITION 8
OCT 06213
2DEC 17.2010499 B-7 # POSITION 9
2DEC .032808399 # VELOCITY4
# END OF SFOUTAB
# NN SF CONSTANT SF ROUTINE
IDADDTAB ECADR TTOGO # 40 MIN/SEC M/S
ECADR VGDISP # 40 VEL3 DP3
ECADR DVTOTAL # 40 VEL3 DP3
ECADR DSPTEM1 # 41 CDU DEG CDU
ECADR DSPTEM1 +1 # 41 ELEV DEG ARTH
OCT 0 # 41 SPARE COMPONENT
ECADR HAPO # 42 POS4 DP3
ECADR HPER # 42 POS4 DP3
ECADR VGDISP # 42 VEL3 DP3
ECADR LAT # 43 DPDEG(360) DP4
ECADR LONG # 43 DPDEG(360 DP4
ECADR ALT # 43 POS4 DP3
ECADR HAPOX # 44 POS4 DP3
ECADR HPERX # 44 POS4 DP3
ECADR TFF # 44 MIN/SEC M/S
ECADR VHFCNT # 45 2INT 2INT
# Page 280
ECADR TTOGO # 45 MIN/SEC M/S
ECADR +MGA # 45 DPDEG(360) DP4
ECADR DAPDATR1 # 46 OCTAL ONLY OCT
ECADR DAPDATR2 # 46 OCATAL ONLY OCT
OCT 0 # 46 SPARE COMPONENT
ECADR CSMMASS # 47 WEIGHT2 ARTH1
ECADR LEMMASS # 47 WEIGHT2 ARTH1
OCT 00000 # 47 SPARE COMPONENT
ECADR PACTOFF # 48 TRIM DEG2 ARTH
ECADR YACTOFF # 48 TRIM DEG2 ARTH
OCT 00000 # 48 SPARE COMPONENT
ECADR N49DISP # 49 POS4 DP3
ECADR N49DISP +2 # 49 VEL3 DP3
ECADR N49DISP +4 # 49 WHOLE ARTH
ECADR RSP-RREC # 50 POS6 DP3
ECADR HPERX # 50 POS4 DP3
ECADR TFF # 50 MIN/SEC M/S
ECADR RHOSB # 51 DPDEG(360)
ECADR GAMMASB # 51 DPDEG(360) DP4
OCT 0 # 51 SPARE COMPONENT
ECADR ACTCENT # 52 DPDEG(360) DP4
OCT 00000 # 52 SPARE COMPONENT
OCT 00000 # 52 SPARE COMPONENT
ECADR RANGE # 53 POS5 DP1
ECADR RRATE # 53 VEL3 DP3
ECADR RTHETA # 53 DPDEG(360) DP4
ECADR RANGE # 54 POS5 DP1
ECADR RRATE # 54 VEL3 DP3
ECADR RTHETA # 54 DPDEG(360) DP4
ECADR NN1 # 55 WHOLE ARTH
ECADR ELEV # 55 DPDEG(360) DP4
ECADR CENTANG # 55 DPDEG(360) DP4
ECADR RTEGAM2D # 56 DPDEG(360) DP4
ECADR RTEDVD # 56 VEL2 DP4
OCT 0 # 56 SPARE COMPONENT
ECADR DELTAR # 57 POS4 DP3
OCT 0 # 57 SPARE COMPONENT
OCT 0 # 57 SPARE COMPONENT
ECADR POSTTPI # 58 POS4 DP3
ECADR DELVTPI # 58 VEL3 DP3
ECADR DELVTPF # 58 VEL3 DP3
ECADR DVLOS # 59 VEL3 DP3
ECADR DVLOS +2 # 59 VEL3 DP3
ECADR DVLOS +4 # 59 VEL3 DP3
ECADR GMAX # 60 WHOLE ARTH
ECADR VPRED # 60 VEL2 DP4
ECADR GAMMAEI # 60 DPDEG(360) DP4
ECADR LAT(SPL) # 61 DPDEG(360) DP4
ECADR LNG(SPL) # 61 DPDEG(360) DP4
ECADR HEADSUP # 61 WHOLE ARTH
# Page 281
ECADR VMAGI # 62 VEL2 DP4
ECADR HDOT # 62 VEL2 DP4
ECADR ALTI # 62 POS4 DP3
ECADR RTGO # 63 POS6 DP3
ECADR VIO # 63 VEL2 DP4
ECADR TTE # 63 MIN/SEC M/S
ECADR D # 64 DRAG ACCEL DP2
ECADR VMAGI # 64 VEL2 DP4
ECADR RTGON64 # 64 POS6 DP3
ECADR SAMPTIME # 65 HMS (MIXED ONLY TO KEEP CODE 65) HMS
ECADR SAMPTIME # 65 HMS HMS
ECADR SAMPTIME # 65 HMS HMS
ECADR ROLLC # 66 DPDEG(360) DP4
ECADR XRNGERR # 66 POS8 DP3
ECADR DNRNGERR # 66 POS6 DP3
ECADR RTGON67 # 67 POS6 DP3
ECADR LAT # 67 DPDEG(360) DP4
ECADR LONG # 67 DPDEG(360) DP4
ECADR ROLLC # 68 DPDEG(360) DP4
ECADR VMAGI # 68 VEL2 DP4
ECADR RDOT # 68 VEL/2VS DP4
ECADR ROLLC # 69 DPDEG(360) DP4
ECADR Q7 # 69 DRAG ACCEL DP2
ECADR VL # 69 VEL/2VS DP4
ECADR STARCODE # 70 OCTAL ONLY OCT
ECADR LANDMARK # 70 OCTAL ONLY OCT
ECADR HORIZON # 70 OCTAL ONLY OCT
ECADR STARCODE # 71 OCTAL ONLY OCT
ECADR LANDMARK # 71 OCTAL ONLY OCT
ECADR HORIZON # 71 OCTAL ONLY OCT
ECADR THETZERO # 72 DPDEG(360) DP4
ECADR DELHITE # 72 POS4 DP3
ECADR OPTION2 # 72 WHOLE ARTH
ECADR P21ALT # 73 POS4 DP3
ECADR P21VEL # 73 VEL2 DP4
ECADR P21GAM # 73 DPDEG(360) DP4
ECADR ROLLC # 74 DPDEG(360) DP4
ECADR VMAGI # 74 VEL 2 DP4
ECADR D # 74 DRAG ACCEL DP2
ECADR DIFFALT # 75 POS4 DP3
ECADR T1TOT2 # 75 MIN/SEC M/S
ECADR T2TOT3 # 75 MIN/SEC M/S
OCT 0 # 76 SPARE
OCT 0 # 76 SPARE
OCT 0 # 76 SPARE
OCT 0 # 77 SPARE
OCT 0 # 77 SPARE
OCT 0 # 77 SPARE
OCT 0 # 78 SPARE
OCT 0 # 78 SPARE
# Page 282
OCT 0 # 78 SPARE
OCT 0 # 79 SPARE
OCT 0 # 79 SPARE
OCT 0 # 79 SPARE
ECADR TTOGO # 80 MIN/SEC M/S
ECADR VGDISP # 80 VEL2 DP4
ECADR DVTOTAL # 80 VEL2 DP4
ECADR DELVLVC # 81 VEL3 DP3
ECADR DELVLVC +2 # 81 VEL3 DP3
ECADR DELVLVC +4 # 81 VEL3 DP3
ECADR DELVLVC # 82 VEL3 DP3
ECADR DELVLVC +2 # 82 VEL3 DP3
ECADR DELVLVC +4 # 82 VEL3 DP3
ECADR DELVIMU # 83 VEL3 DP3
ECADR DELVIMU +2 # 83 VEL3 DP3
ECADR DELVIMU +4 # 83 VEL3 DP3
ECADR DELVOV # 84 VEL3 DP3
ECADR DELVOV +2 # 84 VEL3 DP3
ECADR DELVOV +4 # 84 VEL3 DP3
ECADR VGBODY # 85 VEL3 DP3
ECADR VGBODY +2 # 85 VEL3 DP3
ECADR VGBODY +4 # 85 VEL3 DP3
ECADR DELVLVC # 86 VEL3 DP3
ECADR DELVLVC +2 # 86 VEL3 DP3
ECADR DELVLVC +4 # 86 VEL3 DP3
ECADR MRKBUF1 +3 # 87 CDU DEG CDU
ECADR MRKBUF1 +5 # 87 Y OPTICS DEG YOPT
OCT 0 # 87 SPARE COMPONENT
ECADR STARSAV3 # 88 DPFRAC DPFRAC
ECADR STARSAV3 +2 # 88 DPFRAC DPFRAC
ECADR STARSAV3 +4 # 88 DPFRAC DPFRAC
ECADR LANDLAT # 89 DPDEG(90) DP3
ECADR LANDLONG # 89 DPDEG(90) DP3
ECADR LANDALT # 89 POS5 DP1
ECADR RANGE # 90 POS5 DP1
ECADR RRATE # 90 VEL3 DP3
ECADR RTHETA # 90 DPDEG(360) DP4
ECADR CDUS # 91 CDU DEG CDU
ECADR CDUT # 91 Y OPTICS DEG YOPT
OCT 0 # 91 SPARE COMPONENT
ECADR SAC # 92 CDU DEG CDU
ECADR PAC # 92 Y OPTICS DEG YOPT
OCT 0 # 92 SPARE COMPONENT
ECADR OGC # 93 DPDEG(90) DP3
ECADR OGC +2 # 93 DPDEG(90) DP3
ECADR OGC +4 # 93 DPDEG(90) DP3
ECADR MRKBUF1 +3 # 94 CDU DEG CDU
ECADR MRKBUF1 +5 # 94 Y OPTICS DEG YOPT
OCT 00000 # 94 SPARE
ECADR PRAXIS # 95 CDU DEG CDU
# Page 283
ECADR PRAXIS +1 # 95 CDU DEG CDU
ECADR PRAXIS +2 # 95 CDU DEG CDU
ECADR CPHIX # 96 CDU DEG CDU
ECADR CPHIX +1 # 96 CDU DEG CDU
ECADR CPHIX +2 # 96 CDU DEG CDU
ECADR DSPTEM1 # 97 WHOLE ARTH
ECADR DSPTEM1 +1 # 97 WHOLE ARTH
ECADR DSPTEM1 +2 # 97 WHOLE ARTH
ECADR DSPTEM2 # 98 WHOLE ARTH
ECADR DSPTEM2 +1 # 98 FRAC FRAC
ECADR DSPTEM2 +2 # 98 WHOLE ARTH
ECADR WWPOS # 99 POS9 DP3
ECADR WWVEL # 99 VEL4 DP2
ECADR WWOPT # 99 WHOLE ARTH
# END OF IDADDTAB
# NN SF ROUTINES
RUTMXTAB OCT 16351 # 40 M/S, DP3, DP3
OCT 00142 # 41 CDU, ARTH
OCT 16347 # 42 DP3, DP3, DP3
OCT 16512 # 43 DP4, DP4, DP3
OCT 22347 # 44 DP3, DP3, M/S
OCT 24454 # 45 2INT, M/S, DP4
OCT 00000 # 46 OCT, OCT
OCT 00553 # 47 ARITH1, ARITH1
OCT 00143 # 48 ARTH, ARTH
OCT 06347 # 49 DP3, DP3, ARTH
OCT 22347 # 50 DP3, DP3, M/S
OCT 00512 # 51 DP4, DP4
OCT 00012 # 52 DP4
OCT 24344 # 53 DP1, DP3, DP4
OCT 24344 # 54 DP1, DP3, DP4
OCT 24503 # 55 ARTH, DP4, DP4
OCT 00512 # 56 DP4, DP4
OCT 00007 # 57 DP3
OCT 16347 # 58 DP3, DP3, DP3
OCT 16347 # 59 DP3, DP3, DP3
OCT 24503 # 60 ARTH, DP4, DP4
OCT 06512 # 61 DP4, DP4, ARTH
OCT 16512 # 62 DP4, DP4, DP3
OCT 22507 # 63 DP3, DP4, M/S
OCT 16505 # 64 DP2, DP4, DP3
OCT 20410 # 65 HMS, HMS, HMS
OCT 16352 # 66 DP4, DP3, DP3
OCT 24507 # 67 DP3, DP4, DP4
OCT 24512 # 68 DP4, DP4, DP4
OCT 24252 # 69 DP4, DP2, DP4
OCT 00000 # 70 OCT, OCT, OCT
# Page 284
OCT 0 # 71 OCT, OCT,OCT
OCT 06352 # 72 DP4, DP3, ARTH
OCT 24507 # 73 DPR, DP4, DP4
OCT 12512 # 74 DP4, DP4, DP2
OCT 22447 # 75 DP3, M/S, M/S
OCT 0 # 76 SPARE
OCT 0 # 77 SPARE
OCT 0 # 78 SPARE
OCT 0 # 79 SPARE
OCT 24511 # 80 M/S, DP4, DP4
OCT 16347 # 81 DP3, DP3, DP3
OCT 16347 # 82 DP3, DP3, DP3
OCT 16347 # 83 DP3, DP3, DP3
OCT 16347 # 84 DP3, DP3, DP3
OCT 16347 # 85 DP3, DP3, DP3
OCT 24512 # 86 DP4, DP4, DP4
OCT 00302 # 87 CDU, YOPT
OCT 32655 # 88 DPFRAC FOR EACH
OCT 10347 # 89 DP3, DP3, DP1
OCT 24344 # 90 DP1, DP3, DP4
OCT 00302 # 91 CDU, YOPT
OCT 00302 # 92 CDU, YOPT
OCT 16347 # 93 DP3, DP3, DP3
OCT 00302 # 94 CDU, YOPT
OCT 04102 # 95 CDU, CDU, CDU
OCT 04102 # 96 CDU, CDU, CDU
OCT 06143 # 97 ARTH, ARTH, ARTH
OCT 06043 # 98 ARTH, FRAC, ARTH
OCT 06247 # 99 DP3, DP2, ARTH
# END OF RUTMXTAB
SBANK= LOWSUPER

View File

@ -0,0 +1,390 @@
# Copyright: Public domain.
# Filename: PLANETARY_INERTIAL_ORIENTATION.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1243-1251
# Mod history: 2009-05-14 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1243
# PLANETARY INERTIAL ORIENTATION
#
# ***** RP-TO-R SUBROUTINE *****
# SUBROUTINE TO CONVERT RP (VECTOR IN PLANETARY COORDINATE SYSTEM, EITHER
# EARTH-FIXED OR MOON-FIXED) TO R (SAME VECTOR IN BASIC REF. SYSTEM)
# R = MT(T) * (RP + LP X RP) MT = M MATRIX TRANSPOSE
#
# CALLING SEQUENCE
# L CALL
# L+1 RP-TO-R
#
# SUBROUTINES USED
# EARTHMX, MOONMX, EARTHL
#
# ITEMS AVAILABLE FROM LAUNCH DATA
# 504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
# IN THE MOON-FIXED COORD. SYSTEM RADIANS B0
#
# ITEMS NECESSARY FOR SUBR. USED (SEE DESCRIPTION OF SUBR.)
#
# INPUT
# MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
# 0-5D = RP VECTOR
# 6-7D = TIME
#
# OUTPUT
# MPAC = R VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
SETLOC PLANTIN
BANK
COUNT* $$/LUROT
RP-TO-R STQ BHIZ
RPREXIT
RPTORA
CALL # COMPUTE M MATRIX FOR MOON
MOONMX # LP=LM FOR MOON RADIANS B0
VLOAD
504LM
RPTORB VXV VAD
504RPR
504RPR
VXM GOTO
MMATRIX # MPAC=R=MT(T)*(RP+LPXRP)
RPRPXXXX # RESET PUSHLOC TO 0 BEFORE EXITING
RPTORA CALL # EARTH COMPUTATIONS
EARTHMX # M MATRIX B-1
CALL
EARTHL # L VECTOR RADIANS B0
MXV VSL1 # LP=M(T)*L RAD B-0
MMATRIX
# Page 1244
GOTO
RPTORB
# Page 1245
# ***** R-TO-RP SUBROUTINE *****
# SUBROUTINE TO CONVERT R (VECTOR IN REFERENCE COORD. SYSTEM) TO RP
# (VECTOR IN PLANETARY COORD SYSTEM) EITHER EARTH-FIXED OR MOON-FIXED
# RP = M(T) * (R - L X R)
#
# CALLING SEQUENCE
# L CALL
# L+1 R-TO-RP
#
# SUBROUTINES USED
# EARTHMX, MOONMX, EARTHL
#
# INPUT
# MPAC = 0 FOR EARTH, NON-ZERO FOR MOON
# 0-5D = R VECTOR
# 6-7D = TIME
#
# ITEMS AVAILABLE FROM LAUNCH DATA
# 504LM = THE LIBRATION VECTOR L OF THE MOON AT TIME TIMSUBL, EXPRESSED
# IN THE MOON-FIXED COORD. SYSTEM RADIANS B0
#
# ITEMS NECESSARY FOR SUBROUTINES USED (SEE DESCRIPTION OF SUBR.)
#
# OUTPUT
# MPAC = RP VECTOR METERS B-29 FOR EARTH, B-27 FOR MOON
R-TO-RP STQ BHIZ
RPREXIT
RTORPA
CALL
MOONMX
VLOAD VXM
504LM # LP=LM
MMATRIX
VSL1 # L = MT(T)*LP RADIANS B0
RTORPB VXV BVSU
504RPR
504RPR
MXV # M(T)*(R-LXR) B-2
MMATRIX
RPRPXXXX VSL1 SETPD
0D
GOTO
RPREXIT
RTORPA CALL # EARTH COMPUTATIONS
EARTHMX
CALL
EARTHL
GOTO # MPAC=L=(-AX,-AY,0) RAD B-0
RTORPB
# Page 1246
# ***** MOONMX SUBROUTINE *****
# SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE MOON
#
# CALLING SEQUENCE
# L CALL
# L+1 MOONMX
#
# SUBROUTINES USED
# NEWANGLE
#
# INPUT
# 6-7D = TIME
#
# ITEMS AVAILABLE FROM LAUNCH DATA
# BSUBO, BDOT
# TIMSUBO, NODIO, NODDOT, FSUBO, FDOT
# COSI = COS(I) B-1
# SINI = SIN(I) B-1
# I IS THE ANGLE BETWEEN THE MEAN LUNAR EQUATORIAL PLANE AND THE
# PLANE OF THE ECLIPTIC (1 DEGREE 32.1 MINUTES)
#
# OUTPUT
# MMATRIX = 3X3 M MATRIX B-1 (STORED IN VAC AREA)
MOONMX STQ SETPD
EARTHMXX
8D
AXT,1 # B REQUIRES SL 0, SL 5 IN NEWANGLE
5
DLOAD PDDL # PD 10D 8-9D=BSUBO
BSUBO # 10-11D=BDOT
BDOT
PUSH CALL # PD 12D
NEWANGLE # EXIT WITH PD 8D AND MPAC= B REVS B0
PUSH COS # PD 10D
STODL COB # PD 8D COS(B) B-1
SIN # SIN(B) B-1
STODL SOB # SETUP INPUT FOR NEWANGLE
FSUBO # 8-9D=FSUBO
PDDL PUSH # PD 10D THEN 12D 10-11D=FDOT
FDOT
AXT,1 CALL # F REQUIRES SL 1, SL 6 IN NEWANGLE.
4
NEWANGLE # EXIT WITH PD 8D AND MPAC= F REVS B0
STODL AVECTR +2 # SAVE F TEMP
NODIO # 8-9D=NODIO
PDDL PUSH # PD 10D THEN 12D 10-11D=NODDOT
NODDOT # MPAC=5
AXT,1 CALL # NODE REQUIRES SL 0, SL 5 IN NEWANGLE
5
NEWANGLE # EXIT WITH PD 8D AND MPAC= NODI REVS B0
# Page 1247
PUSH COS # PD 10D 8-9D= NODI REVS B0
PUSH # PD 12D 10-11D= COS(NODI) B-1
STORE AVECTR
DMP SL1R
COB # COS(NODI) B-1
STODL BVECTR +2 # PD 10D 20-25D=AVECTR=COB*SIN(NODI)
DMP SL1R # SOB*SIN(NODI)
SOB
STODL BVECTR +4 # PD 8D
SIN PUSH # PD 10D -SIN(NODI) B-1
DCOMP # 26-31D=BVECTR=COB*COS(NODI)
STODL BVECTR # PD 8D SOB*COS(NODI)
AVECTR +2 # MOVE F FROM TEMP LOC. TO 504F
STODL 504F
DMP SL1R
COB
STODL AVECTR +2
SINNODI # 8-9D=SIN(NODI) B-1
DMP SL1R
SOB
STODL AVECTR +4 # 0
HI6ZEROS # 8-13D= CVECTR= -SOB B-1
PDDL DCOMP # PD 10D COB
SOB
PDDL PDVL # PD 12D THEN PD 14D
COB
BVECTR
VXSC PDVL # PD 20D BVECTR*SINI B-2
SINI
CVECTR
VXSC VAD # PD 14D CVECTR*COSI B-2
COSI
VSL1
STOVL MMATRIX +12D # PD 8D M2=BVECTR*SINI+CVECTR*COSI B-1
VXSC PDVL # PD 14D
SINI # CVECTR*SINI B-2
BVECTR
VXSC VSU # PD 8D BVECTR*COSI B-2
COSI
VSL1 PDDL # PD 14D
504F # 8-13D=DVECTR=BVECTR*COSI-CVECTR*SINI B-1
COS VXSC
DVECTR
PDDL SIN # PD 20D 14-19D= DVECTR*COSF B-2
504F
VXSC VSU # PD 14D AVECTR*SINF B-2
AVECTR
VSL1
STODL MMATRIX +6 # M1= AVECTR*SINF-DVECTR*COSF B-1
504F
# Page 1248
SIN VXSC # PD 8D
PDDL COS # PD 14D 8-13D=DVECTR*SINF B-2
504F
VXSC VAD # PD 8D AVECTR*COSF B-2
AVECTR
VSL1 VCOMP
STCALL MMATRIX # M0= -(AVECTR*COSF+DVECTR*SINF) B-1
EARTHMXX
# COMPUTE X=X0+(XDOT)(T+T0)
# 8-9D= X0 (REVS B-0), PUSHLOC SET AT 12D
# 10-11D=XDOT (REVS/CSEC) SCALED B+23 FOR WEARTH,B+28 FOR NODDOT AND BDOT
# AND B+27 FOR FDOT
# X1=DIFFERENCE IN 23 AND SCALING OF XDOT, =0 FOR WEARTH, 5 FOR NDDOT AND
# BDOT AND 4 FOR FDOT
# 6-7D=T (CSEC B-28), TIMSUBO= (CSEC B-42 TRIPLE PREC.)
NEWANGLE DLOAD SR # ENTER PD 12D
6D
14D
TAD TLOAD # CHANGE MODE TO TP
TIMSUBO
MPAC
STODL TIMSUBM # T+T0 CSEC B-42
TIMSUBM +1
DMP # PD 10D MULT BY XDOT IN 10-11D
SL* DAD # PD 8D ADD X0 IN 8-9D AFTER SHIFTING
5,1 # SUCH THAT SCALING IS B-0
PUSH SLOAD # PD 10D SAVE PARTIAL (X0+XDOT*T) IN 8-9D
TIMSUBM
SL DMP
9D
10D # XDOT
SL* DAD # PD 8D SHIFT SUCH THAT THIS PART OF X
10D,1 # IS SCALED REVS/CSEC B-0
BOV # TURN OFF OVERFLOW IF SET BY SHIFT
+1 # INSTRUCTION BEFORE EXITING.
RVQ # MPAC=X= X0+(XDOT)(T+T0) REVS B0
# Page 1249
# ***** EARTHMX SUBROUTINE *****
# SUBROUTINE TO COMPUTE THE TRANSFORMATION MATRIX M FOR THE EARTH
#
# CALLING SEQUENCE
# L CALL
# L+1 EARTHMX
#
# SUBROUTINE USED
# NEWANGLE
#
# INPUT
# INPUT AVAILABLE FROM LAUNCH DATA AZO REVS B-0
# TEPHEM CSEC B-42
# 6-7D= TIME CSEC B-28
#
# OUTPUT
# MMATRIX= 3X3 M MATRIX B-1 (STORED IN VAC AREA)
EARTHMX STQ SETPD # SET 8-9D=AZO
EARTHMXX
8D # 10-11D=WEARTH
AXT,1 # FOR SL 5, AND SL 10 IN NEWANGLE
0
DLOAD PDDL # LEAVING PD SET AT 12D FOR NEWANGLE
AZO
WEARTH
PUSH CALL
NEWANGLE
SETPD PUSH # 18-19D=504AZ
18D # COS(AZ) SIN(AZ) 0
COS PDDL # 20-37D= MMATRIX= -SIN(AZ) COS(AZ) 0 B-1
504AZ # 0 0 1
SIN PDDL
HI6ZEROS
PDDL SIN
504AZ
DCOMP PDDL
504AZ
COS PDVL
HI6ZEROS
PDDL PUSH
HIDPHALF
GOTO
EARTHMXX
# Page 1250
# ***** EARTHL SUBROUTINE *****
# SUBROUTINE TO COMPUTE L VECTOR FOR EARTH
#
# CALLING SEQUENCE
# L CALL
# L+1 EARTHL
#
# INPUT
# AXO,AYO SET AT LAUNCH TIME WITH AYO IMMEDIATELY FOLLOWING AXO IN CORE
#
# OUTPUT
# -AX
# MPAC= -AY RADIANS B-0
# 0
EARTHL DLOAD DCOMP
AXO
STODL 504LPL
-AYO
STODL 504LPL +2
HI6ZEROS
STOVL 504LPL +4
504LPL
RVQ
# Page 1251
# CONSTANTS AND ERASABLE ASSIGNMENTS
1B1 = DP1/2 # 1 SCALED B-1
COSI 2DEC .99964173 B-1 # COS(5521.5 SEC) B-1
SINI 2DEC .02676579 B-1 # SIN(5521.T SEC) B-1
RPREXIT = S1 # R-TO-RP AND RP-TO-R SUBR EXIT
EARTHMXX = S2 # EARTHMX, MOONMX SUBR. EXITS
504RPR = 0D # 6 REGS R OR RP VECTOR
SINNODI = 8D # 2 SIN(NODI)
DVECTR = 8D # 6 D VECTOR MOON
CVECTR = 8D # 6 C VECTR MOON
504AZ = 18D # 2 AZ
TIMSUBM = 14D # 3 TIME SUB M (MOON) T+10 IN GETAZ
504LPL = 14D # 6 L OR LP VECTOR
AVECTR = 20D # 6 A VECTOR (MOON)
BVECTR = 26D # 6 B VECTOR (MOON)
MMATRIX = 20D # 18 M MATRIX
COB = 32D # 2 COS(B) B-1
SOB = 34D # 2 SIN(B) B-1
504F = 6D # 2 F(MOON)
NODDOT 2DEC -.457335121 E-2 # REVS/CSEC B+28=-1.07047011 E-8 RAD/SEC
FDOT 2DEC .570863327 # REVS/CSEC B+27= 2.67240410 E-6 RAD/SEC
BDOT 2DEC -3.07500686 E-8 # REVS/CSEC B+28=-7.19757301 E-14 RAD/SEC
NODIO 2DEC .986209434 # REVS B-0 = 6.19653663041 RAD
FSUBO 2DEC .829090536 # REVS B-0 = 5.20932947829 RAD
BSUBO 2DEC .0651201393 # REVS B=0 = 0.40916190299 RAD
WEARTH 2DEC .973561595 # REVS/CSEC B+23= 7.29211494 E-5 RAD/SEC

View File

@ -0,0 +1,364 @@
# Copyright: Public domain.
# Filename: POWERED_FLIGHT_SUBROUTINES.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1365-1372
# Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
# from the Colossus249/ file of the same
# name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1365
BANK 14 # SAME FBANK AS THE FINDCDUD SUB-PROGRAM
SETLOC POWFLITE
BANK
EBANK= DEXDEX
COUNT* $$/POWFL
# CDUTRIG, CDUTRIG1, CDUTRIG2, AND CD*GR*GS ALL COMPUTE THE SINES AND
# COSINES OF THREE 2'S COMPLEMENT ANGLES AND PLACE THE RESULT, DOUBLE
# PRECISION, IN THE SAME ORDER AS THE INPUTS, AT SINCDU AND COSCDU. AN
# ADDITIONAL OUTPUT IS THE 1'S COMPLENT ANGLES AT CDUSPOT. THESE
# ROUTINES GO OUT OF THEIR WAY TO LEAVE THE MPAC AREA AS THEY FIND IT.
# EXCEPT FOR THE GENERALLY UNIMPORTANT MPAC +2. THEY DIFFER ONLY IN
# WHERE THEY GET THE ANGLES, AND IN METHOD OF CALLING.
#
# CDUTRIG (AND CDUTRIG1, WHICH CAN BE CALLED IN BASIC) COMPUTE THE
# SINES AND COSINES FROM THE CURRENT CONTENTS OF THE CDU REGISTERS.
# THE CONTENTS OF CDUTEMP, ETC., ARE NOT TOUCHED SO THAT THEY MAY
# CONTINUE TO FORM A CONSISTENT SET WITH THE LATEST PIPA READINGS.
#
# CDUTRIG1 IS LIKE CDUTRIG EXCEPT THAT IT CAN BE CALLED IN BASIC.
#
# CD*TR*GS FINDS CDU VALUES IN CDUSPOT RATHER THAN IN CDUTEMP. THIS
# ALLOWS USERS TO MAKE TRANSFORMATIONS USING ARBITRARY ANGLES, OR REAL
# ANGLES IN AN ORDER OTHER THAN X Y Z. A CALL TO THIS ROUTINE IS
# NECESSARY IN PREPARATION FOR A CALL TO AX*SR*T IN EITHER OF ITS TWO
# MODES (SMNB OR NBSM). SINCE AX*SR*T EXPECTS TO FIND THE SINES AND
# COSINES IN THE ORDER Y Z X THE ANGLES MUST HAVE BEEN PLACED IN CDUSPOT
# IN THIS ORDER. CD*TR*GS NEED NOT BE REPEATED WHEN AX*SR*T IS CALLED
# MORE THAN ONCE, PROVIDED THE ANGLES HAVE NOT CHANGED. NOTE THAT SINCE
# IT CLOBBERS BUF2 (IN THE SINE AND COSINE ROUTINES) CD*TR*GS CANNOT BE
# CALLED USING BANKCALL. SORRY.
#
# CD*TR*G IS LIKE CD*TR*GS EXCEPT THAT IT CAN BE CALLED IN
# INTERPRETIVE.
CDUTRIG EXIT
TC CDUTRIGS
TC INTPRET
RVQ
CD*TR*G EXIT
TC CD*TR*GS
TC INTPRET
RVQ
CDUTRIGS CA CDUX
TS CDUSPOT +4
CA CDUY
TS CDUSPOT
# Page 1366
CA CDUZ
TS CDUSPOT +2
CD*TR*GS EXTEND
QXCH TEM2
CAF FOUR
TR*GL**P MASK SIX # MAKE IT EVEN AND SMALLER
TS TEM3
INDEX TEM3
CA CDUSPOT
DXCH MPAC # STORING 2'S COMP ANGLE, LOADING MPAC
DXCH VBUF +4 # STORING MPAC FOR LATER RESTORATION
TC USPRCADR
CADR CDULOGIC
EXTEND
DCA MPAC
INDEX TEM3
DXCH CDUSPOT # STORING 1'S COMPLEMENT ANGLE
TC USPRCADR
CADR COSINE
DXCH MPAC
INDEX TEM3
DXCH COSCDU # STORING COSINE
EXTEND
INDEX TEM3
DCA CDUSPOT # LOADING 1'S COMPLEMENT ANGLE
TC USPRCADR
CADR SINE +1 # SINE +1 EXPECTS ARGUMENT IN A AND L
DXCH VBUF +4 # BRINGING UP PRIOR MPAC TO BE RESTORED
DXCH MPAC
INDEX TEM3
DXCH SINCDU
CCS TEM3
TCF TR*GL**P
TC TEM2
# Page 1367
# *******************************************************************************************************
# QUICTRIG, INTENDED FOR QUIDANCE CYCLE USE WHERE TIME IS CRITICAL, IS A MUCH FASTER VERSION OF CD*TR*GS.
# QUICTRIG COMPUTES AND STORES THE SINES AND COSINES OF THE 2'S COMPLEMENT ANGLES AT CDUSPOT, CDUSPOT +2,
# AND CDUSPOT +4. UNLIKE CD*TR*GS, QUICTRIG DOES NOT LEAVE THE 1'S COMPLEMENT VERSIONS OF THE ANGLES IN
# CDUSPOT. QUICTRIG'S EXECUTION TIME IS 4.1 MS; THIS IS 10 TIMES AS FAST AS CD*TR*GS. QUICTRIG MAY BE
# CALLED FROM INTERPRETIVE AS AN RTB OP-CODE, OR FROM BASIC VIA BANKCALL OR IBNKCALL.
QUICTRIG INHINT # INHINT SINCE DAP USES THE SAME TEMPS
EXTEND
QXCH ITEMP1
CAF FOUR
+4 MASK SIX
TS ITEMP2
INDEX ITEMP2
CA CDUSPOT
TC SPSIN
EXTEND
MP BIT14 # SCALE DOWN TO MATCH INTERPRETER OUTPUTS
INDEX ITEMP2
DXCH SINCDU
INDEX ITEMP2
CA CDUSPOT
TC SPCOS
EXTEND
MP BIT14
INDEX ITEMP2
DXCH COSCDU
CCS ITEMP2
TCF QUICTRIG +4
CA ITEMP1
RELINT
TC A
# Page 1368
#****************************************************************************
# THESE INTERFACE ROUTINES MAKE IT POSSIBLE TO CALL AX*SR*T, ETC., IN
# INTERPRETIVE. LATER, WHERE POSSIBLE, THEY WILL BE ELIMINATED.
#
# NBSM WILL BE THE FIRST TO GO. IT SHOULD NOT BE USED.
NBSM STQ
X2
LXC,1 VLOAD*
S1 # BASE ADDRESS OF THE CDU ANGLES IS IN S1
0,1
STOVL CDUSPOT
32D # VECTOR TO BE TRANSFORMED IS IN 32D
CALL
TRG*NBSM
STCALL 32D # SINCE THERE'S NO STGOTO
X2
# THESE INTERFACE ROUTINES ARE PERMANENT. ALL RESTORE USER'S EBANK
# SETTING. ALL ARE STRICT INTERPRETIVE SUBROUTINES, CALLED USING "CALL",
# RETURNING VIA QPRET. ALL EXPECT AND RETURN THE VECTOR TO BE TRANSFOR-
# MED INTERPRETER-STYLE IN MPAC: COMPONENTS AT MPAC, MPAC +3, AND MPAC +5.
#
# TRG*SMNB AND TRG*NBSM BOTH EXPECT TO SEE THE 2'S COMPLEMENT ANGLES
# AT CDUSPOT (ORDER Y Z X, AT CDUSPOT, CDUSPOT +2, AND CDUSPOT +4. ODD
# LOCATIONS NEED NOT BE ZEROED). TRG*NBSM DOES THE NB TO SM TRANSFOR-
# MATION: TRG*SMNB, VICE VERSA.
#
# CDU*NBSM DOES ITS TRANSFORMATION USING THE PRESENT CONTENTS OF
# THE CDL COUNTERS. OTHERWISE IT IS LIKE TRG*NBSM.
#
# CDU*SMNB IS THE COMPLEMENT OF CDU*NBSM.
CDU*SMNB EXIT
TC CDUTRIGS
TCF C*MM*N1
TRG*SMNB EXIT
TC CD*TR*GS
C*MM*N1 TC MPACVBUF # AX*SR*T EXPECTS VECTOR IN VBUF
CS THREE # SIGNAL FOR SM TO NB TRANSFORMATION.
C*MM*N2 TC AX*SR*T
TC INTPRET
VLOAD RVQ
VBUF
CDU*NBSM EXIT
TC CDUTRIGS
# Page 1369
TCF C*MM*N3
TRG*NBSM EXIT
TC CD*TR*GS
C*MM*N3 TC MPACVBUF # FOR AX*SR*T
CA THREE # SIGNAL FOR NB TO SM TRANSFORMATION
TCF C*MM*N2
# *NBSM* AND *SMNB* EXPECT TO SEE THE SINES AND COSINES (AT SINCDU
# AND COSCDU) RATHER THAN THE ANGLES THEMSELVES. OTHERWISE THEY ARE
# LIKE TRG*NBSM AND TRG*SMNB.
#
# NOTE THAT JUST AS CD*TR*GS NEED BE CALLED ONLY ONCE FOR EACH SERIES
# OF TRANSFORMATIONS USING THE SAME ANGLES, SO TOO ONLY ONE OF TRG*NBSM
# AND TRG*SMNB NEED BE CALLED FOR EACH SERIES. FOR SUBSEQUENT TRANFOR-
# MATIONS USE *NBSM* AND *SMNB*.
*SMNB* EXIT
TCF C*MM*N1
*NBSM* EXIT
TCF C*MM*N3
# AX*SR*T COMBINES THE OLD SMNB AND NBSM. FOR THE NB TO SM
# TRANSFORMATION, ENTER WITH +3 IN A. FOR SM TO NB, ENTER WITH -3.
# THE VECTOR TO BE TRANSFORMED ARRIVES, AND IS RETURNED, IN VBUF.
# AX*SR*T EXPECTS TO FIND THE SINES AND COSINES OF THE ANGLES OF ROTATION
# AT SINCDU AND COSCDU, IN THE ORDER Y Z X. A CALL TO CD*TR*GS, WITH
# THE 2'S COMPLEMENT ANGLES (ORDER Y Z X) AT CDUSPOT, WILL TAKE CARE OF
# THIS. HERE IS A SAMPLE CALLING SEQUENCE:--
# TC CDUTRIGS
# CS THREE # ("CA THREE" FOR NBSM)
# TC AX*SR*T
# THE CALL TO CD*TR*GS NEED NOT BE REPEATED, WHEN AX*SR*T IS CALLED MORE
# THAN ONCE, UNLESS THE ANGLES HAVE CHANGED.
#
# AX*SR*T IS GUARANTEED SAFE ONLY FOR VECTORS OF MAGNITUDE LESS THAN
# UNITY. A LOOK AT THE CASE IN WHICH A VECTOR OF GREATER MAGNITUDE
# HAPPENS TO LIE ALONG AN AXIS OF THE SYSTEM TO WHICH IT IS TO BE TRANS-
# FORMED CONVINCES ONE THAT THIS IS A RESTRICTION WHICH MUST BE ACCEPTED.
AX*SR*T TS DEXDEX # WHERE IT BECOMES THE INDEX OF INDEXES.
EXTEND
QXCH RTNSAVER
R*TL**P CCS DEXDEX # +3 --> 0 -3 --> 2
CS DEXDEX # THUS: +2 --> 1 -2 --> 1
AD THREE # +1 --> 2 -1 --> 0
# Page 1370
EXTEND
INDEX A
DCA INDEXI
DXCH DEXI
CA ONE
TS BUF
EXTEND
INDEX DEX1
DCS VBUF
TCF LOOP1 # REALLY BE A SUBTRACT, AND VICE VERSA
LOOP2 DXCH BUF # LOADING VECTOR COMPONENT, STORING INDEX
LOOP1 DXCH MPAC
CA SINESLOC
AD DEX1
TS ADDRWD
TC DMPSUB # MULTIPLY BY SIN(CDUANGLE)
CCS DEXDEX
DXCH MPAC # NBSM CASE
TCF +3
EXTEND # SMNB CASE
DCS MPAC
DXCH TERM1TMP
CA SIX # SINCDU AND COSCDU (EACH 6 WORDS) MUST
ADS ADDRWD # BE CONSECUTIVE AND IN THAT ORDER
EXTEND
INDEX BUF
INDEX DEX1
DCA VBUF
DXCH MPAC
TC DMPSUB # MULTIPLY BY COS(CDUANGLE)
DXCH MPAC
DAS TERM1TMP
DXCH TERM1TMP
DDOUBL
INDEX BUF
INDEX DEX1
DXCH VBUF
DXCH BUF # LOADING INDEX, STORING VECTOR COMPONENT
CCS A # 'CAUSE THAT'S WHERE THE INDEX NOW IS
TCF LOOP2
EXTEND
DIM DEXDEX # DECREMENT MAGNITUDE PRESERVING SIGN
# Page 1371
TSTPOINT CCS DEXDEX # ONLY THE BRANCHING FUNCTION IS USED
TCF R*TL**P
TC RTNSAVER
TCF R*TL**P
TC RTNSAVER
SINESLOC ADRES SINCDU # FOR USE IN SETTING ADDRWD
INDEXI DEC 4 # ********** DON'T ***********
DEC 2 # ********** TOUCH ***********
DEC 0 # ********** THESE ***********
DEC 4 # ********** CONSTANTS ***********
# ******************************************************************************
# Page 1372
# THIS SUBROUTINE COMPUTES INCREMENTAL CHANGES IN CDU(GIMBAL) ANGLES FROM INCREMENTAL CHANGES ABOUT SM AXES. IT
# REQUIRES SM INCREMENTS AS A DP VECTOR SCALED AT ONE REVOLUTION(DTHETASM,+2,+4). SIN,COS(CDUY,Z,X) ARE IN
# SINCDU,+2,+4 AND COSCDU,+2,+4 RESPECTIVELY, SCALED TO ONE HALF. CDU INCREMENTS ARE PLACED IN DCDU,+2,+4 SCALED TO
# ONE REVOLUTION.
#
# * COS(IGA)SEC(MGA) 0 -SIN(IGA)SEC(MGA) *
# * *
# * -COS(IGA)TAN(MGA) 1 SIN(IGA)TAN(MGA) *
# * *
# * SIN(IGA) 0 COS(IGA) *
BANK 14
SETLOC POWFLIT1
BANK
SMCDURES DLOAD DMP
DTHETASM
COSCDUY
PDDL DMP
DTHETASM +4
SINCDUY
BDSU
DDV
COSCDUZ
STORE DCDU
DMP SL1 # SCALE
SINCDUZ
BDSU
DTHETASM +2
STODL DCDU +2
DTHETASM
DMP PDDL
SINCDUY
DTHETASM +4
DMP DAD
COSCDUY
SL1
STORE DCDU +4
RVQ

860
Q_R-AXIS_RCS_AUTOPILOT.s Normal file
View File

@ -0,0 +1,860 @@
# Copyright: Public domain.
# Filename: Q_R-AXIS_RCS_AUTOPILOT.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1442-1459
# Mod history: 2009-05-27 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
# 2009-06-07 RSB Corrected "DEC 96.0" to "DEC 96", since
# the former is not compatible with yaYUL.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 1442
BANK 17
SETLOC DAPS2
BANK
EBANK= CDUXD
COUNT* $$/DAPQR
CALLQERR CA BIT13 # CALCULATE Q,R ERRORS UNLESS THESE AXES
EXTEND # ARE IN MANUAL RATE COMMAND.
RAND CHAN31
CCS A
TCF +5 # IN AUTO COMPUTE Q,R ERRORS
CS DAPBOOLS # IN MANUAL RATE COMMAND?
MASK OURRCBIT
EXTEND
BZF Q,RORGTS # IF SO BYPASS CALCULATION OF ERROS.
TC QERRCALC
Q,RORGTS CCS COTROLER # CHOOSE CONTROL SYSTEM FOR THIS DAP PASS:
TCF GOTOGTS # GTS (ALTERNATES WITH RCS WHEN DOCKED)
TCF TRYGTS # GTS IF ALLOWED, OTHERWISE RCS
RCS CAF ZERO # RCS (TRYGTS MAY BRANCH TO HERE)
TS COTROLER
DXCH EDOTQ
TC ROT-TOUV
DXCH OMEGAU
# X - TRANSLATION
#
# INPUT: BITS 7,8 OF CH31 (TRANSLATION CONTROLLER)
# ULLAGER
# APSFLAG, DRIFTBIT
# ACC40R2X, ACRBTRAN
#
# OUTPUT: NEXTU, NEXTV CODES OF TRANSLATION FOR AFTER ROTATION
# SENSETYP TELL ROTATION DIRECTION AND DESIRE
#
# X-TRANS POLICIES ARE EITHER 4 JETS OR A DIAGONAL PAIR. IN 2-JET TRANSLATION THE SYSTEM IS SPECIFIED. A FAILURE
# WILL OVERRIDE THIS SPECIFICATION. AN ALARM RESULTS WHEN NO POLICY IS AVAILABLE BECAUSE OF FAILURES.
SENSEGET CA BIT7 # INPUT BITS OVERRIDE THE INTERNAL BITS
EXTEND # SENSETYP WILL NOT OPPOSE ANYTRANS
RAND CHAN31
EXTEND
BZF +X0RULGE
# Page 1443
CA BIT8
EXTEND
RAND CHAN31
EXTEND
BZF -XTRANS
CA ULLAGER
MASK DAPBOOLS
CCS A
TCF +X0RULGE
TS NEXTU # STORE NULL TRANSLATION POLICIES
TS NEXTV
CS DAPBOOLS # BURNING OR DRIFTING?
MASK DRIFTBIT
EXTEND
BZF TSENSE
CA FLGWRD10 # DPS (INCLUDING DOCKED) OR APS?
MASK APSFLBIT
CCS A
CAF TWO # FAVOR +X JETS DURING AN APS BURN.
TSENSE TS SENSETYP
TCF QRCONTRL
+X0RULGE CAF ONE
-XTRANS AD FOUR
TS ROTINDEX
AD NEG3
TS SENSETYP # FAVOR APPROPRIATE JETS DURING TRANS.
CA DAPBOOLS
MASK ACC4OR2X
CCS A
TCF TRANS4
CA DAPBOOLS
MASK AORBTRAN
CCS A
CA ONE # THREE FOR B
AD TWO # TWO FOR A SYSTEM 2 JET X TRANS
TSNUMBRT TS NUMBERT
TC SELCTSUB
CCS POLYTEMP
TCF +3
TC ALARM
OCT 02002
CA 00314OCT
MASK POLYTEMP
TSNEXTS TS NEXTU
# Page 1444
CS 00314OCT
MASK POLYTEMP
TS NEXTV
# Q,R-AXES RCS CONTROL MODE SELECTION
# SWITCHES INDICATION WHEN SET
# BIT13/CHAN31 AUTO, GO TO ATTSTEER
# PULSES MINIMUM IMPULSE MODE
# (OTHERWISE) RATE COMMAND/ATTITUDE HOLD MODE
QRCONTRL CA BIT13 # CHECK MODE SELECT SWITCH.
EXTEND
RAND CHAN31 # BITS INVERTED
CCS A
TCF ATTSTEER
CHKBIT10 CAF PULSES # PULSES = 1 FOR MIN IMP USE OF RHC
MASK DAPBOOLS
EXTEND
BZF CHEKSTIK # IN ATT-HOLD/RATE-COMMAND IF BIT10=0
# MINIMUM IMPULSE MODE
INHINT
TC IBNKCALL
CADR ZATTEROR
CA ZERO
TS QERROR
TS RERROR # FOR DISPLAYS
RELINT
EXTEND
READ CHAN31
TS TEMP31 # IS EQUAL TO DAPTEMP1
CCS OLDQRMIN
TCF CHECKIN
FIREQR CA TEMP31
MASK BIT1
EXTEND
BZF +QMIN
CA TEMP31
MASK BIT2
EXTEND
BZF -QMIN
CA TEMP31
MASK BIT5
# Page 1445
EXTEND
BZF +RMIN
CA TEMP31
MASK BIT6
EXTEND
BZF -RMIN
TCF XTRANS
CHECKIN CS TEMP31
MASK OCT63
TS OLDQRMIN
TCF XTRANS
+QMIN CA 14MS
TS TJU
CS 14MS
TCF MINQR
-QMIN CS 14MS
TS TJU
CA 14MS
TCF MINQR
+RMIN CA 14MS
TCF +2
-RMIN CS 14MS
TS TJU
MINQR TS TJV
CA MINADR
TS RETJADR
CA ONE
TS OLDQRMIN
MINRTN TS AXISCTR
CA DAPBOOLS
MASK CSMDOCKD
EXTEND
BZF MIMRET
INDEX AXISCTR # IF DOCKED, USE 60MS MINIMUM IMPULSE
CCS TJU
CA 60MS
TCF +2
CS 60MS
INDEX AXISCTR
TS TJU
MIMRET CA DAPBOOLS
MASK AORBTRAN
CCS A
CA ONE
AD TWO
TS NUMBERT
# Page 1446
TCF AFTERTJ
60MS DEC 96 # RSB 2009 -- was 96.0.
MINADR GENADR MINRTN
OCT63 OCT 63
14MS = +TJMINT6
TRANS4 CA FOUR
TCF TSNUMBRT
# RATE COMMAND MODE:
#
# DESCRIPTION (SAME AS P-AXIS)
CHEKSTIK TS INGTS # NOT IN GTS WHEN IN ATT HOLD
CS ONE # 1/ACCS WILL DO THE NULLING DRIVES
TS COTROLER # COME BACK TO RCS NEXT TIME
CA BIT15
MASK CH31TEMP
EXTEND
BZF RHCACTIV # BRANCH IF OUT OF DETENT.
CA OURRCBIT # ***********
MASK DAPBOOLS # *IN DETENT* CHECK FOR MANUAL CONTROL
EXTEND # *********** LAST TIME.
BZF STILLRCS
CS BIT9
MASK RCSFLAGS
TS RCSFLAGS # BIT 9 IS 0.
TCF DAMPING
40CYCL OCT 50
1/10S OCT 1
LINRAT DEC 46
# ===========================================================
DAMPING CA ZERO
TS SAVEHAND
TS SAVEHAND +1
RHCACTIV CCS SAVEHAND # ******************
TCF +3 # Q,R MANUAL CONTROL WC = A*(B+|D|)*D
TCF +2 # ******************
TCF +1
DOUBLE # WHERE
DOUBLE #
AD LINRAT # WC = COMMANDED ROTATIONAL RATE
EXTEND # A = QUADRATIC SENSITIVITY FACTOR
MP SAVEHAND # B = LINEAR/QUADRATIC SENSITIVITY
CA L # |D| = ABS. VALUE OF DEFLECTION
EXTEND # D = HAND CONTROLLER DEFLECTION
MP STIKSENS
XCH QLAST # COMMAND Q RATE, SCALED 45 DEG/SEC
COM
# Page 1447
AD QLAST
TS DAPTEMP3
CCS SAVEHAND +1
TCF +3
TCF +2
TCF +1
DOUBLE
DOUBLE
AD LINRAT
EXTEND
MP SAVEHAND +1
CA L
EXTEND
MP STIKSENS
XCH RLAST
COM
AD RLAST
TS DAPTEMP4
CS QLAST # INTERVAL.
AD OMEGAQ
TS QRATEDIF
CS RLAST
AD OMEGAR
TS RRATEDIF
ENTERQR DXCH QRATEDIF # TRANSFORM RATES FROM Q,R TO U,V AXES
TC ROT-TOUV
DXCH URATEDIF
CCS DAPTEMP3 # CHECK IF Q COMMAND CHANGE EXCEEDS
TC +3 # BREAKOUT LEVEL. IF NOT, CHECK R.
TC +2
TC +1
AD -RATEDB
EXTEND
BZMF +2
TCF ENTERUV -2 # BREAKOUT LEVEL EXCEEDED. DIRECT RATE.
CCS DAPTEMP4 # R COMMAND BREAKOUT CHECK.
TC +3
TC +2
TC +1
AD -RATEDB
EXTEND
BZMF +2
TCF ENTERUV -2 # BREAKOUT LEVEL EXCEEDED. DIRECT RATE.
CA RCSFLAGS # BREAKOUT LEVEL NOT EXCEEDED. CHECK FOR
MASK QRBIT # DIRECT RATE CONTROL LAST TIME.
EXTEND
BZF +2
TCF ENTERUV # CONTINUE DIRECT RATE CONTROL.
TCF STILLRCS # PSEUDO-AUTO CONTROL.
CA 40CYCL
# Page 1448
TS TCQR
ENTERUV INHINT # DIRECT RATE CONTROL
TC IBNKCALL
FCADR ZATTEROR
RELINT
CA ZERO
TS DYERROR
TS DYERROR +1
TS DZERROR
TS DZERROR +1
CCS URATEDIF
TCF +3
TCF +2
TCF +1
AD TARGETDB # IF TARGET DB IS EXCEEDED, CONTINUE
EXTEND # DIRECT RATE CONTROL.
BZMF VDB
CCS VRATEDIF
TCF +3
TCF +2
TCF +1
AD TARGETDB
EXTEND
BZMF +2
TCF QRTIME
CA ZERO
TS VRATEDIF
TCF QRTIME
VDB CCS VRATEDIF
TC +3
TC +2
TC +1
AD TARGETDB # IF TARGET DB IS EXCEEDED, CONTINUE
EXTEND # DIRECT RATE CONTROL. IF NOT, FIRE AND
BZMF TOPSEUDO # SWITCH TO PSEUDO-AUTO CONTROL ON NEXT
CA ZERO # PASS.
TS URATEDIF
QRTIME CA TCQR # DIRECT RATE TIME CHECK.
EXTEND
BZMF +5 # BRANCH IF TIME EXCEEDS 4 SEC.
CS RCSFLAGS
MASK QRBIT
ADS RCSFLAGS # BIT 11 IS 1.
TC +4
TOPSEUDO CS QRBIT
MASK RCSFLAGS
TS RCSFLAGS # BIT 11 IS 0.
CA HANDADR
TS RETJADR
CA ONE
# Page 1449
BACKHAND TS AXISCTR
CA FOUR
TS NUMBERT
INDEX AXISCTR
INDEX SKIPU
TCF +1
CA FOUR
INDEX AXISCTR
TS SKIPU
TCF LOOPER
INDEX AXISCTR
CCS URATEDIF # INDEX AXIS QUANTITY
CA ZERO # 0 -U 1/JETACC-AOSU
TCF +2 # 1 +U 1/JETACC+AOSU
CA ONE # 16 -V 1/JETACC-AOSV
INDEX AXISCTR # 17 +V 1/JETACC+AOSV
AD AXISDIFF # JETACC = 2 JET ACCELERATION (1 FOR FAIL)
INDEX A
CS 1/ANET2 +1
EXTEND
INDEX AXISCTR # UPRATEDIF IS SCALED AT PI/4 RAD/SEC
MP URATEDIF # JET TIME IN A, SCALED 32 SEC
TS Q
DAS A
AD Q
TS A # OVERFLOW SKIP
TCF +2
CA Q # RIGHT SIGN AND BIGGER THAN 150MS
SETTIME INDEX AXISCTR
TS TJU # SCALED AT 10.67 WHICH IS CLOSE TO 10.24
TCF AFTERTJ
ZEROTJ CA ZERO
TCF SETTIME
HANDADR GENADR BACKHAND
# GTS WILL BE TRIED IF
# 1. USEQRJTS = 0,
# 2. ALLOWGTS POS,
# 3. JETS ARE OFF (Q,R-AXES)
TRYGTS CAF USEQRJTS # IS JET USE MANDATORY. (AS LONG AS
MASK DAPBOOLS # USEQRJTS BIT IS NOT BIT 15, CCS IS SAFE.)
CCS A
TCF RCS
CCS ALLOWGTS # NO. DOES AOSTASK OK CONTROL FOR GTS?
# Page 1450
TCF +2
TCF RCS
EXTEND
READ CHAN5
CCS A
TCF CHKINGTS
GOTOGTS EXTEND
DCA GTSCADR
DTCB
CHKINGTS CCS INGTS # WAS THE TRIM GIMBAL CONTROLLING
TCF +2 # YES. SET UP A DAMPED NULLING DRIVE.
TCF RCS # NO. NULLING WAS SET UP BEFORE. DO RCS.
INHINT
TC IBNKCALL
CADR TIMEGMBL
RELINT
CAF ZERO
TS INGTS
TCF RCS
EBANK= CDUXD
GTSCADR 2CADR GTS
# Page 1451
# SUBROUTINE TO COMPUTE Q,R-AXES ATTITUDE ERRORS FOR USE IN THE RCS AND GTS CONTROL LAWS AND THE DISPLAYS.
QERRCALC CAE CDUY # Q-ERROR CALCULATION
EXTEND
MSU CDUYD # CDU ANGLE -- ANGLE DESIRED (Y-AXIS)
TS DAPTEMP1 # SAVE FOR RERRCALC
EXTEND
MP M21 # (CDUY-CDUYD)*M21 SCALED AT PI RADIANS
TS E
CAE CDUZ # SECOND TERM CALCULATION:
EXTEND
MSU CDUZD # CDU ANGLE -ANGLE DESIRED (Z-AXIS)
TS DAPTEMP2 # SAVE FOR RERRCALC
EXTEND
MP M22 # (CDUZ-CDUZD)*M22 SCALED AT PI RADIANS
AD DELQEROR # KALCMANU INERFACE ERROR
AD E
XCH QERROR # SAVE Q-ERROR FOR EIGHT-BALL DISPLAY.
RERRCALC CAE DAPTEMP1 # R-ERROR CALCULATION:
EXTEND # CDU ANGLE -ANGLE DESIRED (Y-AXIS)
MP M31 # (CDUY-CDUYD)*M31 SCALED AT PI RADIANS
TS E
CAE DAPTEMP2 # SECOND TERM CALCULATION:
EXTEND # CDU ANGLE -ANGLE DESIRED (Z-AXIS)
MP M32 # (CDUZ-CDUZD)*M32 SCALED AT PI RADIANS
AD DELREROR # KALCMANU INERFACE ERROR
AD E
XCH RERROR # SAVE R-ERROR FOR EIGHT-BALL DISPLAY.
TC Q
# Page 1452
# "ATTSTEER" IS THE ENTRY POINT FOR Q,R-AXES (U,V-AXES) ATTITUDE CONTROL USING THE REACTION CONTROL SYSTEM
ATTSTEER EQUALS STILLRCS # "STILLRCS" IS THE RCS EXIT FROM TRYGTS.
STILLRCS CA RERROR
LXCH A
CA QERROR
TC ROT-TOUV
DXCH UERROR
# PREPARES CALL TO TJETLAW (OR SPSRCS(DOCKED))
# PREFORMS SKIP LOGIC ON U OR Y AXIS IF NEEDED.
TJLAW CA TJLAWADR
TS RETJADR
CA ONE
TS AXISCTR
INDEX AXISCTR
INDEX SKIPU
TCF +1
CA FOUR
INDEX AXISCTR
TS SKIPU
TCF LOOPER
INDEX AXISCTR
CA UERROR
TS E
INDEX AXISCTR
CA OMEGAU
TS EDOT
CA DAPBOOLS
MASK CSMDOCKD
CCS A
TCF +3
TC TJETLAW
TCF AFTERTJ
+3 CS DAPBOOLS # DOCKED. IF GIMBAL USABLE DO GTS CONTROL
MASK USEQRJTS # ON THE NEXT PASS.
CCS A # USEQRJTS BIT MUST NOT BE BIT 15.
TS COTROLER # GIMBAL USABLE. STORE POSITIVE VALUE.
INHINT
TC IBNKCALL
CADR SPSRCS # DETERMINE RCS CONTROL
RELINT
CAF FOUR # ALWAYS CALL FOR 2-JET CONTROL ABOUT U,V.
TS NUMBERT # FALL THROUGH TO JET SLECTION, ETC.
# Q,R-JET-SELECTION-LOGIC
#
# INPUT: AXISCTR 0,1 FOR U,V
# SNUFFBIT ZERO TJETU,V AND TRANS. ONLY IF SET IN A DPS BURN
# Page 1453
# TJU,TJV JET TIME SCALED 10.24 SEC.
# NUMBERT INDICATES NUMBER OF JETS AND TYPE OF POLICY
# RETJADR WHERE TO RETURN TO
#
# OUTPUT: NO.U(V)JETS RATE DERIVATION FEEDBACK
# CHANNEL 5
# SKIPU,SKIPV FOR LESS THAN 150MS FIRING
#
# NOTES: IN CASE OF FAILURE IN DESIRED ROTATION POLICY, "ALL" UNFAILED
# JETS OF THE DESIRED POLICY ARE SELECTED. SINCE THERE ARE ONLY
# TWO JETS, THIS MEANS THE OTHER ONE OR NONE. THE ALARM IS SENT
# IF NONE CAN BE FOUND.
#
# TIMES LESS THAN 14 MSEC ARE TAKEN TO CALL FOR A SINGLE-JET
# MINIMUM IMPULSE, WITH THE JET CHOSEN SEMI-RANDOMLY.
AFTERTJ CA FLAGWRD5 # IF SNUFFBIT SET DURING A DPS BURN GO TO
MASK SNUFFBIT # XTRANS; THAT IS, INHIBIT CONTROL.
EXTEND
BZF DOROTAT
CS FLGWRD10
MASK APSFLBIT
EXTEND
BZF DOROTAT
CA DAPBOOLS
MASK DRIFTBIT
EXTEND
BZF XTRANS
DOROTAT CAF TWO
TS L
INDEX AXISCTR
CCS TJU
TCF +5
TCF NOROTAT
TCF +2
TCF NOROTAT
ZL
AD ONE
TS ABSTJ
CA AXISCTR
AD L
TS ROTINDEX # 0 1 2 3 = -U -V +U +V
CA ABSTJ
AD -150MS
EXTEND
BZMF DOSKIP
# Page 1454
TC SELCTSUB
INDEX AXISCTR
CA INDEXES
TS L
CA POLYTEMP
INHINT
INDEX L
TC WRITEP
RELINT
TCF FEEDBACK
NOROTAT INDEX AXISCTR
CA INDEXES
INHINT
INDEX A
TC WRITEP -1
RELINT
LOOPER CCS AXISCTR
TC RETJADR
TCF CLOSEOUT
DOSKIP CS ABSTJ
AD +TJMINT6 # 14MS
EXTEND
BZMF NOTMIN
ADS ABSTJ
INDEX AXISCTR
CCS TJU
CA +TJMINT6
TCF +2
CS +TJMINT6
INDEX AXISCTR
TS TJU
CCS SENSETYP # ENSURE MIN-IMPULSE NOT AGAINST TRANS
TCF NOTMIN -1
EXTEND
READ LOSCALAR
MASK ONE
TS NUMBERT
NOTMIN TC SELCTSUB
INDEX AXISCTR
CA INDEXES
INHINT
# Page 1455
TS T6FURTHA +1
CA POLYTEMP
INDEX T6FURTHA +1
TC WRITEP
CA ABSTJ
TS T6FURTHA
TC JTLST # IN QR BANK BY NOW
RELINT
CA ZERO
INDEX AXISCTR
TS SKIPU
FEEDBACK CS THREE
AD NUMBERT
EXTEND
BZMF +3
CA TWO
TCF +2
CA ONE
INDEX AXISCTR
TS NO.UJETS
TCF LOOPER
XTRANS CA ZERO
TS TJU
TS TJV
CA FOUR
INHINT
XCH SKIPU
EXTEND
BZF +2
TC WRITEU -1
CA FOUR
XCH SKIPV
RELINT
EXTEND
BZF CLOSEOUT
INHINT
TC WRITEV -1
RELINT
TCF CLOSEOUT
INDEXES DEC 4
DEC 13
+TJMINT6 DEC 22
# Page 1456
-150MS DEC -240
BIT8,9 OCT 00600
SCLNORM OCT 266
TJLAWADR GENADR TJLAW +3 # RETURN ADDRESS FOR RCS ATTITUDE CONTROL
# THE JET LIST:
# THIS IS A WAITLIST FOR T6RUPTS.
#
# CALLED BY:
# CA TJ # TIME WHEN NEXT JETS WILL BE WRITTEN
# TS T6FURTHA
# CA INDEX # AXIS TO BE WRITTEN AT TJ (FROM NOW)
# TS T6FURTHA +1
# TC JTLST
#
# EXAMPLE -- U-AXIS AUTOPILOT WILL WRITE ITS ROTATION CODE OF
# JETS INTO CHANNEL 5. IF IT DESIRES TO TURN OFF THIS POLICY WITHIN
# 150MS AND THEN FIRE NEXTU, A CALL TO JTLST IS MADE WITH T6FURTHA
# CONTAINING THE TIME TO TURN OFF THE POLICY, T6FURTHA +1 THE INDEX
# OF THE U-AXIS(4), AND NEXTU WILL CONTAIN THE "U-TRANS" POLICY OR ZERO.
#
# THE LIST IS EXACTLY 3 LONG. (THIS LEADS UP TO SKIP LOGIC AND 150MS LIMIT)
# THE INPUT IS THE LAST MEMBER OF THE LIST.
#
# RETURNS BY:
# + TC Q
#
# DEFINITIONS: (OUTPUT)
# TIME6 TIME OF NEXT RUPT
# T6NEXT DELTA TIME TO NEXT RUPT
# T6FURTHA DELTA TIME FROM 2ND TO LAST RUPT
# NXT6ADR AXIS INDEX 0 -- P-AXIS
# T6NEXT +1 AXIS INDEX 4 -- U-AXIS
# T6FURTHA +1 AXIS INDEX 13 -- V-AXIS
JTLST CS T6FURTHA
AD TIME6
EXTEND
BZMF MIDORLST # TIME6 -- TI IS IN A
LXCH NXT6ADR
DXCH T6NEXT
DXCH T6FURTHA
TS TIME6
LXCH NXT6ADR
TURNON CA BIT15
EXTEND
WOR CHAN13
TC Q
# Page 1457
MIDORLST AD T6NEXT
EXTEND
BZMF LASTCHG # TIME6 + T6NEXT - T IS IN A
LXCH T6NEXT +1
DXCH T6FURTHA
EXTEND
SU TIME6
DXCH T6NEXT
TC Q
LASTCHG CS A
AD NEG0
TS T6FURTHA
TC Q
# ROT-TOUV IS ENTERED WITH THE Q-COMPONENT OF THE QUANTITY TO BE TRANSFORMED IN A AND THE R-COMPONENT IN L.
# ROT-TOUV TRANSFORMS THE QUANTITY INTO THE NON-ORTHOGONAL U-V AXIS SYSTEM. IN THE U-V SYSTEM NO CROSS-COUPLING IS
# PRODUCED FROM RCS JET FIRINGS. AT THE COMPLETION OF ROT-TOUV, THE U-COMPONENT OF THE TRANSFORMED QUANTITY IS IN
# A AND THE V-COMPONENT IS IN L.
ROT-TOUV LXCH ROTEMP2 # (R) IS PUT INTO ROTEMP2
EXTEND
MP COEFFQ
XCH ROTEMP2 # (R) GOES TO A AND COEFFQ.(Q) TO ROTEMP2
EXTEND
MP COEFFR
TS L # COEFFR.(R) IS PUT INTO L
AD ROTEMP2
TS ROTEMP1 # COEFFQ.(Q)+COEFFR.(R) IS PUT IN ROTEMP1
TCF +4
INDEX A # COEFFQ.(Q) + COEFFR.(R) HAS OVERFLOWED
CS LIMITS # AND IS LIMITED TO POSMAX OR NEGMAX
TS ROTEMP1
CS ROTEMP2
AD L # -COEFFQ.(Q) + COEFFR.(R) IS NOW IN A
TS 7
TCF +3
INDEX A # -COEFFQ.(Q) + COEFFR.(R) HAS OVERFLOWED
CS LIMITS # AND IS LIMITED TO POSMAX OR NEGMAX
LXCH ROTEMP1 # COEFFQ.(Q) + COEFFR.(R) IS PUT INTO L
TC Q
SELCTSUB INDEX ROTINDEX
CA ALLJETS
INDEX NUMBERT
MASK TYPEPOLY
TS POLYTEMP
# Page 1458
MASK CH5MASK
CCS A
TCF +2
TC Q
CA THREE
FAILOOP TS NUMBERT
INDEX ROTINDEX
CA ALLJETS
INDEX NUMBERT
MASK TYPEPOLY
TS POLYTEMP
MASK CH5MASK
EXTEND
BZF FAILOOP -2
CCS NUMBERT
TCF FAILOOP
INDEX AXISCTR
TS TJU
TC ALARM
OCT 02004
TCF NOROTAT
ALLJETS OCT 00110 # -U 6 13
OCT 00022 # -V 2 9
OCT 00204 # +U 5 14
OCT 00041 # +V 1 10
TYPEPOLY OCT 00125 # -X 1 5 9 13
OCT 00252 # +X 2 6 10 14
OCT 00146 # A 2 5 10 13
OCT 00231 # B 1 6 9 14
OCT 00377 # ALL 1 2 5 6 9 10 13 14
# THE FOLLOWING SETS THE INTERRUPT FLIP-FLOP AS SOON AS POSSIBLE, WHICH PERMITS A RETURN TO THE INTERRUPTED JOB.
CLOSEOUT CA ADRRUPT
TC MAKERUPT
ADRRUPT ADRES ENDJASK
ENDJASK DXCH DAPARUPT
DXCH ARUPT
DXCH DAPBQRPT
XCH BRUPT
LXCH Q
CAF NEGMAX # NEGATIVE DAPZRUPT SIGNALS JASK IS OVER.
DXCH DAPZRUPT
DXCH ZRUPT
TCF NOQRSM
# Page 1459
BLOCK 3
SETLOC FFTAG6
BANK
COUNT* $$/DAP
MAKERUPT EXTEND
EDRUPT MAKERUPT

490
R30.s Normal file
View File

@ -0,0 +1,490 @@
# Copyright: Public domain.
# Filename: R30.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 514-524
# Mod history: 2009-05-09 HG Started adapting from the Colossus249/ file
# of the same name, using Comanche055 page
# images 0514.jpg - 0524.jpg.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 514
# SUBROUTINE NAME: V82CALL
# MOD NO: 0 DATE: 16 FEB 67
# MOD BY: R. R. BAIRNSFATHER LOG SECTION: R30
# MOD NO: 1 MOD BY: R. R. BAIRNSFATHER DATE: 11 APR 67 SR30.1 CHANGED TO ALLOW MONITOR OPERN
# MOD NO: 2 MOD BY: ALONSO DATE: 11 DEC 67 VB82 PROGRAM REWRITTEN
# MOD NO: 3 MOD BY: ALONSO DATE: 26 MAR 68 PROG MOD TO HANDLE DIF EARTH/MOON SCALE
#
# NEW FUNCTIONAL DESCRIPTION: CALLED BY VERB 82 ENTER. PRIORITY 10.
# USED THROUGHOUT. CALCULATE AND DISPLAY ORBITAL PARAMETERS
#
# 1. IF AVERAGE G IS OFF:
# FLASH DISPLAY V04N06. R2 INDICATES WHICH SHIP'S STATE VECTOR IS
# TO BE UPDATED. INITIAL CHOICE IS THIS SHIP (R2=1). ASTRONAUT
# CAN CHANGE TO OTHER SHIP BY V22EXE. WHERE X IS NOT EQ 1.
# SELECTED STATE VECTOR UPDATED BY THISPREC (OTHPREC).
# CALLS SR30.1 (WHICH CALLS TFFCONMU + TFFRP/RA) TO CALCULATE
# RPER (PERIGEE RADIUS), RAPO (APOGEE RADIUS), HPER (PERIGEE
# HEIGHT ABOVE LAUNCH PAD OR LAUNAR LANDING SITE), HARD (APOGEE
# HEIGHT AS ABOVE), TPER (TIME TO PERIGEE), TFF (TIME TO
# INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
# FLASH MONITOR V16N44 (HAPO, HPER, TFF). TFF IS -59MS59S IF IT WAS
# NOT COMPUTABLE, OTHERWISE IT INCREMENTS ONCE PER SECOND.
# ASTRONAUT HAS OPTION TO MONITOR TPER BY KEYING IN N 32 E.
# DISPLAY IS IN HMS, IS NEGATIVE (AS WAS TFF), AND INCREMENTS
# ONCE PER SECOND ONLY IF TFF DISPLAY WAS -59M59S.
# 2. IF AVERAGE G IS ON:
# CALLS SR30.1 APPROX EVERY TWO SECS. STATE VECTOR IS ALWAYS
# FOR THIS VEHICLE. V82 DOES NOT DISTURB STATE VECTOR. RESULTS
# OF SR30.1 ARE RAPO, RPER, HAPO, HPER, TPER, TFF.
# FLASH MONITOR V16N44 (HAPO, HPER, TFF).
# IF MODE IS P11, THEN CALL DELRSPL SO ASTRONAUT CAN MONITOR
# RESULTS BY N50E. SPLASH COMPUTATION DONE ONCE PER TWO SECS.
# ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
# ABOVE REMARKS.
#
# CALLING SEQUENCE: VERB 82 ENTER.
#
# SUBROUTINES CALLED: SR30.1, GOXDSPF
# MAYBE -- THISPREC, OTHPREC, LOADTIME, DELRSPL
#
# NORMAL EXIT MODES: TC ENDEXT
#
# ALARMS: NONE
#
# OUTPUT: HAPOX (-29) M
# HPERX (-29) M
# RAPO (-29) M EARTH
# (-27) M MOON
# Page 515
# RPER (-29) M EARTH
# (-27) M MOON
# TFF (-28) CS CONTAINS NEGATIVE QUANTITY
# -TPER (-28) CS CONTAINS NEGATIVE QUANTITY
# RSP-RREC(-29) M IF DELRSPL CALLED
#
# ERASABLE INITIALIZATION REQUIRED: STATE VECTOR.
#
# DEBRIS: QPRET, RONE, VONE, TFF/RTMU, HPERMIN, RPADTEM, V82EMFLG.
# MAYBE: TSTART82, V82FLAGS, TDEC1.
EBANK= HAPOX
BANK 31
SETLOC R30LOC
BANK
COUNT* $$/R30
V82CALL TC INTPRET
BON GOTO
AVEGFLAG
V82GON # IF AVERAGE G ON
V82GOFF # IF AVERAGE G OFF
V82GOFF EXIT # ALLOW ASTRONAUT TO SELECT VEHICLE
CAF TWO # DESIRED FOR ORBITAL PARAMETERS
TS OPTIONX
CAF ONE
TS OPTIONX +1
CAF OPTIONVN # V 04 N 06
TC BANKCALL
CADR GOXDSPF
TC ENDEXT # TERMINATE
TC +2 # PROCEED
TC -5 # DATA IN. OPTIONX +1 = 1 FOR THIS VEHIC.
# UNEQ 1 FOR OTHER VEHICLE.
CAF BIT4 # 80 MS
TC WAITLIST
EBANK= TFF
2CADR TICKTEST
RELINT
V82GOFLP CAF TFFBANK # MAJOR RECYCLE LOOP ENTRY
TS EBANK
CAF ZERO
TS V82FLAGS # ZERO FLAGS FOR TICKTEST, INHIBITS
# DECREMENTING OF TFF AND -TPER.
CAF PRIO7
TC FINDVAC # V82GOFF1 WILL EXECUTE STATE VECTOR
# Page 516
EBANK= TFF # UPDATE AND ORBIT CALCULATIONS FOR
2CADR V82GOFF1 # SELECTED VEHICLE ABOUT PROPER BODY.
RELINT
V82STALL CAF THREE # STALL IN THIS LOOP AND WITHOLD V 16 N 44
MASK V82FLAGS # UNTIL STATE VECTOR UPDATE SETS ONE OF
CCS A # OUR FLAG BITS.
TC FLAGGON # EXIT FROM STALL LOOP.
CAF 1SEC
TC BANKCALL
CADR DELAYJOB
TC V82STALL
FLAGGON CAF V16N44 # MONITOR HAPO,HPER,TFF.
TC BANKCALL
CADR GOXDSPF
TC B5OFF # TERM THIS TELLS TICKTEST TO KILL ITSELF
TC B5OFF # PROCEED DITTO
TC V82GOFLP # RECYCLE RECOMPUTE STATE VECT + DISPLAY
OPTIONVN VN 0412
V16N44 VN 1644
TFFBANK ECADR TFF
V82GOFF1 TC INTPRET
RTB
LOADTIME
STORE TDEC1 # TIME FOR STATE VECTOR UPDATE.
STORE TSTART82 # TIME FOR INTERNAL USE.
EXIT
CS OPTIONX +1 # 1 FOR THIS VEHICLE, NOT 1 FOR OTHER
AD ONE
EXTEND
BZF THISSHIP
OTHSHIP TC INTPRET
CALL # CALL STATE VECTOR UPDATE FOR OTHER SHIP.
OTHPREC
BOTHSHIP VLOAD # MOVE RESULTS INTO TFFCONIC STORAGE AREAS
RATT # TO BE CALLED BY SR30.1.
STOVL RONE # RATT AT (-29)M FOR EARTH OR MOON
VATT
STORE VONE # VATT AT (-7)M/CS FOR EARTH OR MOON
DLOAD*
1/RTMUE,2 # X2 IS 0 FOR EARTH CENTERED STATE VEC
# HG remark: In Comanche055 scan this line (5324) looks pretty much like 1/RTMUF.2 can not decide, leave it
# as it is in start source
STORE TFF/RTMU # X2 IS 2 FOR MOON
DLOAD* # AS LEFT BY THISPREC OR OTHPREC.
MINPERE,2
STORE HPERMIN # TFFRTMU, HPERMIN, AND RPADTEM ARE ALL
SLOAD BHIZ # EARTH/MOON PARAMETERS AS SET HERE.
# Page 517
X2
EARTHPAD
GOTO
MOONPAD
THISSHIP TC INTPRET
CALL # CALL STATE VECTOR UPDATE FOR THIS SHIP.
THISPREC
GOTO
BOTHSHIP
# THE FOLLOWING CONSTANTS ARE PAIRWISE INDEXED. DO NOT SEPARATE PAIRS.
1/RTMUM 2DEC* .45162595 E-4 B14*
1/RTMUE 2DEC* .50087529 E-5 B17*
MINPERM 2DEC 10668 B-27 # 35 KFT MIN PERIGEE HEIGHT FOR MOON(-27)M
MINPERE 2DEC 91440 B-29 # 300 KFT (-29)M FOR EARTH
EARTHPAD DLOAD CLRGO # PAD 37-B RADIUS. SCALED AT (-29)M
RPAD
V82EMFLG # INDICATE EARTH SCALING FOR SR30.1
BOTHPAD
MOONPAD VLOAD ABVAL # COMPUTE MOON PAD RADIUS FROM RLS VECTOR.
RLS # SCALED AT (-27)M.
SET
V82EMFLG # INDICATE MOON SCALING FOR SR30.1
BOTHPAD STCALL RPADTEM
SR30.1 # CALCULATE ORBITAL PARAMETERS
EXIT
CA MODREG # ARE WE IN P00
EXTEND
BZF CANDEL # YES, DO DELRSPL
SPLRET1 TC INTPRET
RTB DSU
LOADTIME
TSTART82 # PRESENT TIME -- TIME V82GOFF1 BEGAN
STORE TSTART82 # SAVE IT
DLOAD BZE # SR30.1 SETS -TPER=0 IF HPER L/
-TPER # HPERMIN (300 OR 35) KFT.
TICKTFF # (-TPER = 0)
TICKTPER DLOAD DAD # (-TPER NON ZERO) TFF WAS NOT COMPUTED.
-TPER # BUT WAS SET TO 59M59S. DON'T DICK TFF, DO
TSTART82 # TICK -TPER. DISPLAY BOTH.
STORE -TPER # -TPER CORRECTED FOR TIME SINCE V82GOFF1
EXIT # BEGAN.
# Page 518
CAF BIT1
TS V82FLAGS # INFORMS TICKTEST TO INCREMENT ONLY -TPER
TC ENDOFJOB
TICKTFF DLOAD DAD # (-TPER=0) TFF WAS COMPUTED. TICK TFF.
TFF # DO NOT TICK -TPER. DISPLAY TFF, BUT NOT
TSTART82 # -TPER
STORE TFF # TFF CORRECTED FOR TIME SINCE V82GOFF1
EXIT # BEGAN.
CAF BIT2
TS V82FLAGS # INFORMS TICKTEST TO INCREMENT ONLY TFF.
TC ENDOFJOB
TICKTEST CAF BIT5 # THIS WAITLIST PROGRAM PERPETUATES ITSELF
MASK EXTVBACT # ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
CCS A
TC DOTICK
CAF PRIO25
TC NOVAC # TERMINATE V 82. CAN'T CALL ENDEXT IN RUPT.
EBANK= EXTVBACT
2CADR ENDEXT
TC TASKOVER
DOTICK CAF 1SEC # RE-REQUEST TICKTEST.
TC WAITLIST
EBANK= TFF
2CADR TICKTEST
CAF THREE
MASK V82FLAGS
INDEX A
TC +1
TC TASKOVER # IF NO FLAGBITS SET DONT' CHANGE TFF OR
# -TPER, BUT CONTINUE LOOP.
TC TPERTICK # ONLY BIT 1 SET. INCR -TPER BY 1 SEC.
TFFTICK CAF 1SEC # ONLY BIT 2 SET. INCR TFF BY 1 SEC.
TS L
CAF ZERO
DAS TFF
TC TASKOVER
TPERTICK CAF 1SEC
TS L
CAF ZERO
DAS -TPER
TC TASKOVER
# Page 519
V82GON EXIT # AVERAGE G ON. USE CURRENT STATE VECTOR
# FOR ORBITAL PARAMETER CALCULATIONS.
CAF PRIO7 # LESS THAN LAMBERT
TC FINDVAC # V82GON1 WILL PERFORM ORBIT CALCULATIONS
EBANK= TFF # ABOUT PROPER BODY APPROX ONCE PER SEC.
2CADR V82GON1
RELINT
CCS NEWJOB # WITHOLD V16 N44 UNTIL FIRST ORBIT CALC
TC CHANG1 # IS DONE. NOTE: V82GON1 (PRIO7, FINDVAC
# JOB) IS COMPLETED BEFORE V82GON (PRIO7,
# NOVAC JOB).
V82REDSP CAF V16N44 # MONITOR HAPO, HPER, TFF
TC BANKCALL
CADR GOXDSPF
TC B5OFF # TERM THIS TELLS V82GON1 TO KILL ITSELF.
TC B5OFF # PROC DITTO.
TC V82REDSP # RECYCLE
V82GON1 TC INTPRET # THIS EXEC PROGRAM PERPETUATES ITSELF
# ONCE A SEC UNTIL BIT 5 OF EXTVBACT =0.
VLOAD GOTO # HOLDS OFF CCS NEWJOB BETWEEN RN AND
RN # VN FETCH SO RN, VN ARE FROM SAME
NEXTLINE # STATE VECTOR UPDATE.
NEXTLINE STOVL RONE # RN AT (-29)M FOR EARTH OR MOON
VN
STORE VONE # VN AT (-7)M/CS FOR EARTH OR MOON
BON GOTO
AMOONFLG # FLAG INDICATES BODY ABOUT WHICH ORBITAL
MOONGON # CALCULATIONS ARE TO BE PERFORMED.
EARTHGON # IF SET - MOON, IF RESET - EARTH.
MOONGON SET DLOAD
V82EMFLG # INDICATE MOON SCALING FOR SR30.1
1/RTMUM # LUNAR PARAMETERS LOADED HERE FOR SR30.1
STODL TFF/RTMU
MINPERM
STOVL HPERMIN
RLS # SCALED AT (-27)M
ABVAL GOTO
V82GON2
EARTHGON CLEAR DLOAD
V82EMFLG # INDICATE EARTH SCALING FOR SR30.1
1/RTMUE # EARTH PARAMETERS LOADED HERE FOR SR30.1
STODL TFF/RTMU
MINPERE
STODL HPERMIN
RPAD
V82GON2 STCALL RPADTEM # COMMON CODE FOR EARTH & MOON.
SR30.1
# Page 520
EXIT
TC CHECKMM
DEC 11
TC V82GON3 # NOT IN MODE 11.
CANDEL TC INTPRET # IN MODE 11 OR 00
CALL
INTSTALL # DELRSPL DOES INTWAKE
DLOAD CALL
TFF
DELRSPL # RETURN IS TO NEXT LINE (SPLRET).
SPLRET EXIT
CA MODREG
EXTEND
BZF SPLRET1
V82GON3 CAF BIT5
MASK EXTVBACT # SEE IF ASTRONAUT HAS SIGNALLED TERMINATE
EXTEND
BZF ENDEXT # YES, TERMINATE VB 82 LOOP
CAF 1SEC
TC BANKCALL # WAIT ONE SECOND BEFORE REPEATING
CADR DELAYJOB # ORBITAL PARAMETER COMPUTATION.
TC V82GON1
# Page 521
# SUBROUTINE NAME: SR30.1
# MOD NO: 0 DATE: 16 FEB 67
# MOD BY: R. R. BAIRNSFATHER LOG SECTION: R32
# MOD NO: 1 MOD BY: R. R. BAIRNSFATHER DATE: 11 APR 67 SR30.1 CHANGED TO ALLOW MONITOR OPERN
# MOD NO: 2 MOD BY: R. R. BAIRNSFATHER DATE: 14 APR 67 ADD OVFL CK FOR RAPO
# MOD NO: 3 MOD BY ALONSO DATE: 11 DEC 67 SUBROUTINE REWRITTEN
# MOD NO: 4 MOD BY ALONSO DATE: 26 MAR 68 PROG MOD TO HANDLE DIF EARTH/MOON SCALE
# MOD NO: 5 MOD BY: R. R. BAIRNSFATHER DATE: 6 AUG 68 OVFL CK FOR HAPO & HPER. VOIDS MOD #2.
#
# NEW FUNCTIONAL DESCRIPTION: ORBITAL PARAMETERS DISPLAY FOR NOUNS 32 AND 44.
# SR30.1 CALLS TFFCONMU AND TFFRP/RA TO CALCULATE RPER (PERIGEE RADIUS),
# RAPO (APOGEE RADIUS), HPER (PERIGEE HEIGHT ABOVE LAUNCH PAD OR LUNAR
# LANDING SITE), HAPO (APOGEE HEIGHT AS ABOVE), TPER (TIME TO PERIGEE),
# TFF (TIME TO INTERSECT 300 KFT ABOVE PAD OR 35KFT ABOVE LANDING SITE).
# IF HPER IS GREATER THAN OR EQUAL TO HPERMIN, CALCULATES TPER AND STORES
# NEGATIVE. IN -TPER. OTHERWISE STORES +0 IN -TPER. WHENEVER TPER IS
# CALCULATED, TFF IS NOT COMPUTABLE AND DEFAULTS TO -59MIN 59SEC. IF HAPO
# WOULD EXCEED 9999.9 NM, IT IS LIMITED TO THAT VALUE FOR DISPLAY.
#
# ADDENDUM: HAPO AND HPER SHOULD BE CHANGED TO READ HAPOX AND HPERX IN THE
# ABOVE REMARKS.
#
# CALLING SEQUENCE: CALL
# SR30.1
#
# SUBROUTINES CALLED: TFFCONMU, TFFRP/RA, CALCTPER, CALCTFF
#
# NORMAL EXIT MODE: CALLING LINE +1 (STILL IN INTERPRETIVE MODE)
#
# ALARMS: NONE
#
# OUTPUT: RAPO (-29) M EARTH APOGEE RADIUS EARTH CENTERED COORD.
# (-27) M MOON MOON CENTERED COORD.
# RPER (-29) M EARTH PERIGEE RADIUS EARTH CENTERED COORD.
# (-27) M MOON MOON CENTERED COORD.
# HAPOX (-29) M APOGEE ALTITUDE ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
# HPERX (-29) M PERIGEE ALT. ABOVE PAD OR LAND. SITE MAX VALUE LIMITED TO 9999.9 NM.
# TFF (-28) CS TIME TO 300KFT OR 35KFT ALTITUDE
# -TPER (-28) CS TIME TO PERIGEE
#
# ERASABLE INITIALIZATION REQUIRED -
# TFF/RTMU (+17) EARTH RECIPROCAL OF PROPER GRAV CONSTANT FOR
# (+14) MOON EARTH OR MOON = 1/SQRT(MU).
# RONE (-29) M STATE VECTOR
# VONE (-7) M/CS STATE VECTOR
# RPADTEM (-29) M EARTH RADIUS OF LAUNCH PAD OR LUNAR LANDING
# (-27) M MOON SITE.
# HPERMIN (-29) M EARTH (300 OR 35) KFT MINIMUM PERIGEE ALTITUDE
# (-27) M MOON ABOVE LAUNCH PAD OR LUNAR LANDING SITE.
# V82EMFLG (INT SW BIT) RESET FOR EARTH, SET FOR MOON.
#
# DEBRIS: QPRET, PDL, S2
# Page 522
COUNT* $$/SR30S
SR30.1 SETPD STQ # INITIALIZE PUSHDOWN LIST.
0
S2
# SR30.1 INPUT: RONE AT (-29)M EARTH/MOON
# VONE AT (-7)M/CS
# TFFCONMU, TFFRP/RA, CALCTPER, AND CALCTFF
# CALLS REQUIRE:
# EARTH CENTERED (NO RESCALING REQUIRED)
# RONE SCALED TO B-29 M
# VONE SCALED TO B-7 M/CS
# MOON CENTERED (RESCALING REQUIRED)
# RONE SCALED TO B-27 M
# VONE SCALED TO B-5 M/CS
BOFF VLOAD
V82EMFLG # OFF FOR EARTH, ON FOR MOON.
TFFCALLS
RONE
VSL2
STOVL RONE
VONE
VSL2
STORE VONE
TFFCALLS CALL
TFFCONMU
CALL # TFFRP/RA COMPUTES RAPO,RPER.
TFFRP/RA
# RETURNS WITH RAPO IN D(MPAC).
DSU
RPADTEM
BOFF SR2R # NEED HAPO AT (-29)M FOR DISPLAY.
# IF MOON CENTERED, RESCALE FROM (-27)M.
# IF EARTH CENTERED ALREADY AT (-29)M.
V82EMFLG # OFF FOR EARTH, ON FOR MOON.
+1
CALL # IF HAPO > MAXNM, SET HAPO =9999.9 NM.
MAXCHK # OTHERWISE STORE (RAPO-RPADTEM) IN HAPO.
STORHAPO STODL HAPOX
RPER
DSU
RPADTEM # GIVES HPER AT (-29)M EARTH, (-27)M MOON.
STORE MPAC +4 # SAVE THIS FOR COMPARISON TO HPERMIN.
BOFF SR2R # NEED HPER AT (-29)M FOR DISPLAY.
# IF MOON CENTERED, RESCALE FROM (-27)M.
# IF EARTH CENTERED ALREADY AT (-29)M.
V82EMFLG # OFF FOR EARTH, ON FOR MOON.
+1
CALL # IF HPER > MAXNM, SET HPER = 9999.9 NM.
MAXCHK
# Page 523
STORHPER STODL HPERX # STORE (RPER - RPADTEM) INTO HPERX.
MPAC +4
DSU BPL # HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
HPERMIN # IF HPER L/ HPERMIN (300 OR 35) KFT,
DOTPER # THEN ZERO INTO -TPER.
DLOAD GOTO # OTHERWISE CALCULATE TPER.
HI6ZEROS
SKIPTPER
DOTPER DLOAD CALL
RPER
CALCTPER
DCOMP # TPER IS PUT NEG INTO -TPER.
SKIPTPER STODL -TPER
HPERMIN # HPERMIN AT (-29)M FOR EARTH, (-27)M MOON
DAD CALL
RPADTEM # RPADTEM AT (-29)M FOR EARTH, (-27)M MOON
CALCTFF # GIVES 59M59S FOR TFF IF RPER G/
DCOMP # HPERMIN + RPADTEM. (TPER WAS NON ZERO)
STCALL TFF # OTHERWISE COMPUTES TFF. (GOTO)
S2
MAXCHK DSU BPL # IF C(MPAC) > 9999.9 NM. MPAC = 9999.9 NM.
MAXNM
+3 # OTHERWISE C(MPAC) = B(MPAC).
DAD RVQ
MAXNM
+3 DLOAD RVQ # (USED BY P30 - P37 ALSO)
MAXNM
MAXNM 2OCT 0106505603
# Page 524
# There is no source code on this page --- HG 2009

290
R31.s Normal file
View File

@ -0,0 +1,290 @@
# Copyright: Public domain.
# Filename: R31.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 505-510
# Contact: Onno Hommes <ohommes@cmu.edu>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-11 OH Batch 2 Assignment Comanche Transcription
# 2009-05-20 RSB Corrected INSTALL -> INTSTALL
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 505
BANK 34
SETLOC R31
BANK
COUNT* $$/R31
R31CALL CAF PRIO3
TC FINDVAC
EBANK= SUBEXIT
2CADR V83CALL
DSPDELAY CAF 1SEC
TC BANKCALL
CADR DELAYJOB
CA EXTVBACT
MASK BIT12
EXTEND
BZF DSPDELAY
DISPN5X CA FLAGWRD9 # TEST R31FLAG (IN SUNDANCE R31FLAG WILL
MASK BIT4 # ALWAYS BE SET AS R34 DOES NOT EXIST.
EXTEND
BZF +3
CAF V16N54 # R31 USE NOUN 54
TC +2
CAF V16N53 # R34 USE NOUN 53
TC BANKCALL
CADR GOMARKF
TC B5OFF
TC B5OFF
TCF DISPN5X
V83 TC INTPRET
GOTO
HAVEBASE # INTEG STATE VECTORS
V83CALL TC INTPRET
GOTO
STATEXTP # EXTRAPOLATE STATE VECTORS
COMPDISP VLOAD VSU
RATT
RONE
PUSH ABVAL # RATT-RONE TO 0D PD= 6
STORE RANGE # METERS B-29
NORM VLOAD
X1 # RATT-RONE PD= 0
VSR1
VSL* UNIT
0,1
PDVL VSU # UNIT(LOS) TO 0D PD= 6
# Page 506
VATT
VONE
DOT # (VATT-VONE).UNIT(LOS) PD= 0
SL1
STCALL RRATE # RANGE RATE M/CS B-7
CDUTRIG # TO INITIALIZE FOR *NBSM*
CALL
R34LOS # NOTE. PDL MUST = 0.
R34ANG VLOAD UNIT
RONE
PDVL # UR TO 0D PD= 6
THISAXIS # UNITX FOR CM, UNITZ FOR LM
BON VLOAD # CHK R31FLAG. ON=R31 THETA, OFF=R34 PHI
R31FLAG
+2 # R31-THETA
12D
CALL
*NBSM*
VXM PUSH # UXORZ TO 6D PD=12D
REFSMMAT
VPROJ VSL2
0D
BVSU UNIT
6D
PDVL VXV # UP/2 TO 12D PD=18D
RONE
VONE
UNIT VXV
RONE
DOT PDVL # SIGN TO 12D, UP/2 TO MPAC PD=18D
12D
VSL1 DOT # UP.UXORZ
6D
SIGN SL1
12D
ACOS
STOVL RTHETA
RONE
DOT BPL
6D
+5
DLOAD BDSU # IF UXORZ.R NEG, RTHETA = 1 - RTHETA
RTHETA
DPPOSMAX
STORE RTHETA # RTHETA BETWEEN 0 AND 1 REV.
EXIT
CAF BIT5 # HAVE WE BEEN ANSWERED
MASK EXTVBACT
EXTEND
BZF ENDEXT # YES, DIE
# Page 507
CS EXTVBACT
MASK BIT12
ADS EXTVBACT
TCF V83
V16N54 VN 1654
V16N53 VN 1653
# Page 508
# STATEXTP DOES AN INITIAL PRECISION EXTRAPOLATION OF THE
# LEM STATE VECTOR TO PRESENT TIME OR TO PIPTIME IF AV G.
# IS ON AND SAVES AS BASE VECTOR. IF AV G IS ON RN + VN
# ARE USED AS THE CM STATE VECTOR AND THE INITIAL R RDOT
# RTHETA ARE COMPUTED WITH NO FURTHER INTEGRATION. IF AV
# G IS OFF A PRECISION EXTRAPOLATION IS MADE OF THE CM
# STATE VECTOR TO PRESENT TIME AND.....
#
# THE CM + LM STATE VECTORS ARE INTEGRATED TO PRES TIME
# USING PRECISION OR CONIC AS SURFFLAG IS SET OR CLEAR.
#
# IF AV G IS ON THEN
# SUBSEQUENT PASSES WILL PROVIDE
# USE OF RN + VN AS CM STATE VECTOR AND THE LM STATE
# VECTOR WILL BE PRECISION INTEGRATED USING LEMPREC
#
# IF SURFFLAG IS SET.
# CM STATE VECTOR RONE VONE + LM STATE VECTOR RATT
# VATT ARE USED IN COMPUTING R RDOT RTHETA.
#
STATEXTP RTB BOF # INITIAL INTEGRATION
LOADTIME
V37FLAG
+3 # AV G OFF, USE PRES TIME
CALL
GETRVN # ON, USE RN VN PIPTIME
STORE BASETIME # PRES TIME OR PIPTIME
STCALL TDEC1
LEMPREC
VLOAD # BASE VECTOR, LM
RATT1
STOVL BASEOTP # POS.
VATT1
STORE BASEOTV # VEL.
BON DLOAD
V37FLAG
COMPDISP # COMPUTE R RDOT RTHETA FROM
# RONE(RN) VONE(VN) RATT+VATT(LEMPREC)
TAT
STCALL TDEC1
CSMPREC
VLOAD # BASE VECTOR, CM
RATT1
STOVL BASETHP # POS.
VATT1
STORE BASETHV # VEL.
HAVEBASE BON RTB # SUBSEQUENT INTEGRATIONS
V37FLAG
GETRVN5
LOADTIME
STCALL TDEC1 # AV G OFF, SET INTEG, OF CM
INTSTALL
VLOAD CLEAR
BASETHP
# Page 509
MOONFLAG
STOVL RCV
BASETHV
STODL VCV
BASETIME
BOF SET # GET APPROPRIATE MOONFLAG SETTING
MOONTHIS
+2
MOONFLAG
CLEAR
INTYPFLG
BON SET
SURFFLAG
+2 # PREC. IF LM DOWN
INTYPFLG # CONIC IF LM NOT DOWN
STCALL TET
INTEGRVS # INTEGRATION --- AT LAST ---
VLOAD
RATT
STOVL RONE
VATT
STODL VONE # GET SET FOR CONIC EXTRAP., OTHER.
TAT
BON CALL
SURFFLAG
GETRVN6 # LEMPREC IF LM DOWN
INTSTALL # ..CONIC IF NOT DOWN
SET
INTYPFLG
OTHINT STORE TDEC1 # ENTERED IF AV G ON TO INTEG LM
VLOAD CLEAR
BASEOTP
MOONFLAG
STOVL RCV
BASEOTV
STODL VCV
BASETIME
BOF SET
MOONTHIS
+2
MOONFLAG
STCALL TET
INTEGRVS
GOTO
COMPDISP # COMPUTE R RDOT RTHETA
GETRVN5 CALL # AV G ON
GETRVN
BON CALL
SURFFLAG
GETRVN6 # LM DOWN, LMPREC
# Page 510
INTSTALL
CLEAR GOTO
INTYPFLG
OTHINT
GETRVN6 STCALL TDEC1
LEMPREC
GOTO
COMPDISP # COMPUTE R RDOT RTHETA
GETRVN STQ
0D
VLOAD GOTO # AV G ON, RONE = RN VONE = VN
RN # AND USE PIPTIME
+1
STCALL RONE
+1
VLOAD GOTO
VN
+1
STODL VONE
PIPTIME
GOTO
0D
SETLOC R34
BANK
R34LOS EXIT
CA CDUS
INDEX FIXLOC
TS 9D
CA CDUT
INDEX FIXLOC
TS 11D
CA FIXLOC
AD SIX
COM
INDEX FIXLOC
TS X1
TC INTPRET
CALL
SXTNB
STCALL 12D
R34ANG

387
R60_62.s Normal file
View File

@ -0,0 +1,387 @@
# Copyright: Public domain.
# Filename: R60_62.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 390-398
# Mod history: 2009-05-09 RSB Adapted from the Colossus249/ file
# of the same name, using Comanche055 page
# images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 390
BANK 34
SETLOC MANUVER
BANK
EBANK= TEMPR60
COUNT 27/R60
# CONFORMS TO GSOP CHAPTER FOUR REVISION LOGIC 09 JAN 18, 1968
R60CSM TC MAKECADR
TS TEMPR60
# INSERT PRIODSP CHECK WITH R22 (V06N49) WITH JENNINGS BRODEUR
REDOMANN CAF BIT6
MASK FLAGWRD5 # IS 3-AXIS FLAG SET
CCS A
TCF TOBALL # YES
TC INTPRET
CALL
VECPOINT # TO COMPUTE FINAL ANGLES
STORE CPHI # STORE FINAL ANGLES -- CPHI, CTHETA, CPSI
EXIT
TOBALL CAF V06N18
TC BANKCALL
CADR GOPERF2R # DISPLAY PLEASE PERFORM AUTO MANEUVER
TC R61TEST
TC REDOMANC # PROCEED
TCF ENDMANU1 # ENTER I.E., FINISHED WITH R60
TC CHKLINUS # TO CHECK FOR PRIORITY DISPLAYS
TC ENDOFJOB
REDOMANC CAF BIT6
MASK FLAGWRD5 # IS 3-AXIS FLAG SET
CCS A
TCF TOBALLC # YES
TC INTPRET
CALL
VECPOINT # TO COMPUTE FINAL ANGLES
STORE CPHI # STORE ANGLES
EXIT
TOBALLC CAF PRIO30 # IS MODE AUTO AND CTL GNC
# Page 391
EXTEND
RXOR CHAN31
MASK 13,14,15
EXTEND
BZF +2 # AUTO, NON-FLASH N18
TCF TOBALL # NOT AUTO
CAF V06N18 # STATIC UP NON-FLASHING V06 N18
TC BANKCALL
CADR GODSPR
TC CHKLINUS
STARTMNV TC BANKCALL
CADR GOMANUR
ENDMANUV TCF TOBALL # FINISHED MANEUVER.
ENDMANU1 TC DOWNFLAG # RESET 3-AXIS FLAG
ADRES 3AXISFLG # BIT 6 FLAG 5
CAE TEMPR60
TC BANKJUMP
CHKLINUS CS FLAGWRD4
MASK BIT12 # IS PRIORITY DISPLAY FLAG SET?
CCS A
TC Q # NO -- EXIT
CA Q
TS MPAC +2 # SAVE RETURN
CS THREE # OBTAIN LOCATION FOR RESTART
AD BUF2 # HOLD Q OF LAST DISPLAY
TS TBASE1
TC PHASCHNG
OCT 71 # 1.7SPOT FOR RELINUS
CAF BIT7
TC LINUS # GO SET BITS FOR PRIORITY DISPLAY
TC MPAC +2
RELINUS CAF BIT5 # IS TRACK FLAG ON
MASK FLAGWRD1
EXTEND
BZF GOREDO20 # NO
TC UPFLAG
ADRES PDSPFLAG # R60 PRIODSP FLAG
TC UPFLAG
ADRES TARG1FLG # FOR R52
CAF ZERO # RESET TO ZERO, SINCE
# Page 392
TS OPTIND # OPTIND WAS SET TO -1 BY V379
CAF PRIO14 # RESTORE ORIGINAL PRIORITY
TC PRIOCHNG
TC TBASE1
GOREDO20 TC PHASCHNG
OCT 111 # 1.11 FOR PIKUP20
TC ENDOFJOB
R61TEST CA MODREG # ARE WE IN P00. IF YES THIS MUST BE
EXTEND # VERB49 OR VERB89 SO DO ENDEXT.
BZF ENDMANU1 # RESET 3-AXIS & RETURN. USER DOES ENDEXT
CA FLAGWRD4 # ARE WE IN R61 (P20)
MASK BIT12
EXTEND
BZF GOTOP00H # NO
TC GOTOV56 # YES
BIT14+7 OCT 20100
V06N18 VN 0618
# Page 393
# PROGRAM DESCRIPTION -- VECPOINT
#
# THIS INTERPRETIVE SUBROUTINE MAY BE USED TO POINT A SPACECRAFT AXIS IN A DESIRED DIRECTION. THE AXIS
# TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN SUCCESSIVE LOCATIONS OF ERASABLE MEMORY
# BEGINNING WITH THE LOCATION CALLED SCAXIS. THE COMPONENTS OF THIS VECTOR ARE GIVEN IN SPACECRAFT COORDINATES.
# THE DIRECTION IN WHICH THIS AXIS IS TO BE POINTED MUST APPEAR AS A HALF UNIT DOUBLE PRECISION VECTOR IN
# SUCCESSIVE LOCATIONS OF ERASABLE MEMORY BEGINNING WITH THE ADDRESS CALLED POINTVSM. THE COMPONENTS OF THIS
# VECTOR ARE GIVEN IN STABLE MEMBER COORDINATES. WITH THIS INFORMTION VECPOINT COMPUTES A SET OF THREE GIMBAL
# ANGLES (2'S COMPLEMENT) CORRESPONDING TO THE CROSS-PRODUCT ROTATION BETWEEN SCAXIS AND POINTVSM AND STORES THEM
# IN T(MPAC) BEFORE RETURNING TO THE CALLER.
#
# THIS ROTATION, HOWEVER, MAY BRING THE S/C INTO GIMBAL LOCK. WHEN POINTING A VECTOR IN THE Y-Z PLANE,
# THE TRANSPONDER AXIS, OR THE AOT FOR THE LEM, THE PROGRAM WILL CORRECT THIS PROGLEM BY ROTATING THE CROSS-
# PRODUCT ATTITUDE ABOUT POINTVSM BY A FIXED AMOUNT SUFFICIENT TO ROTATE THE DESIRED S/C ATTITUDE OUT OF GIMBAL
# LOCK. IF THE AXIS TO BE POINTED IS MORE THAN 40.6 DEGREES BUT LESS THAN 60.5 DEG FROM THE +X (OR -X) AXIS,
# THE ADDITIONAL ROTATION TO AVOID GIMBAL LOCK IS 35 DEGREES. IF THE AXIS IS MORE THAN 60.5 DEGREES FROM +X (OR -X)
# THE ADDITIONAL ROTATION IS 35 DEGREES. THE GIMBAL ANGLES CORRESPONDING TO THIS ATTITUDE ARE THEN COMPUTED AND
# STORED AS 2'S COMPLEMENT ANGLES N T(MPAC) BEFORE RETURNING TO THE CALLER.
#
# WHEN POINTING THE X-AXIS, OR THE THRUST VECTOR, OR ANY VECTOR WITHIN 40.6 DEG OF THE X-AXIS, VECPOINT
# CANNOT CORRECT FOR A CROSS-PRODUCT ROTATION INTO GIMBAL LOCK. IN THIS CASE A PLATFORM REALIGNMENT WOULD BE
# REQUIRED TO POINT THE VECTOR IN THE DESIRED DIRECTION. AT PRESENT NO INDICATION IS GIVEN FOR THIS SITUATION
# EXCEPT THAT THE FINAL MIDDLE GIMBAL ANGLE IN MPAC +2 IS GREATER THAN 59 DEGREES.
#
# CALLING SEQUENCE
#
# 1) LOAD SCAXIS, POINTVSM
# 2) CALL
# VECPOINT
#
# RETURNS WITH
#
# 1) DESIRED OUTER GIMBAL ANGLE IN MPAC
# 2) DESIRED INNER GIMBAL ANGLE IN MPAC +1
# 3) DESIRED MIDDLE GIMBAL ANGLE IN MPAC +2
#
# ERASABLES USED --
#
# 1) SCAXIS 6
# 2) POINTVSM 6
# 3) MIS 18
# 4) DEL 18
# 5) COF 6
# 6) VECQTEMP 1
# 7) ALL OF VAC AREA 43
#
# TOTAL 99
SETLOC VECPT
BANK
# Page 394
EBANK= BCDU
COUNT 27/VECPT
VECPOINT STQ BOV # SAVE RETURN ADDRESS
VECQTEMP
VECLEAR # AND CLEAR OVFIND
VECLEAR AXC,2 RTB
MIS # READ THE PRESENT CDU ANGLES AND
READCDUK # STORE THEM IN PD25, 26, 27
STCALL 25D
CDUTODCM # S/C AXES TO STABLE MEMBER AXES (MIS)
VLOAD VXM
POINTVSM # RESOLVE THE POINTING DIRECTION VF INTO
MIS # INITIAL S/C AXES (VF = POINTVSM)
UNIT
STORE 28D
# PD 28 29 30 31 32 33
VXV UNIT # TAKE THE CROSS PRODUCT VF X VI
SCAXIS # WHERE VI = SCAXIS
BOV VCOMP
PICKAXIS
STODL COF # CHECK MAGNITUDE
36D # OF CROSS PRODUCT
DSU BMN # VECTOR, IF LESS
DPB-14 # THAN B-14 ASSUME
PICKAXIS # UNIT OPERATION
VLOAD DOT # INVALID.
SCAXIS
28D
SL1 ARCCOS
COMPMATX CALL # NO COMPUTE THE TRANSFORMATION FROM
DELCOMP # FINAL S/C AXES TO INITIAL S/C AXES MFI
AXC,1 AXC,2
MIS # COMPUTE THE TRANSFORMATION FROM FINAL
DEL # S/C AXES TO STABLE MEMBER AXES
CALL # MFS = MIS MFI
MXM3 # (IN PD LIST)
DLOAD ABS
6 # MFS6 = SIN(CPSI) $2
DSU BMN
SINGIMLC # = SIN(59 DEGS) $2
FINDGIMB # /CPSI/ LESS THAN 59 DEGS.
# I.E., DESIRED ATTITUDE NOT IN GIMBAL LOCK
DLOAD ABS # CHECK TO SEE IF WE ARE POINTING
SCAXIS # THE THRUST AXIS
DSU BPL
SINVEC1 # SIN 49.4 DEGS $2
# Page 395
FINDGIMB # IF SO, WE ARE TRYING TO POINT IT INTO
VLOAD # GIMBAL LOCK, ABORT COULD GO HERE
STADR
STOVL MIS +12D
STADR # STORE MFS (IN PD LIST) IN MIS
STOVL MIS +6
STADR
STOVL MIS
MIS +6 # INNER GIMBAL AXIS IN FINAL S/C AXES
BPL VCOMP # LOCATE THE IG AXIS DIRECTION CLOSEST TO
IGSAMEX # FINAL X S/C AXIS
IGSAMEX VXV BMN # FIND THE SHORTEST WAY OF ROTATING THE
SCAXIS # S/C OUT OF GIMBAL LOCK BY A ROTATION
U=SCAXIS # ABOUT +- SCAXIS, I.E., IF (IG (SGN MFS3)
# X SCAXIS . XF) LESS THAN Q, U = SCAXIS
# OTHERWISE U = -SCAXIS.
VLOAD VCOMP
SCAXIS
STCALL COF # ROTATE ABOUT -SCAXIS
CHEKAXIS
U=SCAXIS VLOAD
SCAXIS
STORE COF # ROTATE ABOUT + SCAXIS
CHEKAXIS DLOAD ABS
SCAXIS # SEE IF WE ARE POINTING THE AOT
DSU BPL
SINVEC2 # SIN 29.5 DEGS $2
PICKANG1 # IF SO, ROTATE 50 DEGS ABOUT +- SCAXIS
DLOAD GOTO # IF NOT, MUST BE POINTING THE TRANSPONDER
VECANG2 # OR SOME VECTOR IN THE Y, OR Z PLANE
COMPMFSN # IN THIS CASE ROTATE 35 DEGS TO GET OUT
# OF GIMBAL LOCK (VECANG2 $360)
PICKANG1 DLOAD
VECANG1 # = 50 DEGS. $360
COMPMFSN CALL
DELCOMP # COMPUTE THE ROTATION ABOUT SCAXIS TO
AXC,1 AXC,2 # BRING MFS OUT OF GIMBAL LOCK
MIS
DEL
CALL # COMPUTE THE NEW TRANSFORMATION FROM
MXM3 # DESIRED S/C AXES TO STABLE MEMBER AXES
# WHICH WILL ALIGN VI WITH VF AND AVOID
# GIMBAL LOCK
FINDGIMB AXC,1 CALL
0 # EXTRACT THE COMMANDED CDU ANGLES FROM
DCMTOCDU # THIS MATRIX
RTB SETPD
V1STO2S # CONVERT TO 2'S COMPLEMENT
# Page 396
0
GOTO
VECQTEMP # RETURN TO CALLER
PICKAXIS VLOAD DOT # IF VF X VI = 0, FIND VF, VI
28D
SCAXIS
BMN TLOAD
ROT180
25D
GOTO # IF VF = VI, CDU DESIRED = PRESENT CDU
VECQTEMP # PRESENT CDU ANGLES
ROT180 VLOAD VXV # IF VF, VI ANTI-PARALLEL, 180 DEG ROTATION
MIS +6 # IS REQUIRED. Y STABLE MEMBER AXIS IN
HIUNITX # INITIAL S/C AXES.
UNIT VXV # FIND Y(SM) X X(I)
SCAXIS # FIND UNIT(VI X UNIT(Y(SM) X X(I)))
UNIT BOV # I.E., PICK A VECTOR IN THE PLANE OF X(I),
PICKX # Y(SM) PERPENDICULAR TO VI
STODL COF
36D # CHECK MAGNITUDE
DSU BMN # OF THIS VECTOR.
DPB-14 # IF LESS THAN B-14,
PICKX # PICK X-AXIS.
VLOAD
COF
XROT STODL COF
HIDPHALF
GOTO
COMPMATX
PICKX VLOAD GOTO # PICK THE XAXIS IN THIS CASE
HIUNITX
XROT
BANK 35
SETLOC MANUVER1
BANK
SINGIMLC 2DEC .4285836003 # = SIN(59) $2
SINVEC1 2DEC .3796356537 # = SIN(49.4) $2
SINVEC2 2DEC .2462117800 # = SIN(29.5) $2
VECANG1 2DEC .1388888889 # = 50 DEGREES $360
VECANG2 2DEC .09722222222 # = 35 DEGREES $360
1BITDP OCT 0 # KEEP THIS BEFORE DPB(-14) ********
DPB-14 OCT 00001
# Page 397
OCT 00000
BANK 34
SETLOC MANUVER
BANK
# Page 398
# ROUTINE FOR INITIATING AUTOMATIC MANEUVER VIA KEYBOARD (V49)
EBANK= CPHI
COUNT 27/R62
R62DISP CAF V06N22 # DISPLAY COMMAND ICDUS CPHI, CTHETA, CPHI
TC BANKCALL
CADR GOFLASH
TCF ENDEXT
TCF GOMOVE # PROCEED
TCF R62DISP # ENTER
# ASTRONAUT MAY LOAD NEW ICDUS AT THIS
# POINT.
GOMOVE TC UPFLAG # SET FOR 3-AXIS MANEUVER
ADRES 3AXISFLG
TC BANKCALL
CADR R60CSM
TCF ENDEXT

156
R63.s Normal file
View File

@ -0,0 +1,156 @@
# Copyright: Public domain.
# Filename: R63.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 338-341
# Mod history: 2009-05-16 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 338
# SUBROUTINE NAME: V89CALL
# MOD NO: 0 DATE: 9 JAN 1968
# MOD BY: DIGITAL DEVEL GROUP LOG SECTION: R63
#
# FUNCTIONAL DESCRIPTION:
#
# CALLED BY VERB 89 ENTER DURING P00. PRIO 10 USED. CALCULATES AND
# DISPLAYS FINAL FDAI BALL ANGLES TO POINT LM +X OR +Z AXIS AT CSM.
#
# 1. KEY IN V 89 E ONLY IF IN PROG 00. IF NOT IN P00, OPERATOR ERROR AND
# EXIT R63, OTHERWISE CONTINUE.
#
# 2. IF IN P00, DO IMU STATUS CHECK ROUTINE (R02BOTH). IF IMU ON AND ITS
# ORIENTATION KNOWN TO LGC, CONTINUE.
#
# 3. FLASH DISPLAY V 04 N 06. R2 INDICATES WHICH SPACECRAFT AXIS IS TO
# BE POINTED AT CSM. INITIAL CHOICE IS PREFERRED (+Z) AXIS (R2=1).
# ASTRONAUT CAN CHANGE TO (+X) AXIS (R2 NOT =1) BY V 22 E 2 E. CONTINUE
# AFTER KEYING IN PROCEED.
#
# 4. BOTH VEHICLE STATE VECTORS UPDATED BY CONIC EQS.
#
# 5. HALF MAGNITUDE UNIT LOS VECTOR (IN STABLE MEMBER COORDINATES) AND
# HALF MAGNITUDE UNIT SPACECRAFT AXIS VECTOR (IN BODY COORDINATES)
# PREPARED FOR VECPOINT.
#
# 6. GIMBAL ANGLES FROM VECPOINT TRANSFORMED INTO FDAI BALL ANGLES BY
# BALLANGS. FLASH DISPLAY V 06 N 18 AND AWAIT RESPONSE.
#
# 7 RECYCLE -- RETURN TO STEP 4.
# TERMINATE -- EXIT R63
# PROCEED -- RESET 3AXISFLAG AND CALL R60LEM FOR ATTITUDE MANEUVER.
#
# CALLING SEQUENCE: V 89 E.
#
# SUBROUTINES CALLED: CHECKP00H, R02BOTH, GOXDSPF, CSMCONIC, LEMCONIC,
# VECPOINT, BALLANGS, R60LEM.
#
# NORMAL EXIT MODES: TC ENDEXT
#
# ALARMS: 1. OPERATOR ERROR IF NOT IN P00.
# 2. PROGRAM ALARM IF IMU IS OFF.
# 3. PROGRAM ALARM IF IMU ORIENTATION IS UNKNOWN.
#
# OUTPUT: NONE
#
# ERASABLE INITIALIZATION REQUIRED: NONE
#
# DEBRIS: OPTION1, +1, TDEC1, PCINTVSM, SCAXIS, CPHI, CTHETA, CPSI,
# Page 339
# 3AXISFLAG.
EBANK= RONE
BANK 32
SETLOC BAWLANGS
BANK
COUNT* $$/R63
V89CALL TC BANKCALL # IMU STATUS CHECK. RETURNS IF ORIENTATION
CADR R02BOTH # KNOWN. ALARMS IF NOT.
CAF THREE # ALLOW ASTRONAUT TO SELECT DESIRED
TS OPTIONX # TRACKING ATTITUDE AXIS.
CAF ONE
TS OPTIONX +1
CAF VB04N12 # V 04 N 12.
TC BANKCALL
CADR GOFLASH
TC ENDEXT # TERMINATE
TC +2 # PROCEED
TC -5 # DATA IN. OPTION1+1 = 1 FOR Z AXIS
V89RECL TC INTPRET # 2 FOR X AXIS
RTB DAD
LOADTIME # READ PRESENT TIME
DP1MIN
STORE TSTART82 # SAVE TIME FOR LEMCONIC CALL
STCALL TDEC1 # STORE TIME FOR CSMCONIC CALL
CSMCONIC # CSM STATE VECTOR UPDATE
VLOAD # CSMCONIC LEFT R VECTOR IN RATT
RATT
STODL RONE # SAVE FOR LINE OF SIGHT (LOS) COMPUTATION
TSTART82
STCALL TDEC1 # STORE TIME FOR LEMCONIC CALL
LEMCONIC # LEM STATE VECTOR UPDATE
VLOAD VSU # CSM POSITION -- LEM POSITION -- LOS
RONE # LOS VECTOR LEFT IN MPAC
RATT
MXV RTB # (REFSMAT X LOS). TRANSFORMS LOS FROM
REFSMMAT # REFERENCE COORD TO STAB MEMB COORD.
NORMUNIT
STORE POINTVSM # STORE LOS FOR VECPOINT CALCULATION
EXIT
CS OPTIONX +1 # 1 FOR Z AXIS. 2 FOR X AXIS.
AD ONE
EXTEND
BZF ALINEZ
ALINEX TC INTPRET # X AXIS ALIGNMENT
VLOAD
UNITX # READ (.5, 0, 0)
# Page 340
V89CALL1 STCALL SCAXIS # STORE SELECTED ALIGNMENT AXIS
VECPOINT # PUTS DESIRED GIM ANG (OG,IG,MG) IN TMPAC
STORE CPHI # STOR GIMBAL ANGLES FOR BALLANGS CALL
EXIT
TC BANKCALL
CADR BALLANGS # PUTS DESIRED BALL ANGLE IN FDAIX,Y,Z
CAF VB06N18 # V 06 N 18
TC BANKCALL # NOUN 18 REFERS TO FDAIX,Y,Z
CADR GOFLASH
TC ENDEXT # TERMINATE
TC +2 # PROCEED
TC V89RECL # RECYCLE
TC DOWNFLAG # RESET 3 AXIS FLAG
ADRES 3AXISFLG # RESET BIT6 FLAG WORD 5
TC BANKCALL # PERFORMS LEM MANEUVER TO ALIGN SELECTED
CADR R60LEM # SPACECRAFT AXIS TO CSM.
TCF ENDEXT # TERMINATE R63
ALINEZ TC INTPRET # Z AXIS ALIGNMENT
VLOAD GOTO
UNITZ # READ (0, 0, .5)
V89CALL1
VB04N12 VN 412
VB06N18 VN 0618
# Page 341
DP1MIN 2DEC 6000

103
RADAR_LEADIN_ROUTINES.s Normal file
View File

@ -0,0 +1,103 @@
# Copyright: Public domain.
# Filename: RADAR_LEADIN_ROUTINES.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 490-491
# Mod history: 2009-05-17 RSB Adapted from the corresponding
# Luminary131 file, using page
# images from Luminary 1A.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 490
BANK 25
SETLOC RRLEADIN
BANK
EBANK= RSTACK
# RADAR SAMPLING LOOP.
COUNT* $$/RLEAD
RADSAMP CCS RSAMPDT # TIMES NORMAL ONCE PER SECOND SAMLING
TCF +2
TCF TASKOVER # +0 INSERTED MANUALLY TERMINATES TEST.
TC WAITLIST
EBANK= RSTACK
2CADR RADSAMP
CAF PRIO25
TC NOVAC
EBANK= RSTACK
2CADR DORSAMP
CAF BIT14 # FOR CYCLIC SAMPLING, RTSTDEX=
EXTEND # RTSTLOC/2 + RTSTBASE
MP RTSTLOC
AD RTSTBASE # 0 FOR RR, 2 FOR LR.
TS RTSTDEX
TCF TASKOVER
# DO THE ACTUAL RADAR SAMPLE.
DORSAMP TC VARADAR # SELECTS VARIABLE RADAR CHANNEL.
TC BANKCALL
CADR RADSTALL
INCR RFAILCNT # ADVANCE FAIL COUNTER BUT ACCEPT BAD DATA
DORSAMP2 INHINT
CA FLAGWRD5 # DON'T UPDATE RSTACK IF IN R77.
MASK R77FLBIT
CCS A
TCF +4
DXCH SAMPLSUM
INDEX RTSTLOC
DXCH RSTACK
CS RTSTLOC # CYCLE RTSTLOC.
AD RTSTMAX
EXTEND
# Page 491
BZF +3
CA RTSTLOC
AD TWO # STORAGE IS DP
TS RTSTLOC
TCF ENDOFJOB # CONTINUOUS SAMPLING AND 2N TRIES -- GONE.
# VARIABLE RADAR DATA CALLER FOR ONE MEASUREMENT ONLY.
VARADAR CAF ONE # WILL BE SENT TO RADAR ROUTINE IN A BY
TS BUF2 # SWCALL
INDEX RTSTDEX
CAF RDRLOCS
TCF SWCALL # NOT TOUCHING Q.
RDRLOCS CADR RRRANGE # = 0
CADR RRRDOT # = 1
CADR LRVELX # = 2
CADR LRVELY # = 3
CADR LRVELZ # = 4
CADR LRALT # = 5

View File

@ -0,0 +1,85 @@
# Copyright: Public domain.
# Filename: RCS-CSM_DAP_EXECUTIVE_PROGRAMS.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1037-1038
# Mod history: 2009-05-13 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
# 2009-05-20 RSB A "Page N" comment was corrected.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1037
# CALCULATION OF AMGB, AMBG ONCE EVERY SECOND
#
# AMGB = 1 SIN(PSI) 0
# 0 COS(PSI)COS(PHI) SIN(PHI)
# 0 -COS(PSI)SIN(PHI) COS(PHI)
#
# AMBG = 1 -TAN(PSI)COS(PHI) TAN(PSI)SIN(PHI)
# 0 COS(PHI)/COS(PSI) -SIN(PHI)/COS(PSI)
# 0 SIN(PHI) COS(PHI)
#
# WHERE PHI AND PSI ARE CDU ANGLES
BANK 20
SETLOC DAPS8
BANK
COUNT* $$/DAPEX
EBANK= KMPAC
AMBGUPDT CA FLAGWRD6 # CHECK FOR RCS AUTOPILOT
EXTEND
BZMF ENDOFJOB # BIT15 = 0, BIT14 = 1
MASK BIT14 # IF NOT RCS, EXIT
EXTEND
BZF ENDOFJOB # TO PROTECT TVC DAP ON SWITCHOVER
CA CDUZ
TC SPSIN2
TS AMGB1 # CALCULATE AMGB
CA CDUZ
TC SPCOS2
TS CAPSI # MUST CHECK FOR GIMBAL LOCK
CAF QUADANGL # = 7.25 DEGREES JET QUAD ANGULAR OFFSET
EXTEND
MSU CDUX
COM # CDUX - 7.25 DEG
TC SPCOS1
TS AMGB8
EXTEND
MP CAPSI
TS AMGB4
CAF QUADANGL
EXTEND
MSU CDUX
COM # CDUX - 7.25 DEG
TC SPSIN1
TS AMGB5
EXTEND
MP CAPSI
COM
# Page 1038
TS AMGB7
TCF ENDOFJOB
QUADANGL DEC 660 # = 7.25 DEGREES

976
RCS-CSM_DIGITAL_AUTOPILOT.s Normal file
View File

@ -0,0 +1,976 @@
# Copyright: Public domain.
# Filename: RCS-CSM_DIGITAL_AUTOPILOT.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1002-1024
# Mod history: 2009-05-13 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1002
# T5 INTERRUPT PROGRAM FOR THE RCS-CSM AUTOPILOT
# START OF T5 INTERRUPT PROGRAM
BANK 20
SETLOC DAPS3
BANK
COUNT 21/DAPRC
EBANK= KMPAC
REDORCS LXCH BANKRUPT # RESTART OF AUTOPILOT COMES HERE
CA T5PHASE # ON A T5 RUPT
EXTEND
BZMF +2 # IF T5PHASE +0, -0, OR -, RESET TO -
TCF +3 # IF T5PHASE +, LEAVE IT +. DO A FRESHDAP
CS ONE
TS T5PHASE
EXTEND
DCA RCSLOC
DXCH T5LOC # HOOK UP T5RUPT TO AUTOPILOT
TCF RCSATT +1
EBANK= KMPAC
RCSLOC 2CADR RCSATT
RCSATT LXCH BANKRUPT # SAVE BB
EXTEND # SAVE Q
QXCH QRUPT
CAF BIT15 # BIT15 CHAN31 = 0 IF IMU POWER IS ON AND
EXTEND # S/C CONT SW IS IN CMC (I.E., IF G/C AUTO
RAND CHAN31 # PILOT IS FULLY ENABLED)
EXTEND
BZF SETT5 # IF G/C AUTOPILOT IS FULLY ENABLED,
# GO TO SETT5
CS RCSFLAGS # IF G/C AUTOPILOT IS NOT FULLY ENABLED,
MASK BIT14
ADS RCSFLAGS # SET NORATE FLAG,
CAF POSMAX
TS HOLDFLAG # SET HOLDFLAG +,
CAF ZERO # ZERO ERRORX, ERRORY, AND ERRORZ,
TS ERRORX
TS ERRORY
TS ERRORZ
CAF BIT14
EXTEND
RAND CHAN31 # AND CHECK FREE FUNCTION (BIT14 CHAN31).
EXTEND
# Page 1003
BZF SETT5 # IF IN FREE MODE, GO TO SETT5.
TS T5PHASE # IF NOT IN FREE MODE,
CAF OCT37766 # SCHEDULE REINITIALIZATION (FRESHDAP)
TS TIME5 # IN 100 MS VIA T5RUPT
TCR ZEROJET # ZERO JET CHANNELS IN 14 MS VIA ZEROJET
TCF KMATRIX
DELTATT OCT 37770 # 80MS (TIME5)
DELTATT2 OCT 37776 # 20MS (TIME5)
ONESEK DEC 16284 # 1 SEC(TIME5)
CHAN5 EQUALS 5
CHAN6 EQUALS 6
PRIO34A = PRIO34
# CHECK PHASE OF T5 PROGRAM
#
# BECAUSE OF THE LENGTH OF THE T5 PROGRAM,IT HAS BEEN DIVIDED INTO
# THREE PARTS, T5PHASE1, T5PHASE2, AND THE JET SELECTION LOGIC,
# TO ALLOW FOR THE EXECUTION OF OTHER
# INTERRUPTS. T5PHASE IS ALSO USED IN THE INITIALIZATION OF THE AUTOPILOT
# VARIABLES AT TURN ON.
#
# THE CODING OF T5PHASE IS...
#
# + = INITIALIZE T5 RCS-CSM AUTOPILOT
# T5PHASE = +0 = PHASE2 OF THE T5 PROGRAM
# - = RESTART DAP
# -0 = PHASE1 OF THE T5 PROGRAM
SETT5 CCS T5PHASE
TCF FRESHDAP # TURN ON AUTOPILOT
TCF T5PHASE2 # BRANCH TO PHASE2 OF PROGRAM
TCF REDAP # RESTART AUTOPILOT
TS T5PHASE # PHASE 1 RESET FOR PHASE 2
CA TIME5
TS T5TIME # USED IN COMPENSATING FOR DELAYS IN T5
CAF DELTATT2 # RESET FOR T5RUPT IN 20MS FOR PHASE2
TS TIME5 # OF PROGRAM
# Page 1004
# IMU STATUS CHECK
CS IMODES33 # CHECK IMU STATUS
MASK BIT6 # BIT6 = 0 IMU OK
CCS A # BIT6 = 1 NO IMU
TCF RATEFILT
FREECHK CS RCSFLAGS # BIT14 INDICATES THAT RATES HAVE NOT BEEN
MASK BIT14 # INITIALIZED
ADS RCSFLAGS
CAF BIT14 # NO ATTITUDE REFERENCE
TS HOLDFLAG # STOP ANY AUTOMATIC STEERING AND PREPARE
# TO PICK UP CDU ANGLES UPON RESUMPTION OF
# ATTITUDE HOLD
EXTEND
RAND CHAN31 # CHECK FOR FREE MODE
EXTEND
BZF KRESUME1 # IN FREE MODE PROVIDE FREE CONTROL ONLY
TCF REINIT # .....TILT...............................
BITS4,5 OCT 30
RATEFILT CA RCSFLAGS # SEE IF RATEFILTER HAS BEEN INITIALIZED
MASK BIT14
EXTEND # IF SO, PROCEED WITH RATE DERIVATION
BZF +2
TCF KMATRIX # IF NOT, SKIP RATE DERIVATION
# RATE FILTER TIMING = 7.72 MS
#
# RATE FILTER EQUATIONS
#
#
# DRHO = DELRHO - (.1)ADOT + (1 = GAIN1)DRHO
# -1
#
# ADOT = ADOT + GAIN2 DRHO + KMJ DFT
# -1
# _ * _ _
# WHERE DELRHO = AMGB (CDU - CDU )
# -1
CAF TWO
DRHOLOOP TS SPNDX
DOUBLE
TS DPNDX
INDEX DPNDX
CS DRHO # DRHO SCALED 180 DEGS
EXTEND
INDEX ATTKALMN # PICK UP DESIRED FILTER GAIN
MP GAIN1
INDEX DPNDX
DAS DRHO # (1 -.064) DRHO
EXTEND
# Page 1005
INDEX DPNDX
DCS ADOT
DXCH KMPAC # -(.1)ADOT
CA QUARTER
TC SMALLMP
DXCH KMPAC
INDEX DPNDX
DAS DRHO
CCS SPNDX
TCF DRHOLOOP
CA CDUX # MEASURED BODY RATES--
XCH RHO
EXTEND
MSU RHO # _ * _ _
COM # DELRHO = AMGB (CDU - CDU )
# -1
ZL
DXCH DELTEMPX
CA CDUY
XCH RHO1
EXTEND
MSU RHO1
COM
TS T5TEMP # (CDUY - RHO1) SCALED 90 DEGS
EXTEND
MP AMGB1
DAS DELTEMPX # DELTEMPX = (CDUX-RHO) + AMGB1(CDUY-RHO1)
# MUST BE DOUBLE PRECISION OR WILL LOSE
# PULSES
CA AMGB4
EXTEND
MP T5TEMP
DXCH DELTEMPY
CA AMGB7
EXTEND
MP T5TEMP
DXCH DELTEMPZ
CA CDUZ
XCH RHO2
EXTEND
MSU RHO2
COM
TS T5TEMP # (CDUZ - RHO2) SCALED 90 DEGS
EXTEND
MP AMGB5
DAS DELTEMPY # DELTEMPY = AMGB4(CDUY-RHO1)
# + AMGB5(CDUZ-RHO2)
CA AMGB8
EXTEND
# Page 1006
MP T5TEMP
DAS DELTEMPZ # DELTEMPZ = AMBG7(CDUY-RHO1)
# + AMGB8(CDUZ-RHO2)
CAF TWO
ADOTLOOP TS SPNDX
DOUBLE
TS DPNDX
EXTEND
INDEX DPNDX
DCA DELTEMPX
INDEX DPNDX
DAS DRHO
EXTEND
INDEX DPNDX
DCA DELTEMPX
INDEX DPNDX
DAS MERRORX
INDEX DPNDX
CA DRHO
DOUBLE # N.B.
DOUBLE # N.B.
EXTEND
INDEX ATTKALMN # PICK UP DESIRED FILTER GAINS
MP GAIN2
INDEX DPNDX # ADOT + (.16)(.1)DRHO
DAS ADOT # -1
INDEX SPNDX # S/C TORQUE TO INERTIA RATIO
CA KMJ # SCALED (450)(1600)/(57.3)(16384)=1/1.3
EXTEND
INDEX SPNDX
MP DFT
INDEX DPNDX
DAS ADOT # KMJ(DFT)
CCS SPNDX
TCF ADOTLOOP # END CALCULATION OF VEHICLE RATES
KMATRIX CA ATTSEC
MASK LOW4
CCS A
TCF TENTHSEK
CAF PRIO34 # CALL FOR 1 SEC UPDATE OF TRANSFORMATION
TC NOVAC # MATRIX FROM GIMBAL AXES TO BODY AXES
EBANK= KMPAC
2CADR AMBGUPDT
CAF NINE
TENTHSEK TS ATTSEC
# Page 1007
# WHEN AUTOMATIC MANEUVERS ARE BEING PERFORMED, THE FOLLOWING ANGLE ADDITION MUST BE MADE TO PROVIDE A SMOOTH
# SEQUENCE OF ANGULAR COMMANDS TO THE AUTOPILOT--
#
# CDUXD = CDUXD + DELCDUX (DOUBLE PRECISION)
# CDUYD = CDUYD + DELCDUY (DOUBLE PRECISION)
# CDUZD = CDUZD + DELCDUZ (DOUBLE PRECISION)
#
# THE STEERING PROGRAMS:
# 1) ATTITUDE MANEUVER ROUTINE
# 2) LEM TRACKING
#
# SHOULD GENERATE THE DESIRED ANGLES (CDUXD, CDUYD, CDUZD) AS WELL AS THE INCREMENTAL ANGLES (DELCDUX, DELCDUY,
# DELCDUZ) SO THAT THE GIMBAL ANGLE COMMANDS CAN BE INTERPOLATED BETWEEN UPDATES.
#
# HOLDFLAG CODING:
#
# + = GRAB PRESENT CDU ANGLES AND STORE IN THETADX, THETADY, THETADZ
# AND PERFORM ATTITUDE HOLD ABOUT THESE ANGLES
# ALSO IGNORE AUTOMATIC STEERING
# SET = + BY
# 1) INITIALIZATION PHASE OF AUTOPILOT
# 2) OCCURANCE OF RHC COMMANDS
# 3) FREE MODE
# 4) SWITCH OVER TO ATTITUDE HOLD FROM AUTO
# WHILE DOING AUTOMATIC STEERING (IN THIS CASE
# HOLDFLAG IS NOT ACTUALLY SET TO +, BUT THE LOGIC
# FUNCTIONS AS IF IT WERE.)
# 5) S/C CONTROL SWITCH IS SCS
# 6) IMU POWER OFF
# +0 = IN ATTITUDE HOLD ABOUT A PREVIOUSLY ESTABLISHED REFERENCE
# - = PERFORMING AUTOMATIC MANEUVER
# -0 = NOT USED AT PRESENT
#
# NOTE THAT THIS FLAG MUST BE SET = - BY THE STEERING PROGRAM IF IT IS TO COMMAND THE AUTOPILOT.
# SINCE ASTRONAUT ACTION MAY CHANGE THE HOLDFLAG SETTING, IT SHOULD BE MONITORED BY THE STEERING PROGRAM TO
# DETERMINE IF THE AUTOMATIC SEQUENCE HAS BEEN INTERRUPTED AND IF SO, TAKE THE APPROPRIATE ACTION.
CS HOLDFLAG
EXTEND
BZMF DACNDLS # IF HOLDFLAG +0,-0,+, BYPASS AUTOMATIC
# COMMANDS.
DCDUINCR CAF TWO
DELOOP TS SPNDX
DOUBLE
TS DPNDX
EXTEND
INDEX A
DCA CDUXD
# Page 1008
DXCH KMPAC
EXTEND
INDEX DPNDX
DCA DELCDUX
TC DPADD
EXTEND
DCA KMPAC
INDEX SPNDX
TS THETADX
INDEX DPNDX
DXCH CDUXD
CCS SPNDX
TCF DELOOP
# Page 1009
# RCS-CSM AUTOPILOT ATTITUDE ERROR DISPLAY
#
# THREE TYPES OF ATTITUDE ERRORS MAY BE DISPLAYED ON THE FDAI:
#
# MODE 1) AUTOPILOT FOLLOWING ERRORS SELECTED BY V61E
# GENERATED INTERNALLY BY THE AUTOPILOT
#
# MODE 2) TOTAL ATTITUDE ERRORS SELECTED BY V62E
# WITH RESPECT TO THE CONTENTS OF N22
#
# MODE 3) TOTAL ASTRONAUT ATTITUDE ERRORS SELECTED BY V63E
# WITH RESPECT TO THE CONTENTS OF N17
#
# MODE 1 IS PROVIDED AS A MONITOR OF THE RCS DAP AND ITS ABILITY TO TRACK AUTOMATIC STEERING COMMANDS. IN THIS
# MODE THE ATTITUDE ERRORS WILL BE ZEROED WHEN THE CMC MODE SWITCH IS IN FREE.
#
# MODE 2 IS PROVIDED TO ASSIST THE CREW IN MANUALLY MANEUVERING THE S/C TO THE ATTITUDE (GIMBAL ANGLES) SPECIFIED
# IN N22. THE ATTITUDE ERRORS WRT THESE ANGLES AND THE CURRENT CDU ANGLES ARE RESOLVED INTO S/C CONTROL AXES
# AS A FLY-TO INDICATOR.
#
# MODE 3 IS PROVIDED TO ASSIST THE CREW IN MANUALLY MANEUVERING THE S/C TO THE ATTITUDE (GIMBAL ANGLES) SPECIFIED
# IN N17. THE ATTITUDE ERRORS WRT THESE ANGLES AND THE CURRENT CDU ANGLES ARE RESOLVED INTO S/C CONTROL AXES
# AS A FLY-TO INDICATOR.
#
# V60 IS PROVIDED TO LOAD N17 WITH A SNAPSHOT OF THE CURRENT CDU ANGLES, THUS SYNCHRONIZING THE MODE 3 DISPLAY
# WITH THE CURRENT S/C ATTITUDE. THIS VERB MAY BE USED AT ANY TIME.
#
# THESE DISPLAYS WILL BE AVAILABLE IN ANY MODE (AUTO, HOLD, FREE, G+N, OR SCS) ONCE THE RCS DAP HAS BEEN
# INITIATED VIA V46E. MODE 1, HOWEVER, WILL BE MEANINGFUL ONLY IN G+N AUTO OR HOLD. THE CREW MAY PRESET (VIA
# V25N17) AN ATTITUDE REFERENCE (DESIRED GIMBAL ANGLES) INTO N17 AT ANY TIME.
DACNDLS CS RCSFLAGS # ALTERNATE BETWEEN FDAIDSP1 AND FDAIDSP2
MASK BIT4
EXTEND
BZF FDAIDSP2
FDAIDSP1 ADS RCSFLAGS
TC NEEDLER
KRESUME1 TCF RESUME # END PHASE 1
# Page 1010
# FDAI ATTITUDE ERROR DISPLAY SUBROUTINE
#
# PROGRAM DESCRIPTION: D. KEENE 5/24/67
#
# THIS SUBROUTINE IS USED TO DISPLAY ATTITUDE ERRORS ON THE FDAI VIA THE DIGITAL TO ANALOG CONVERTERS (DACS)
# IN THE CDUS. CARE IS TAKEN TO METER OUT THE APPROPRIATE NUMBER OF PULSES TO THE IMU ERROR COUNTERS AND PREVENT
# OVERFLOW, TO CONTROL THE RELAY SEQUENCING, AND TO AVOID INTERFERENCE WITH THE COARSE ALIGN LOOP WHICH ALSO USES
# THE DACS.
#
# CALLING SEQUENCE:
#
# DURING THE INITIALIZATION SECTION OF THE USER'S PROGRAM, BIT3 OF RCSFLAGS SHOULD BE SET TO INITIATE THE
# TURN-ON SEQUENCE WITHIN THE NEEDLES PROGRAM:
#
# CS RCSFLAGS # IN EBANK6
# MASK BIT3
# ADS RCSFLAGS
#
# THEREAFTER, THE ATTITUDE ERRORS GENERATED BY THE USER SHOULD BE TRANFERRED TO THE FOLLOWING LOCATIONS IN EBANK6:
#
# AK SCALED 180 DEGREES NOTE: THESE LOCATIONS ARE SUBJECT
# AK1 SCALED 180 DEGREES TO CHANGE
# AK2 SCALED 180 DEGREES
#
# FULL SCALED DEFLECTION CORRESPONDS TO 16 7/8 DEGREES OF ATTITUDE ERROR
# (= 384 BITS IN IMU ERROR COUNTER)
#
# A CALL TO NEEDLER WILL THEN UPDATE THE DISPLAY:
#
# INHINT
# TC IBNKCALL # NOTE: EBANK SHOULD BE SET TO E6
# CADR NEEDLER
# RELINT
#
# THIS PROCESS SHOULD BE REPEATED EACH TIME THE ERRORS ARE UPDATED. AT LEAST 3 PASSES THRU THE PRORAM ARE
# REQUIRED BEFORE ANYTHING IS ACTUALLY DISPLAYED ON THE ERROR METERS.
# NOTE: EACH CALL TO NEEDLER MUST BE SEPARATED BY AT LEAST 50MS TO ASSURE PROPER RELAY SEQUENCING.
#
# ERASABLE USED:
# AK CDUXCMD
# AK1 CDUYCMD
# AK2 CDUZCMD
# EDRIVEX A,L,Q
# EDRIVEY T5TEMP
# EDRIVEZ SPNDX
#
# SWITCHES; RCSFLAGS BITS 3,2
#
# I/O CHANNELS: CHAN12 BIT 4 (COARSE ALIGN - READ ONLY)
# Page 1011
# CHAN12 BIT 6 (IMU ERROR COUNTER ENABLE)
# CHAN14 BIT 13,14,15 (DAC ACTIVITY)
#
# SIGN CONVENTION: AK = THETAC - THETA
# WHERE THETAC = COMMAND ANGLE
# THETA = PRESENT ANGLE
NEEDLER CAF BIT4 # CHECK FOR COARSE ALIGN ENABLE
EXTEND # IF IN COARSE ALIGN DO NOT USE IMU
RAND CHAN12 # ERROR COUNTERS. DON'T USE NEEDLES
EXTEND
BZF NEEDLER1
CS RCSFLAGS # SET BIT3 FOR INITIALIZATION PASS
MASK BIT3
ADS RCSFLAGS
TC Q
NEEDLER1 CA RCSFLAGS
MASK SIX
EXTEND
BZF NEEDLES3
MASK BIT3
EXTEND
BZF NEEDLER2 # BIT3 = 0, BIT2 = 1
CS BIT6 # FIRST PASS BIT3 = 1
EXTEND # DISABLE IMU ERROR COUNTER TO ZERO DACS
WAND CHAN12 # MUST WAIT AT LEAST 60 MS. BEFORE
NEEDLE11 CS ZERO # ENABLING COUNTERS.
TS AK # ZERO THE INPUTS ON FIRST PASS
TS AK1
TS AK2
TS EDRIVEX # ZERO THE DISPLAY REGISTERS
TS EDRIVEY
TS EDRIVEZ
TS CDUXCMD # ZERO THE OUT COUNTERS
TS CDUYCMD
TS CDUZCMD
CS SIX # RESET RCSFLAGS FOR PASS2
MASK RCSFLAGS
AD BIT2
TS RCSFLAGS
TC Q # END PASS1
NEEDLER2 CAF BIT6 # ENABLE IMU ERROR COUNTERS
EXTEND
WOR CHAN12
CS SIX # RESET RCSFLAGS TO DISPLAY ATTITUDE
# Page 1012
MASK RCSFLAGS # ERRORS WAIT AT LEAST 4 MS FOR
TS RCSFLAGS # RELAY CLOSURE
TC Q
NEEDLES3 CAF BIT6 # CHECK TO SEE IF IMU ERROR COUNTER
EXTEND # IS ENABLED
RAND CHAN12
EXTEND # IF NOT RECYCLE NEEDLES
BZF NEEDLER +5
NEEDLES CAF TWO
DACLOOP TS SPNDX
CS QUARTER
EXTEND
INDEX SPNDX
MP AK
TS L
CCS A
CA DACLIMIT
TCF +2
CS DACLIMIT
AD L
TS T5TEMP # OVFLO CHK
TCF +4
INDEX A # ON OVERFLOW LIMIT OUTPUT TO +-384
CAF DACLIMIT
TS L
INDEX SPNDX
CS EDRIVEX # CURRENT VALUE OF DAC
AD L
INDEX SPNDX
ADS CDUXCMD
INDEX SPNDX
LXCH EDRIVEX
CCS SPNDX
TCF DACLOOP
CAF 13,14,15
EXTEND
WOR CHAN14 # SET DAC ACTIVITY BITS
TC Q
REINIT CAF DELAY200 # ........TILT LOGIC
TS TIME5 # REINITIALIZE DAP IN 200MS
TS T5PHASE
TCF RESUME
DELAY200 DEC 16364 # 200MS
DEC -384
# Page 1013
DACLIMIT DEC 16000
DEC 384
# Page 1014
# INITIALIZATION PROGRAM FOR RCS-CSM AUTOPILOT
#
# THE FOLLOWING QUANTITIES WILL BE ZEROED AND SHOULD APPEAR IN CONSECUTIVE LOCATIONS IN MEMORY AFTER WBODY
#
# WBODY (+1) DFT TAU2
# WBODY1 (+1) DFT1 BIAS
# WBODY2 (+1) DFT2 BIAS1
# ADOT (+1) DRHO (+1) BIAS2
# ADOT1 (+1) DRHO1 (+1) ERRORX
# ADOT2 (+1) DRHO2 (+1) ERRORY
# MERRORX (+1) ATTSEC ERRORZ
# MERRORY (+1) TAU
# MERRORZ (+1) TAU1
FRESHDAP CAF ONE # RESET HOLDFLAG TO STOP AUTOMATIC
TS HOLDFLAG # STEERING AND PREPARE TO PICK UP AN
# ATTITUDE HOLD REFERENCE
REDAP TC IBNKCALL # DECODE DAPDATR1, DAPDATR2 FOR DEADBANDS
CADR S41.2 # RATES, QUADFAILS, QUAD MANAGEMENT
TC IBNKCALL # DECODE IXX, IAVG, AND CONVERT
CADR S40.14 # TO AUTOPILOT GAINS
CAF NO.T5VAR # NO. LOCATIONS TO BE ZEROED MINUS ONE
ZEROT5 TS SPNDX # ZERO ALL NECESSARY ERASABLE REGISTERS
CAF ZERO
INDEX SPNDX
TS WBODY
CCS SPNDX
TCF ZEROT5
TCR ZEROJET
CS ZERO
TS CHANTEMP # INITIALIZE MINIMUM IMPULSE CONTROL
TS CH31TEMP # INITIALIZE RHC POSITION MEMORY FOR
# MANUAL RATE MODES
CAF =.24
TS SLOPE # INITIALIZE SWITCHING LOGIC SLOPE
CAF FOUR
TS T5TIME # PHASE 0 RESETS FOR PHASE 2 INTERRUPT IN
# 60 MS. PHASE 2 RESETS FOR PHASE 1 RUPT
# IN (80MS - T5TIME(40MS)). THEREFORE
# PHASE 1 (RATEFILTER) BEGINS CYCLING 100
# MS FROM NOW AND EVERY 100MS THEREAFTER.
CAF ELEVEN
TS ATTKALMN # RESET TO PICK UP KALMAN FILTER TAINS
# TO INITIALIZE THE S/C ANGULAR RATES
# Page 1015
CA CDUX
TS RHO
CA CDUY
TS RHO1
CA CDUZ
TS RHO2
CAF ZERO # RESET AUTOPILOT TO BEGIN EXECUTING
TS T5PHASE # PHASE2 OF PROGRAM
CS IMODES33 # CHECK IMU STATUS
MASK BIT6 # IF BIT6 = 0 IMU IN FINE ALIGN
CCS A # IF BIT6 = 1 IMU NOT READY
TCF IMUAOK
TS ATTKALMN # CANNOT USE IMU
CAF RCSINITB # PROVIDE FREE CONTROL ONLY
TCF RCSSWIT # DON'T START UP RATE FILTER
# SIGNAL NO RATE FILTER
IMUAOK CAF PRIO34 # START MATRIX INITIALIZATION
TC NOVAC # BYPASS IF IMU NOT IN FINE ALIGN
EBANK= KMPAC
2CADR AMBGUPDT
CAF RCSINIT # CLEAR BIT14 --ASSUME WE HAVE A GOOD IMU
RCSSWIT TS RCSFLAGS # CLEAR BIT1 --INITIALIZE T6 PROGRAM
# SET BIT3 --INITIALIZE NEEDLES
# CLEAR BIT4 --RESET FOR FDAIDSP1
CAF T5WAIT60 # NEXT T5RUPT 60 MS FROM NOW TO ALLOW IMU
# ERROR COUNTER TO ZERO.
# (MINIMUM DELAY = 15 MS)
TS TIME5 # SINCE ATTKALMN IS +11, PROGRAM WILL THEN
TC RESUME # PICK UP THE KALMAN FILTER GAINS. RATE
# FILTER WILL BEGIN OPERATING ZOOMS FROM
# NOW
# CONSTANTS USED IN INITIALIZATION PROGRAM
NO.T5VAR DEC 36
=.24 DEC .24 # = SLOPE OF 0.6/SEC
RCSINIT OCT 00004
RCSINITB OCT 20004
T5WAIT60 DEC 16378 # = 6 CS
EBANK= KMPAC
T6ADDR 2CADR T6START
ZEROJET CAF ELEVEN # ZERO BLAST2, BLAST1, BLAST, YWORD2,
TS SPNDX # YWORD1, PWORD2, PWORD1, RWORD2,
CAF ZERO # AND RWORD1
# Page 1016
INDEX SPNDX
TS RWORD1
CCS SPNDX
TCF ZEROJET +1
CAF FOUR
TS BLAST1 +1
CAF ELEVEN
TS BLAST2 +1
CS BIT1
MASK RCSFLAGS
TS RCSFLAGS # RESET BIT1 OF RCSFLAGS TO 0
EXTEND
DCA T6ADDR
DXCH T6LOC
CAF =+14MS # ENABLE T6RUPT TO SHUT OFF JETS IN 14 MS.
TS TIME6
CAF BIT15
EXTEND
WOR CHAN13
TC Q
T5PHASE2 CCS ATTKALMN # IF (+) INITIALIZE RATE ESTIMATE
TCF KALUPDT
TCF +2 # ONLY IF ATTKALMN POSITIVE
TCF +1
CA DELTATT2 # RESET FOR PHASE3 IN 20 MS
XCH TIME5 # (JET SELECTION LOGIC)
ADS T5TIME # TO COMPENSATE FOR DELAYS IN T5RUPT
CA RCSFLAGS # IF A HIGH RATE AUTO MANEUVER IS IN
MASK BIT15 # PROGRESS (BIT 15 OF RCSFLAGS SET), SET
EXTEND # ATTKALMN TO -1
BZF NOHIAUTO # OTHERWISE SET ATTKALMN TO 0.
CS ONE
NOHIAUTO TS ATTKALMN
# Page 1017
# MANUAL ROTATION COMMANDS
CS OCT01760 # RESET FORCED FIRING BITS (BITS 10 TO 5
MASK RCSFLAGS # OF RCSFLAGS) TO ZERO
TS RCSFLAGS
EXTEND
READ CHAN31
TS L
CA CH31TEMP
EXTEND
RXOR LCHAN
MASK MANROT # = OCT00077
EXTEND
BZMF NOCHANGE
LXCH A
TS CH31TEMP # SAVE CONTENTS OF CHANNEL 31 IN CH31TEMP
CA L
EXTEND
MP BIT5 # PUT BITS 6-1 OF A IN BITS 10-5 OF L
CA L
ADS RCSFLAGS # SET FORCED FIRING BITS FOR AXES WITH
# CHANGES IN COMMAND. BITS 10,9 FOR
# ROLL, BITS 8,7 FOR YAW, BITS 6,5 FOR
# PITCH
CS RCSFLAGS # SET RATE DAMPING FLAGS (BITS 13,12, AND
MASK OCT16000 # 11 OF RCSFLAGS)
ADS RCSFLAGS
NOCHANGE CS CH31TEMP
MASK MANROT
EXTEND
BZMF AHFNOROT # IF NO MANUAL COMMANDS, GO TO AHFNOROT
TS HOLDFLAG # SET HOLDFLAG +
TC STICKCHK # WHEN THE RHC IS OUT OF DETENT, PMANNDX,
# YMANNDX, AND RMANNDX ARE ALL SET, BY
# MEANS OF STICKCHK, TO 0, 1, OR 2 FOR NO,
# +, OR - ROTATION RESPECTIVELY AS
# COMMANDED BY THE RHC.
#
# HOWEVER, IT IS WELL TO NOTE THAT AFTER
# THE RHC IS RETURNED TO DETENT, THE
# PROGRAM BRANCHES TO AHFNOROT AND AVOIDS
# STICKCHK SO PMANNDX, YMANNDX, AND
# RMANNDX ARE NOT RESET TO ZERO BUT RATHER
# LEFT SET TO THEIR LAST OUT OF DETENT
# Page 1018
# VALUES.
CS FLAGWRD1 # SET STIKFLAG TO INFORM STEERING
MASK BIT14 # PROGRAMS (P20) THAT ASTRONAUT HAS
ADS FLAGWRD1 # ASSUMED ROTATIONAL CONTROL OF SPACECRAFT
CAF BIT14
EXTEND
RAND CHAN31
EXTEND
BZMF FREEFUNC
CA RCSFLAGS # EXAMINE RCSFLAGS TO SEE IF RATE FILTER
MASK BIT14 # HAS BEEN INITIALIZED
CCS A # IF SO, PROCEED WITH MANUAL RATE COMMANDS
TCF REINIT # .....TILT, RECYCLE TO INITIALIZE FILTER
CS FIVE # IF MANUAL MANEUVER IS AT HIGH RTE, SET
AD RATEINDX # ATTKALMN TO -1.
EXTEND # OTHERWISE, LEAVE ATTKALMN ALONE.
BZMF +3
CS ONE
TS ATTKALMN
CAF TWO # AUTO-HOLD MANUAL ROTATION
SETWBODY TS SPNDX
DOUBLE
TS DPNDX
INDEX SPNDX # RMANNDX = 0 NO ROTATION
CA RMANNDX # = 1 + ROTATION
EXTEND # = 2 - ROTATION
BZF NORATE # IF NO ROTATION COMMAND ON THIS AXIS,
# GO TO NORATE.
AD RATEINDX # RATEINDX = 0 0.05 DEG/SEC
TS Q # = 2 0.2 DEG/SEC
INDEX Q # = 4 0.5 DEG/SEC
CA MANTABLE -1 # = 6 2.0 DEG/SEC
EXTEND
MP BIT9 # MULTIPLY MANTABLE BY 2 TO THE -6
INDEX DPNDX # TO GET COMMANDED RATE.
DXCH WBODY # SET WBODY TO COMMANDED RATE.
CA RCSFLAGS
MASK OCT16000 # IS RATE DAMPING COMPLETED (BITS 13,12 AND
EXTEND # 11 OF RCSFLAGS ALL ZERO.) IF SO, GO TO
BZF MERUPDAT # MERUPDAT TO UPDATE CUMULATIVE ATTITUDE
# ERROR.
# Page 1019
ZEROER CA ZERO # ZEROER ZEROS MERRORS
ZL
INDEX DPNDX
DXCH MERRORX
TCF SPNDXCHK
NORATE ZL
INDEX DPNDX
DXCH WBODY # ZERO WBODY FOR THIS AXIS
CA RCSFLAGS
MASK OCT16000
EXTEND # IS RATE DAMPING COMPLETED
BZF SPNDXCHK # YES, KEEP CURRENT MERRORX GO TO SPNDXCHK
TCF ZEROER # NO, GO TO ZEROER
MERUPDAT INDEX Q # MERRORX=MERRORX+MEASURED CHANGE IN ANGLE
CS MANTABLE -1 # -COMMANDED CHANGE IN ANGLE
EXTEND # THE ADDITION OF MEASURED CHANGE IN ANGLE
MP BIT7 # HAS ALREADY BEEN DONE IN THE RATE FILTER
INDEX DPNDX # COMMANDED CHANGE IN ANGLE = WBODY TIMES
DAS MERRORX # .1SEC = MANTABLE ENTRY TIMES 2 TO THE -8
SPNDXCHK INDEX DPNDX
CA MERRORX
INDEX SPNDX
TS ERRORX # ERRORX = HIGH ORDER WORD OF MERRORX
CCS SPNDX
TCF SETWBODY
TCF JETS
OCT01760 OCT 01760 # FORCED FIRING BITS MASK
OCT01400 OCT 01400 # ROLL FORCED FIRING MASK ORDER OF
OCT00060 OCT 00060 # PITCH FORCED FIRING MASK DEFINITION
OCT00300 OCT 00300 # YAW FORCED FIRING MASK MUST BE
# PRESERVED
# FOR INDEXING
MANROT OCT 77
OCT16000 OCT 16000 # RATE DAMPING FLAGS MASK
MANTABLE DEC .0071111
DEC -.0071111
DEC .028444
DEC -0.028444
DEC .071111
DEC -.071111
DEC .284444
DEC -.284444
=+14MS DEC 23
FREEFUNC INDEX RMANNDX # ACCELERATION
# Page 1020
CA FREETAU # COMMANDS
TS TAU
INDEX PMANNDX
CA FREETAU # FREETAU 0 SEC
TS TAU1 # +1 +0.10 SEC
INDEX YMANNDX # +2 -0.10 SEC
CA FREETAU # (+3) 0 SEC
TS TAU2
TCF T6PROGM
FREETAU DEC 0
DEC 480
DEC -480
DEC 0
T6PROGM CAF ZERO # FOR MANUAL ROTATIONS
TS ERRORX
TS ERRORY
TS ERRORZ
TCF T6PROG
# Page 1021
DEC .2112 # FILTER GAIN FOR TRANSLATION, LEM ON
DEC .8400 # FILTER GAIN FOR TRANSLATION 2(ZETA)WN DT
DEC .2112 # FILTER GAIN FOR 4 DEGREE/SEC MANEUVERS
GAIN1 DEC .0640 # KALMAN FILTER GAINS FOR INITIALIZATION
DEC .3180 # OF ATTITUDE RATES
DEC .3452
DEC .3774
DEC .4161
DEC .4634
DEC .5223
DEC .5970
DEC .6933
DEC .8151
DEC .9342
DEC .0174 # FILTER GAIN FOR TRANSLATION, LEM ON
DEC .3600 # FILTER GAIN FOR TRANSLATION (WN)(WN)DT
DEC .0174 # FILTER GAIN FOR 4 DEGREE/SEC MANEUVERS
GAIN2 DEC .0016 # SCALED 10
DEC .0454
DEC .0545
DEC .0666
DEC .0832
DEC .1069
DEC .1422
DEC .1985
DEC .2955
DEC .4817
DEC .8683
STICKCHK TS T5TEMP
MASK THREE # INDICES FOR MANUAL ROTATION
TS PMANNDX
CA T5TEMP
EXTEND # MAN RATE 0 0 RATE (DP)
MP QUARTER # +1 + RATE (DP)
TS T5TEMP # +2 - RATE (DP)
MASK THREE # (+3) 0 RATE (DP)
TS YMANNDX
CA T5TEMP
EXTEND
MP QUARTER
TS RMANNDX
TC Q
KALUPDT TS ATTKALMN # INITIALIZATION OF ATTITUDE RATES USING
# KALMAN FILTER TAKES 1.1 SEC
CA DELTATT # =1SEC - 80MS
AD T5TIME # + DELAYS
# Page 1022
TS TIME5
TCF +3
CAF DELTATT2 # SAFETY PLAY TO ASSURE
TS TIME5 # A T5RUPT
KRESUME2 CS ZERO # RESET FOR PHASE1
TS T5PHASE # RESUME INTERRUPTED PROGRAM
TCF RESUME
FDAIDSP2 CS BIT4 # RESET FOR FDAIDSP1
MASK RCSFLAGS
TS RCSFLAGS
CS FLAGWRD0 # ON - DISPLAY ONE OF THE TOTAL ATTITUDE
MASK BIT9 # ERRORS
EXTEND
BZF FDAITOTL
EXTEND
DCS ERRORX # OFF - DISPLAY AUTOPILOT FOLLOWING ERROR
DXCH AK
CS ERRORZ
TS AK2
TCF RESUME # END PHASE 1
FDAITOTL CA FLAGWRD9
MASK BIT6
EXTEND
BZF WRTN17 # IS N22ORN17 (BIT6 OF FLAGWRD9) = 0
# IF SO, GO TO WRTN17
WRTN22 EXTEND # OTHERWISE, CONTINUE ON TO WRTN22 AND
DCA CTHETA # GET SET TO COMPUTE TOTAL ATTITUDE
DXCH WTEMP # ERROR WRT N22 BY PICKING UP THE THREE
CA CPHI # COMPONENTS OF N22
GETAKS EXTEND # COMPUTE TOTAL ATTITUDE ERROR FOR
MSU CDUX # DISPLAY ON FDAI ERROR NEEDLES
TS AK
CA WTEMP
EXTEND
MSU CDUY
TS T5TEMP
EXTEND
MP AMGB1
ADS AK
CA T5TEMP
EXTEND
MP AMGB4
# Page 1023
TS AK1
CA T5TEMP
EXTEND
MP AMGB7
TS AK2
CA WTEMP +1
EXTEND
MSU CDUZ
TS T5TEMP
EXTEND
MP AMGB5
ADS AK1
CA T5TEMP
EXTEND
MP AMGB8
ADS AK2
TCF RESUME # END PHASE1 OF RCS DAP
WRTN17 EXTEND # GET SET TO COMPUTE TOTAL ASTRONAUT
DCA CPHIX +1 # ATTITUDE ERROR WRT N17 BY PICKING UP
DXCH WTEMP # THE THREE COMPONENTS OF N17
CA CPHIX
TCF GETAKS
# Page 1024 (empty page)

173
RCS_FAILURE_MONITOR.s Normal file
View File

@ -0,0 +1,173 @@
# Copyright: Public domain.
# Filename: RCS_FAILURE_MONITOR.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Hartmuth Gutsche <hgutsche@xplornet.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 190-192
# Mod history: 2009-05-19 HG Transcribed from page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 190
# PROGRAM DESCRIPTION:
#
# AUTHOR: J. S. MILLER
#
# MODIFIED 6 MARCH 1968 BY P. S. WEISSMAN TO SET UP JOB FOR 1/ACCS WHEN THE MASKS ARE CHANGED.
#
# THIS ROUTINE IS ATTACHED TO T4RUPT, AND IS ENTERED EVERY 480 MS. ITS FUNCTION IS TO EXAMINE THE LOW 8 BITS
# OF CHANNEL 32 TO SEE IF ANY ISOLATION-VALVE CLOSURE BITS HAVE APPEARED OR DISAPPEARED (THE CREW IS WARNED OF JET
# FAILURES BY LAMPS LIT BY THE GRUMMAN FAILURE-DETECTION CIRCUITRY; THEY MAY RESPOND BY OPERATING SWITCHES WHICH
# ISOLATE PAIRS OF JETS FROM THE PROPELLANT TANKS AND SET BITS IN CHANNEL 32). iN THE EVENT THAT CHANNEL 32 BITS
# DIFFER FROM `PVALVEST', THE RECORD OF ACTIONS TAKEN BY THIS ROUTINE, THE APPROPRIATE BITS IN `CH5MASK' &
# `CH6MASK', USED BY THE DAP JET-SELECTION LOGIC, ARE UPDATED, AS IS `PVALVEST'. TO SPEED UP & SHORTEN THE
# ROUTINE, NO MORE THAN ONE CHANGE IS ACCEPTED PER ENTRY. THE HIGHEST-NUMBERED BIT IN CHANNEL 32 WHICH REQUIRES
# ACTION IS THE ONE PROCESSED.
#
# THE CODING IN THE FAILURE MONITOR HAS BEEN WRITTEN SO AS TO HAVE ALMOST COMPLETE RESTART PROTECTION. FOR
# EXAMPLE, NO ASSUMPTION IS MADE WHEN SETTING A `CH5MASK' BIT TO 1 THAT THE PREVIOUS STATE IS 0, ALTHOUGH IT OF
# COURSE SHOULD BE. ONE CASE WHICH MAY BE SEEN TO EVADE PROTECTION IS THE OCCURRENCE OF A RESTART AFTER UPDATING
# ONE OR BOTH DAP MASK-WORDS BUT BEFORE UPDATING `PVALVEST', COUPLED WITH A CHANGE IN THE VALVE-BIT BACK TO ITS
# FORMER STATE. THE CONSEQUENCE OF THIS IS THAT THE NEXT ENTRY WOULD NOT SEE THE CHANGE INCOMPLETELY INCORP-
# ORATED BY THE LAST PASS (BECAUSE IT WENT AWAY AT JUST THE RIGHT TIME), BUT THE DAP MASK-WORDS WILL BE INCORRECT.
# THIS COMBINATION OF EVENTS SEEMS QUITE REMOTE, BUT NOT IMPOSSIBLE UNLESS THE CREW OPERATES THE SWITCHES AT HALF-
# SECOND INTERVALS OR LONGER. IN ANY EVENT, A DISAGREEMENT BETWEEN REALITY AND THE DAP MASKS WILL BE CUREED IF
# THE MISINTERPRETED SWITCH IS REVERSED AND THEN RESTORED TO ITS CORRECT POSITION (SLOWLY).
#
# CALLING SEQUENCE:
#
# TCF RCSMONIT # (IN INTERRUPT MODE, EVERY 480 MS.)
#
# EXIT: TCF RCSMONEX (ALL PATHS EXIT VIA SUCH AN INSTRUCTION)
RCSMONEX EQUALS RESUME
# ERASABLE INITIALIZATION REQUIRED:
#
# VIA FRESH START: PVALVEST = +0 (ALL JETS ENABLED)
# CH5MASK,CH6MASK = +0 (ALL JETS OK)
#
# OUTPUT: CH5MASK & CH6MASK UPDATED (1'S WHERE JETS NOT TO BE USED, IN CHANNEL 5 & 6 FORMAT)
# PVALTEST UPDATED (1'S WHEN VALVE CLOSURES HAVE BEEN TRANSLATED INTO CH5MASK & CH6MASK; CHAN 32 FORMAT)
# JOB TO DO 1/ACCS.
#
# DEBRIS: A, L, AND Q AND DEBRIS OF NOVAC.
#
# SUBROUTINE CALLED: NOVAC.
EBANK= CH5MASK
BANK 23
SETLOC RCSMONT
BANK
# Page 191
COUNT* $$/T4RCS
RCSMONIT EQUALS RCSMON
RCSMON CS ZERO
EXTEND
RXOR CHAN32 # PICK UP + INVERT INVERTED CHANNEL 32.
MASK LOW8 # KEEP JET-FAIL BITS ONLY.
TS Q
CS PVALVEST # _ _
MASK Q # FORM PC + PC.
TS L # (P = PREVIOUS ISOLATION VALVE STATE,
CS Q # C = CURRENT VALVE STATE (CH32)).
MASK PVALVEST
ADS L # RESULT NZ INDICATES ACTION REQUIRED.
EXTEND
BZF RCSMONEX # QUIT IF NO ACTION REQUIRED.
EXTEND
MP BIT7 # MOVE BITS 8-1 OF A TO 14-7 OF L.
XCH L # ZERO TO L IN THE PROCESS.
-3 INCR L
DOUBLE # BOUND TO GET OVERFLOW IN THIS LOOP,
OVSK # SINCE WE ASSURED INITIAL NZ IN A.
TCF -3
INDEX L
CA BIT8 -1 # SAVE THE RELEVANT BIT (8-1).
TS Q
MASK PVALVEST # LOOK AT PREVIOUS VALVE STATE BIT.
CCS A
TCF VOPENED # THE VALVE HAS JUST BEEN OPENED.
CS CH5MASK # THE VALVE HAS JUST BEEN CLOSED.
INDEX L
MASK 5FAILTAB
ADS CH5MASK # SET INHIBIT BIT FOR CHANNEL 5 JET.
CS CH6MASK
INDEX L
MASK 6FAILTAB
ADS CH6MASK # SET INGIBIT BIT FOR CHANNEL 6 JET
CA Q
ADS PVALVEST # RECORD ACTION TAKEN.
TCF 1/ACCFIX # SET UP 1/ACCJOB AND EXIT.
# Page 192
VOPENED INDEX L # A VALVE HAS JUST BEEN OPENED.
CS 5FAILTAB
MASK CH5MASK
TS CH5MASK # REMOVE INHIBIT BIT FOR CHANNEL 5 JET.
INDEX L
CS 6FAILTAB
MASK CH6MASK
TS CH6MASK # REMOVE INHIBIT BIT FOR CHANNEL 6 JET.
CS Q
MASK PVALVEST
TS PVALVEST # RECORD ACTION TAKEN.
1/ACCFIX CAF PRIO27 # SET UP 1/ACCS SO THAT THE SWITCH CURVES
TC NOVAC # FOR TJETLAW CAN BE MODIFIED IF CH5MASK
EBANK= AOSQ # HAS BEEN ALTERED.
2CADR 1/ACCJOB
TCF RCSMONEX # EXIT.
5FAILTAB EQUALS -1 # CH 5 JET BIT CORRESPONDING TO CH 32 BIT:
OCT 00040 # 8
OCT 00020 # 7
OCT 00100 # 6
OCT 00200 # 5
OCT 00010 # 4
OCT 00001 # 3
OCT 00004 # 2
OCT 00002 # 1
6FAILTAB EQUALS -1 # CH 6 JET BIT CORRESPONDING TO CH 32 BIT:
OCT 00010 # 8
OCT 00020 # 7
OCT 00004 # 6
OCT 00200 # 5
OCT 00001 # 4
OCT 00002 # 3
OCT 00040 # 2
OCT 00100 # 1

1609
REENTRY_CONTROL.s Normal file

File diff suppressed because it is too large Load Diff

335
RESTARTS_ROUTINE.s Normal file
View File

@ -0,0 +1,335 @@
# Copyright: Public domain.
# Filename: RESTARTS_ROUTINE.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 1414-1419
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-07 RSB Adapted from Colossus249 file of the same
# name, and page images. Corrected various
# typos in the transcription of program
# comments, and these should be back-ported
# to Colossus249.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 1414
BANK 01
SETLOC RESTART
BANK
EBANK= PHSNAME1 # GOPROG MUST SWITCH TO THIS EBANK
COUNT 01/RSROU
RESTARTS CA MPAC +5 # GET GROUP NUMBER -1
DOUBLE # SAVE FOR INDEXING
TS TEMP2G
CA PHS2CADR # SET UP EXIT IN CASE IT IS AN EVEN
TS TEMPSWCH # TABLE PHASE
CA RTRNCADR # TO SAVE TIME ASSUME IT WILL GET NEXT
TS GOLOC +2 # GROUP AFTER THIS
CA TEMPPHS
MASK OCT1400
CCS A # IS IT A VARIABLE OR TABLE RESTART
TCF ITSAVAR # IT'S A VARIABLE RESTART
GETPART2 CCS TEMPPHS # IS IT AN X.1 RESTART
CCS A
TCF ITSATBL # NO, IT'S A TABLE RESTART
CA PRIO14 # IT IS AN X.1 RESTART, THEREFORE START
TC FINDVAC # THE DISPLAY RESTART JOB
EBANK= LST1
2CADR INITDSP
TC RTRNCADR # FINISHED WITH THIS GROUP, GET NEXT ONE
ITSAVAR MASK OCT1400 # IS IT TYPE B ?
CCS A
TCF ITSLIKEB # YES, IT IS TYPE B
EXTEND # STORES THE JOB (OR TASK) 2CADR FOR EXIT
NDX TEMP2G
DCA PHSNAME1
DXCH GOLOC
CA TEMPPHS # SEE IF THIS IS A JOB, TASK, OR A LONGCALL
MASK OCT7
AD MINUS2
CCS A
TCF ITSLNGCL # IT'S A LONGCALL
# Page 1415
RTRNCADR TC SWRETURN # CAN'T GET HERE.
TCF ITSAWAIT
TCF ITSAJOB # IT'S A JOB
ITSAWAIT CA WTLTCADR # SET UP WAITLIST CALL
TS GOLOC -1
NDX TEMP2G # DIRECTLY STORED
CA PHSPRDT1
TIMETEST CCS A # IS IT AN IMMEDIATE RESTART
INCR A # NO.
TCF FINDTIME # FIND OUT WHEN IT SHOULD BEGIN
TCF ITSINDIR # STORED INDIRECTLY
TCF IMEDIATE # IT WANTS AN IMMEDIATE RESTART
# ***** THIS MUST BE IN FIXED FIXED *****
BLOCK 02
SETLOC FFTAG2
BANK
COUNT 02/RSROU
ITSINDIR LXCH GOLOC +1 # GET THE CORRECT E BANK IN CASE THIS IS
LXCH BB # SWITCHED ERASABLE
NDX A # GET THE TIME INDIRECTLY
CA 1
LXCH BB # RESTORE THE BB AND GOLOC
LXCH GOLOC +1
TCF FINDTIME # FIND OUT WHEN IT SHOULD BEGIN
# ***** YOU MAY RETURN TO SWITCHED FIXED *****
BANK 01
SETLOC RESTART
BANK
COUNT 01/RSROU
FINDTIME COM # MAKE NEGATIVE SINCE IT WILL BE SUBTRACTED
TS L # AND SAVE
NDX TEMP2G
CS TBASE1
EXTEND
# Page 1416
SU TIME1
CCS A
COM
AD OCT37776
AD ONE
AD L
CCS A
CA ZERO
TCF +2
TCF +1
IMEDIATE AD ONE
TC GOLOC -1
ITSLIKEB CA RTRNCADR # TYPE B, SO STORE RETURN IN
TS TEMPSWCH # TEMPSWCH IN CASE OF AN EVEN PHASE
CA PRT2CADR # SET UP EXIT TO GET TABLE PART OF THIS
TS GOLOC +2 # VARIABLE TYPE OF PHASE
CA TEMPPHS # MAKE THE PHASE LOOK RIGHT FOR THE TABLE
MASK OCT177 # PART OF THIS VARIABLE PHASE
TS TEMPPHS
EXTEND
NDX TEMP2G # OBTAIN THE JOB'S 2CADR
DCA PHSNAME1
DXCH GOLOC
ITSAJOB NDX TEMP2G # NOW ADD THE PRIORITY AND LET'S GO
CA PHSPRDT1
CHKNOVAC TS GOLOC -1 # SAVE PRIO UNTIL WE SEE IF IT'S
EXTEND # A FINDVAC OR A NOVAC
BZMF ITSNOVAC
CAF FVACCADR # POSITIVE, SET UP FINDVAC CALL.
XCH GOLOC -1 # PICK UP PRIO
TC GOLOC -1 AND GO
ITSNOVAC CAF NOVACADR # NEGATIVE,
XCH GOLOC -1 # SET UP NOVAC CALL,
COM # CORRECT PRIO,
TC GOLOC -1 # AND GO
ITSATBL TS CYR # FIND OUT IF THE PHASE IS ODD OR EVEN
CCS CYR
TCF +1 # IT'S EVEN
TCF ITSEVEN
CA RTRNCADR # IN CASE THIS IS THE SECOND PART OF A
TS GOLOC +2 # TYPE B RESTART, WE NEED PROPER EXIT
# Page 1417
CA TEMPPHS # SET UP POINTER FOR FINDING OUR PLACE IN
TS SR # THE RESTART TABLES
AD SR
NDX TEMP2G
AD SIZETAB +1
TS POINTER
CONTBL2 EXTEND # FIND OUT WHAT'S IN THE TABLE
NDX POINTER
DCA CADRTAB # GET THE 2CADR
LXCH GOLOC +1 # STORE THE BB INFORMATION
CCS A # IS IT A JOB OR IT IT TIMED
INCR A # POSITIVE, MUST BE A JOB
TCF ITSAJOB2
INCR A # MUST BE EITHER A WAITLIST OR LONGCALL
TS GOLOC # LET'S STORE THE CORRECT CADR
CA WTLTCADR # SET UP OUR EXIT TO WAITLIST
TS GOLOC -1
CA GOLOC +1 # NOW FIND OUT IF IT IS A WAITLIST CALL
MASK BIT10 # THIS SHOULD BE ONE IF WE HAVE -BB
CCS A # FOR THAT MATTER SO SHOULD BE BITS 9,8,7,
# 6,5, AND LAST BUT NOT LEAST (PERHAPS NOT
# IN IMPORTANCE ANYWAY. BUT 4
TCF ITSWTLST # IT IS A WAITLIST CALL
NDX POINTER # OBTAIN THE ORIGINAL DELTA T
CA PRDTTAB # ADDRESS FOR THIS LONGCALL
TCF ITSLGCL1 # NOW GO GET THE DELTA TIME
# ***** THIS MUST BE IN FIXED FIXED *****
BLOCK 02
SETLOC FFTAG2
BANK
COUNT 02/RSROU
ITSLGCL1 LXCH GOLOC +1 # OBTAIN THE CORRECT E BANK
LXCH BB
LXCH GOLOC +1 # AND PRESERVE OUR E AND F BANKS
EXTEND # GET THE DELTA TIME
NDX A
DCA 0
# Page 1418
LXCH GOLOC +1 # RESTORE OUR E AND F BANK
LXCH BB # RESTORE THE TASKS E AND F BANKS
LXCH GOLOC +1 # AND PRESERVE OUR L
TCF ITSLGCL2 # NOT GET'S PROCESS THIS LONGCALL
# ***** YOU MAY RETURN TO SWITCHED FIXED *****
BANK 01
SETLOC RESTART
BANK
COUNT 01/RSROU
ITSLGCL2 DXCH LONGTIME
EXTEND # CALCULATE TIME LEFT
DCS TIME2
DAS LONGTIME
EXTEND
DCA LONGBASE
DAS LONGTIME
CCS LONGTIME # FIND OUT HOW THIS SHOULD BE RESTARTED
TCF LONGCLCL
TCF +2
TCF IMEDIATE -3
CCS LONGTIME +1
TCF LONGCLCL
NOOP # CAN'T GET HERE ************
TCF IMEDIATE -3
TCF IMEDIATE
LONGCLCL CA LGCLCADR # WE WILL GO TO LONGCALL
TS GOLOC -1
EXTEND # PREPARE OUR ENTRY TO LONGCALL
DCA LONGTIME
TC GOLOC -1
ITSLNGCL CA WTLTCADR # ASSUME IT WILL GO TO WAITLIST
TS GOLOC -1
NDX TEMP2G
CS PHSPRDT1 # GET THE DELTA T ADDRESS
TCF ITSLGCL1 # NOW GET THE DELTA TIME
ITSWTLST CS GOLOC +1 # CORRECT THE BBCON INFORMATION
TS GOLOC +1
# Page 1419
NDX POINTER # GET THE DT AND FIND OUT IF IT WAS STORED
CA PRDTTAB # DIRECTLY OR INDIRECTLY
TCF TIMETEST # FIND OUT HOW THE TIME IS STORED
ITSAJOB2 XCH GOLOC # STORE THE CADR
NDX POINTER # ADD THE PRIORITY AND LET'S GO
CA PRDTTAB
TCF CHKNOVAC
ITSEVEN CA TEMPSWCH # SET FOR EITHER THE SECOND PART OF THE
TS GOLOC +2 # TABLE, OR A RETURN FOR THE NEXT GROUP
NDX TEMP2G # SET UP POINTER FOR OUR LOCATION WITHIN
CA SIZETAB # THE TABLE
AD TEMPPHS # THIS MAY LOOK BAD BUT LET'S SEE YOU DO
AD TEMPPHS # BETTER IN TIME OR NUMBER OF LOCATIONS
AD TEMPPHS
TS POINTER
TCF CONTBL2 # NO PROCESS WHAT IS IN THE TABLE
PHSPART2 CA THREE # SET THE POINTER FOR THE SECOND HALF OF
ADS POINTER # THE TABLE
CA RTRNCADR # THIS WILL BE OUR LAST TIME THROUGH THE
TS GOLOC +2 # EVEN TABLE, SO AFTER IT GET THE NEXT
# GROUP
TCF CONTBL2 # SO LET'S GET THE SECOND ENTRY IN THE TBL
TEMPPHS EQUALS MPAC
TEMP2G EQUALS MPAC +1
POINTER EQUALS MPAC +2
TEMPSWCH EQUALS MPAC +3
GOLOC EQUALS VAC5 +20D
MINUS2 EQUALS NEG2
OCT177 EQUALS LOW7
PHS2CADR GENADR PHSPART2
PRT2CADR GENADR GETPART2
LGCLCADR GENADR LONGCALL
FVACCADR GENADR FINDVAC
WTLTCADR GENADR WAITLIST
NOVACADR GENADR NOVAC

558
RESTART_TABLES.s Normal file
View File

@ -0,0 +1,558 @@
# Copyright: Public domain.
# Filename: RESTART_TABLES.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 211-221
# Contact: Ron Burkey <info@sandroid.org>,
# Fabrizio Bernardini <fabrizio@spacecraft.it>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-16 FB Transcription Batch 2 Assignment.
# 2009-05-20 RSB Added a missing comment mark. Corrected mismarked
# Page 217 -> 220.
# 2009-05-21 RSB Fixed value of 5.21SPOT.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 211
# RESTART TABLES
# --------------
#
# THERE ARE TWO FORMS OF RESTART TABLES FOR EACH GROUP. THEY ARE KNOWN AS THE EVEN RESTART TABLES AND THE ODD
# RESTART TABLES. THE ODD TABLES HAVE ONLY ONE ENTRY OF THREE LOCATIONS WHILE THE EVEN TABLES HAVE TWO ENTRIES
# EACH USING THREE LOCATIONS. THE INFORMATION AS TO WHETHER IT IS A JOB, WAITLIST, OR A LONGCALL IS GIVEN BY THE
# WAY THINGS ARE PUT IN TO THE TABLES.
#
# A JOB HAS ITS PRIORITY STORED IN A PRDTTAB OF THE CORRECT PHASE SPOT -- A POSITIVE PRIORITY INDICATES A
# FINDVAC JOB, A NEGATIVE PRIORITY A NOVAC. THE 2CADR OF THE JOB IS STORED IN THE CADRTAB.
# FOR EXAMPLE,
#
# 5.7SPOT OCT 23000
# 2CADR SOMEJOB
#
# A RESTART OF GROUP 5 WITH PHASE SEVEN WOULD THEN CAUSE SOMEJOB TO BE RESTARTED AS A FINDVAC WITH PRIORITY 23.
#
# 5.5SPOT OCT -23000
# 2CADR ANYJOB
#
# HERE A RESTART OF GROUP 5 WITH PHASE 7 WOULD CAUSE ANYJOB TO BE RESTARTED AS A NOVAC WITH PRIORITY 23.
# A LONGCALL HAS ITS GENADR OF ITS 2CADR STORED NEGATIVELY AND ITS BBCON STORED POSITIVELY. IN ITS PRDTTAB IS
# PLACED THE LOCATION OF A DP REGISTER THAT CONTAINS THE DELTA TIME THAT LONGCALL HAD BEEN ORIGINALLY STARTED
# WITH. EXAMPLE,
#
# 3.6SPOT GENADR DELTAT
# -GENADR LONGTASK
# BBCON LONGTASK
# OCT 31000
# 2CADR JOBAGAIN
#
# THIS WOULD START UP LONGTASK AT THE APPROPRIATE TIME, OR IMMEDIATELY IF THE TIME HAD ALREADY PASSED. IT SHOULD
# BE NOTED THAT IF DELTAT IS IN A SWITCHED E BANK, THIS INFORMATION SHOULD BE IN THE BBCON OF THE 2CADR OF THE
# TASK. FROM ABOVE, WE SEE THAT THE SECOND PART OF THIS PHASE WOULD BE STARTED AS A JOB WITH A PRIORITY OF 31.
#
# WAITLIST CALLS ARE IDENTIFIED BY THE FACT THAT THEIR 2CADR IS STORED NEGATIVELY. IF PRDTTAB OF THE PHASE SPOT
# IS POSITIVE, THEN IT CONTAINS THE DELTA TIME, IF PRDTTAB IS NEGATIVE THEN IT IS THE -GENADR OF AN ERASABLE
# LOCATION CONTAINING THE DELTA TIME, THAT IS, THE TIME IS STORED INDIRECTLY. IT SHOULD BE NOTED AS ABOVE, THAT
# IF THE TIME IS STORED INDIRECTLY, THE BBCON MUST CONTAIN THE NECESSARY E BANK INFORMATION IF APPLICABLE. WITH
# WAITLIST WE HAVE ONE FURTHER OPTION, IF -0 IS STORED IN PRDTTAB, IT WILL CAUSE AN IMMEDIATE RESTART OF THE
# TASK. EXAMPLES,
#
# OCT 77777 # THIS WILL CAUSE AN IMMEDIATE RESTART
# -2CADR ATASK # OF THE TASK "ATASK"
#
# DEC 200 # IF THE TIME OF THE 2 SECONDS SINCE DUMMY
# -2CADR DUMMY # WAS PUT ON THE WAITLIST IS UP, IT WILL BEGIN
# # IN 10 MS, OTHERWISE IT WILL BEGIN WHEN
# # IT NORMALLY WOULD HAVE BEGUN.
# Page 212
# -GENADR DTIME # WHERE DTIME CONTAINS THE DELTA TIME
# -2CADR TASKTASK # OTHERWISE THIS IS AS ABOVE
#
# ***** NOW THE TABLES THEMSELVES *****
BANK 01
SETLOC RESTART
BANK
COUNT 01/RSTAB
PRDTTAB EQUALS 12000 # USED TO FIND THE PRIORITY OR DELTATIME
CADRTAB EQUALS 12001 # THIS AND THE NEXT RELATIVE LOC CONTAIN
# RESTART 2CADR
SIZETAB TC 1.2SPOT -12006
TC 1.3SPOT -12004
TC 2.2SPOT -12006
TC 2.3SPOT -12004
TC 3.2SPOT -12006
TC 3.3SPOT -12004
TC 4.2SPOT -12006
TC 4.3SPOT -12004
TC 5.2SPOT -12006
TC 5.3SPOT -12004
TC 6.2SPOT -12006
TC 6.3SPOT -12004
1.2SPOT EQUALS 3.2SPOT
# ANY MORE GROUP 1.EVEN RESTART VALUES SHOULD GO HERE.
1.3SPOT DEC 120 # THIS NUMBER MUST BE EQUAL C(JTAGTIME)
EBANK= AOG
-2CADR SETJTAG
1.5SPOT OCT 10000
EBANK= DAPDATR1
2CADR REDO40.9
1.7SPOT OCT 10000
EBANK= ESTROKER
2CADR RELINUS
1.11SPOT OCT 10000
EBANK= ESTROKER
2CADR PIKUP20
# ANY MORE GROUP 1.ODD RESTART VALUES SHOULD GO HERE.
2.2SPOT EQUALS 1.2SPOT
# ANY MORE GROUP 2.EVEN RESTART VALUES SHOULD GO HERE
# Page 213
2.3SPOT GENADR 600SECS
-GENADR STATEINT
EBANK= RRECTCSM
BBCON STATEINT
2.5SPOT OCT 05000
EBANK= RRECTCSM
2CADR STATINT1
2.7SPOT OCT 10000
EBANK= MRKBUF2
2CADR R22
2.11SPOT OCT 14000
EBANK= LANDMARK
2CADR V94ENTER
2.13SPOT OCT 10000
EBANK= MRKBUF2
2CADR REDOR22
# ANY MORE GROUP 2.ODD RESTART VALUES SHOULD GO HERE.
3.2SPOT EQUALS 4.2SPOT
# ANY MORE GROUP 3.EVEN RESTART VALUES SHOULD GO HERE
3.3SPOT OCT 20000
EBANK= TGO
2CADR S40.13
3.5SPOT DEC 0
DEC 0
DEC 0
3.7SPOT OCT 22000
EBANK= TEPHEM
2CADR MATRXJOB
3.11SPOT OCT 22000
EBANK= TEPHEM
2CADR REP11
3.13SPOT OCT 22000
EBANK= TEPHEM
2CADR REP11A
3.15SPOT -GENADR TGO +1
EBANK= TGO
-2CADR ENGINOFF
# Page 214
# ANY MORE GROUP 3.ODD RESTART VALUES SHOULD GO HERE
4.2SPOT OCT 77777
EBANK= TIG
-2CADR PRECHECK
OCT 30000
EBANK= DELVIMU
2CADR P47BODY
4.4SPOT OCT 77777
EBANK= TIG
-2CADR PRECHECK
DEC 2996
EBANK= DAPDATR1
-2CADR TTG/0
4.6SPOT OCT 77777
EBANK= TIG
-2CADR PRECHECK
DEC 2496
EBANK= TIG
-2CADR TIG-5
# ANY MORE GROUP 4.EVEN RESTART VALUES SHOULD GO HERE
4.3SPOT DEC 40
EBANK= PACTOFF
-2CADR DOTVCON
4.5SPOT DEC 160
EBANK= PACTOFF
-2CADR DOSTRULL
4.7SPOT DEC 500
EBANK= PACTOFF
-2CADR TIG-0
4.11SPOT DEC 250
EBANK= DAPDATR1
-2CADR V97E40.6
4.13SPOT DEC 200
EBANK= WHOCARES
-2CADR R40ENABL
4.15SPOT OCT 16000 # PRELAUNCH OPTICAL VERIFICATION
EBANK= OGC
# Page 215
2CADR COMPVER # CALLS FOR OPTICS DATA AGAIN (STD LEADIN)
4.17SPOT OCT 16000
EBANK= XSM
2CADR AZMTHCG1
4.21SPOT GENADR P40TMP # DELTA TIME USED IN SETTING UP
-GENADR TIGBLNK # LONG CALL OF TIGBLNK BY P40,P41
EBANK= P40TMP
BBCON TIGBLNK
4.23SPOT OCT 12000 # PROTECT P40S/SV BY P40 P41
EBANK= TIG
2CADR P40S/SV
4.25SPOT OCT 24000
EBANK= BESTI
2CADR PROG52
4.27SPOT DEC 250
EBANK= PACTOFF
-2CADR DOTVCRCS
4.31SPOT OCT 13000
EBANK= STAR
2CADR R51 +1
4.33SPOT DEC 2100 # PROTECT CONTINUING JOB TO START P63
EBANK= AOG
-2CADR WAKEP62
4.35SPOT OCT 12000
EBANK= DAPDATR1
2CADR POSTBURN
4.37SPOT DEC 500
EBANK= TIG
-2CADR TIGAVEG
4.41SPOT OCT 17000 # PROTECT DISPLAY JOB IN P67
EBANK= AOG
2CADR P67.1
4.43SPOT -GENADR S61DT # PROTECT TASK TO START PREREAD,ENTRY
EBANK= S61DT # S61.1C WILL CHANGE EBANK=EB7 FOR PREREAD
-2CADR S61.1C
4.45SPOT OCT 13000 # PROTECT CONTINUING JOB S61.1
EBANK= AOG # (ENTRY IMU ALIGNMENT)
# Page 216
2CADR S61.1A -1
4.47SPOT OCT 17000 # PROTECT HUNTEST ITERATION
EBANK= AOG
2CADR PRE-HUNT
4.51SPOT OCT 77777 # PROTECT FDAI ATTITUDE
EBANK= BODY3 # ERROR DISPLAY IN P11
-2CADR ATERTASK
4.53SPOT DEC -0
EBANK= END-E7 # EBANK7 FOR TIG
-2CADR V97ETASK
4.55SPOT OCT 13000 # PROTECT P65 RESPONSIVE DISPLAY.
EBANK= RTINIT
2CADR P65.1
4.57SPOT -GENADR P40TMP
EBANK= P40TMP
-2CADR TIGON
4.61SPOT OCT 77777
EBANK= PACTOFF
-2CADR IGNITION
4.63SPOT OCT 77777
EBANK= PACTOFF
-2CADR DOSPSOFF
4.65SPOT DEC 10
EBANK= TIG
-2CADR TIG-5
4.67SPOT DEC -0
EBANK= CSMMASS
-2CADR V97TTASK
4.71SPOT DEC 250
EBANK= DAPDATR1 # (FOR RCSDAPON)
-2CADR V97TRCS
4.73SPOT DEC -0
EBANK= V97VCNTR
-2CADR V97PTASK
4.75SPOT DEC -0
EBANK= DAPDATR1
-2CADR SPSOFF97
# Page 217
4.77SPOT DEC -0
EBANK= PACTOFF
-2CADR TIG-0
# ANY MORE GROUP 4.ODD RESTART VALUES SHOULD GO HERE
5.2SPOT OCT 32000
EBANK= DVCNTR
2CADR NORMLIZE
DEC 200
EBANK= AOG
-2CADR REREADAC
5.4SPOT OCT 20000
EBANK= DVCNTR
2CADR SERVICER
DEC 200
EBANK= AOG
-2CADR REREADAC
# ANY MORE GROUP 5.EVEN RESTART VALUES SHOULD GO HERE
5.3SPOT DEC 200
EBANK= AOG
-2CADR REREADAC
5.5SPOT OCT 77777
EBANK= AOG
-2CADR REDO5.5
5.7SPOT OCT 20000 # USED BY PRELAUNCH
EBANK= XSM
2CADR RSTGTS1
5.11SPOT OCT 77777
EBANK= XSM
-2CADR ALLOOP1
5.13SPOT OCT 20000
EBANK= XSM
2CADR WTLISTNT
5.15SPOT OCT 20000
EBANK= XSM
2CADR RESTEST1
5.17SPOT OCT 20000
EBANK= XSM
# Page 218
2CADR GEOSTRT4
5.21SPOT OCT 22000
EBANK= XSM
2CADR ALFLT1
5.23SPOT OCT 77777
EBANK= XSM
-2CADR SPECSTS
5.25SPOT OCT 20000
EBANK= XSM
2CADR RESTEST3
5.27SPOT OCT 20000
EBANK= XSM
2CADR RESTAIER
5.31SPOT DEC 0
DEC 0
DEC 0
5.33SPOT OCT 20000
EBANK= XSM
2CADR RESCHNG
5.35SPOT DEC 0
2DEC 0
5.37SPOT OCT 77777
EBANK= AOG
-2CADR CHEKAVEG
5.41SPOT OCT 77777 # TO PROTECT PREREAD AT TIG-30A
EBANK= DVCNTR # TIG-15 T+60
-2CADR PREREAD
# ANY MORE GROUP 5.ODD RESTART VALUES SHOULD GO HERE
6.2SPOT OCT 77777 # USED BY P40 AFTER GIMB DR TST TO REPOS'N
EBANK= AK # ENGINE UNTIL TVCDAPON
-2CADR PRE40.6
DEC 100
EBANK= TTOGO
-2CADR CLOKTASK
# ANY MORE 6.ODD RESTART VALUES SHOULD GO HERE
# Page 219
6.3SPOT DEC 100
EBANK= TIG
-2CADR CLOKTASK
6.5SPOT OCT 30000 # PROTECT INCREMENTING OF TIME2,TIME1 BY
EBANK= TEPHEM # P27(UPDATE PROGRAM)
2CADR TIMEDIDR
6.7SPOT OCT 0
OCT 0
OCT 0
6.11SPOT -GENADR CM/GYMDT # PROTECT TASK TO READ CDUS.
EBANK= CM/GYMDT # FOR ENTRY DAP
-2CADR READGYMB
6.13SPOT DEC 0
DEC 0
DEC 0
# Page 220
# PROGRAM DESCRIPTION: NEWPHASE DATE: 11 NOV 1966
# MOD: 1 ASSEMBLY: SUNBURST REV
# MOD BY: COPPS LOG SECTION: PHASE TABLE MAINTENANCE
#
# FUNCTIONAL DESCRIPTION:
#
# NEWPHASE IS THE QUICK WAY TO MAKE A NON VARIABLE PHASE CHANGE. IT INCLUDES THE OPTION OF SETTING
# TBASE OF THE GROUP. IF TBASE IS TO BE SET, -C(TIME1) IS STORED IN THE TBASE TABLE AS FOLLOWS:
#
# (L-1) TBASE0
# (L) TBASE1 (IF GROUP=1)
# (L+1)
# (L+2) TBASE2 (IF GROUP=2)
# -----
# (L+6) TBASE4 (IF GROUP=4)
# (L+7)
# (L+8) TBASE5 (IF GROUP=5)
#
# IN ANY CASE, THE NEGATIVE OF THE PHASE, FOLLOWED (IN THE NEXT REGISTER) BY THE PHASE, IS STORED IN THE
# PHASE TABLE AS FOLLOWS:
#
# (L) -PHASE1 (IF GROUP=1)
# (L+1) PHASE1
# (L+2) -PHASE2 (IF GROUP=2)
# (L+3) PHASE2
# -----
# (L+7) PHASE4
# (L+8) -PHASE5 (IF GROUP=5)
# (L+9) PHASE5
#
# CALLING SEQUENCE:
#
# EXAMPLE IS FOR PLACING A PHASE OF FIVE INTO GROUP THREE:
#
# 1) IF TBASE IS NOT TO BE SET:
# L-1 CA FIVE
# L TC NEWPHASE
# L+1 OCT 00003
#
# 2) IF TBASE IS TO BE SET:
# L-1 CS FIVE
# L TC NEWPHASE
# L+1 OCT 00003
#
# SUBROUTINES CALLED: NONE
#
# NORMAL EXIT MODE: AT L+2 OF CALLING SEQUENCE
#
# ALARM OR ABORT EXITS: NONE
#
# OUTPUT: PHASE TABLE AND TBASE TABLE UPDATED
#
# ERASABLE INITIALIZATION REQ'D: NONE
# Page 221
# DEBRIS: A,L,TEMPG
# *** WARNING *** THIS PROGRAM IS TO BE PLACED IN FIXED-FIXED AND UNSWITCHED ERASABLE.
BLOCK 02
SETLOC FFTAG1
BANK
COUNT* $$/PHASE
NEWPHASE INHINT
TS L # SAVE FOR FURTHER USE
NDX Q # OBTAIN THE GROUP NUMBER
CA 0
INCR Q # OBTAIN THE RETURN ADDRESS
DOUBLE # SAVE THE GROUP IN A FORM USED FOR
TS TEMPG # INDEXING
CCS L # SEE IF WE ARE TO SET TBASE
TCF +7 # NO, THE DELTA T WAS POSITIVE
TCF +6
NUFAZ+10 INCR A # SET TBASE AND STORE PHASE CORRECTLY
TS L
CS TIME1 # SET TBASE
NDX TEMPG
TS TBASE1 -2
CS L # NOW PUT THE PHASE IN THE RIGHT TABLE LOC
NDX TEMPG
DXCH -PHASE1 -2
RELINT
TC Q # NOW RETURN TO CALLER

355
RT8_OP_CODES.s Normal file
View File

@ -0,0 +1,355 @@
# Copyright: Public domain.
# Filename: RT8_OP_CODES.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 1508-1516
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-07 RSB Adapted from Colossus249/RT8_OP_CODES.agc
# and page images.
# 2009-05-07 RSB Oops! Left out the entire last page before.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 1508
BANK 22
SETLOC RTBCODES
BANK
EBANK= XNB
COUNT* $$/RTB
# LOAD TIME2, TIME1 INTO MPAC:
LOADTIME EXTEND
DCA TIME2
TCF SLOAD2
# CONVERT THE SINGLE PRECISION 2'S COMPLEMENT NUMBER ARRIVING IN MPAC (SCALED IN HALF-REVOLUTIONS) TO A
# DP 1'S COMPLEMENT NUMBER SCALED IN REVOLUTIONS.
CDULOGIC CCS MPAC
CAF ZERO
TCF +3
NOOP
CS HALF
TS MPAC +1
CAF ZERO
XCH MPAC
EXTEND
MP HALF
DAS MPAC
TCF DANZIG # MODE IS ALREADY AT DOUBLE-PRECISION
# READ THE PIPS INTO MPAC WITHOUT CHANGING THEM:
READPIPS INHINT
CA PIPAX
TS MPAC
CA PIPAY
TS MPAC +3
CA PIPAZ
RELINT
TS MPAC +5
CAF ZERO
TS MPAC +1
TS MPAC +4
TS MPAC +6
VECMODE TCF VMODE
# FORCE TP SIGN AGREEMENT IN MPAC:
SGNAGREE TC TPAGREE
# Page 1509
TCF DANZIG
# CONVERT THE DP 1'S COMPLEMENT ANGLE SCALED IN REVOLUTIONS TO A SINGLE PRECISION 2'S COMPLEMENT ANGLE
# SCALED IN HALF-REVOLUTIONS.
1STO2S TC 1TO2SUB
CAF ZERO
TS MPAC +1
TCF NEWMODE
# DO 1STO2S ON A VECTOR OF ANGLES:
V1STO2S TC 1TO2SUB # ANSWER ARRIVES IN A AND MPAC.
DXCH MPAC +5
DXCH MPAC
TC 1TO2SUB
TS MPAC +2
DXCH MPAC +3
DXCH MPAC
TC 1TO2SUB
TS MPAC +1
CA MPAC +5
TS MPAC
TPMODE CAF ONE # MODE IS TP.
TCF NEWMODE
# V1STO2S FOR 2 COMPONENT VECTOR. USED BY RR.
2V1STO2S TC 1TO2SUB
DXCH MPAC +3
DXCH MPAC
TC 1TO2SUB
TS L
CA MPAC +3
TCF SLOAD2
# SUBROUTINE TO DO DOUBLING AND 1'S TO 2'S CONVERSION:
1TO2SUB DXCH MPAC # FINAL MPAC +1 UNSPECIFIED.
DDOUBL
CCS A
AD ONE
TCF +2
COM # THIS WAS REVERSE OF MSU.
TS MPAC # AND SKIP ON OVERFLOW.
# Page 1510
TC Q
INDEX A # OVERFLOW UNCORRECT AND IN MSU.
CAF LIMITS
ADS MPAC
TC Q
# Page 1511
# SUBROUTINE TO INCREMENT CDUS
INCRCDUS CAF LOCTHETA
TS BUF # PLACE ADRES(THETA) IN BUF.
CAE MPAC # INCREMENT IN 1'S COMPL.
TC CDUINC
INCR BUF
CAE MPAC +3
TC CDUINC
INCR BUF
CAE MPAC +5
TC CDUINC
TCF VECMODE
LOCTHETA ADRES THETAD
# THE FOLLOWING ROUTINE INCREMENTS IN 2'S COMPLEMENT THE REGISTER WHOSE ADDRESS IS IN BUF BY THE 1'S COMPL.
# QUANTITY FOUND IN TEM2. THIS MAY BE USED TO INCRMENT DESIRED IMU AND OPTICS CDU ANGLES OR ANY OTHER 2'S COMPL.
# (+0 UNEQUAL TO -0) QUANTITY. MAY BE CALLED BY BANKCALL/SWCALL.
CDUINC TS TEM2 # 1'S COMPL. QUANT. ARRIVES IN ACC. STORE IT
INDEX BUF
CCS 0 # CHANGE 2'S COMPLE. ANGEL (IN BUF) INTO 1'S
AD ONE
TCF +4
AD ONE
AD ONE # OVEFLOW HERE IF 2'S COMPL. IS 180 DEG.
COM
AD TEM2 # SULT MOVES FROM 2ND TO 3D QUAD. (OR BACK)
CCS A # BACK TO 2'S COMPL.
AD ONE
TCF +2
COM
TS TEM2 # STORE 14-BIT QUANTITY WITH PRESENT SIGN
TCF +4
INDEX A # SIGN.
CAF LIMITS # FIX IT, BY ADDING IN 37777 OR 40000
AD TEM2
INDEX BUF
TS 0 # STORE NEW ANGLE IN 2'S COMPLEMENT.
TC Q
# Page 1512
# RTB TO TORQUE GYROS, EXCEPT FOR THE CALL TO IMUSTALL. ECADR OF COMMANDS ARRIVES IN X1.
PULSEIMU INDEX FIXLOC # ADDRESS OF GYRO COMMANDS SHOULD BE IN X1
CA X1
TC BANKCALL
CADR IMUPULSE
TCF DANZIG
# Page 1513
# EACH ROUTINE TAKES A 3X3 MATRIX STORED IN DOUBLE PRECISION IN A FIXED AREA OF ERASABLE MEMORY AND REPLACES IT
# WITH THE TRANSPOSE MATRIX. TRANSP1 USES LOCATIONS XNB+0,+1 THROUGH XNB+16D,+17D AND TRANSP2 USES LOCATIONS
# XNB1+0,+1 THROUGH XNB1+16D,+17D. EACH MATRIX IS STORED BY ROWS.
XNBEB ECADR XNB
XNB1EB ECADR XNB1
EBANK= XNB
TRANSP1 CAF XNBEB
TS EBANK
DXCH XNB +2
DXCH XNB +6
DXCH XNB +2
DXCH XNB +4
DXCH XNB +12D
DXCH XNB +4
DXCH XNB +10D
DXCH XNB +14D
DXCH XNB +10D
TCF DANZIG
EBANK= XNB1
TRANSP2 CAF XNB1EB
TS EBANK
DXCH XNB1 +2
DXCH XNB1 +6
DXCH XNB1 +2
DXCH XNB1 +4
DXCH XNB1 +12D
DXCH XNB1 +4
DXCH XNB1 +10D
DXCH XNB1 +14D
DXCH XNB1 +10D
TCF DANZIG
# Page 1514
# THE SUBROUTINE SIGNMPAC SETS C(MPAC, MPAC +1) TO SIGN(MPAC).
# FOR THIS, ONLY THE CONTENTS OF MPAC ARE EXAMINED. ALSO +0 YIELDS POSMAX AND -0 YIELDS NEGMAX.
#
# ENTRY MAY BE BY EITHER OF THE FOLLOWING:
# 1. LIMIT THE SIZE OF MPAC ON INTERPRETIVE OVERFLOW:
# ENTRY: BOVB
# SIGNMPAC
# 2. GENERATE IN MPAC THE SIGNUM FUNCTION OF MPAC:
# ENTRY: RTB
# SIGNMPAC
# IN EITHER CASE, RETURN IS TO TEH NEXT INTERPRETIVE INSTRUCTION IN THE CALLING SEQUENCE.
SIGNMPAC EXTEND
DCA DPOSMAX
DXCH MPAC
CCS A
DPMODE CAF ZERO # SETS MPAC +2 TO ZERO IN THE PROCESS
TCF SLOAD2 +2
TCF +1
EXTEND
DCS DPOSMAX
TCF SLOAD2
# RTB OP CODE NORMUNIT IS LIKE INTERPRETIVE INSTRUCTION UNIT, EXCEPT THAT IT CAN BE DEPENDED ON NOT TO BLOW
# UP WHEN THE VECTOR BEING UNITIZED IS VERY SAMLL -- IT WILL BLOW UP WHEN ALL COMPONENT ARE ZERO. IF NORMUNIT
# IS USED AND THE UPPER ORDER HALVES OF ALL COMPONENTS ARE ZERO, THE MAGNITUDE RETURNS IN 36D WILL BE TOO LARGE
# BY A FACTOR OF 2(13) AND THE SQURED MAGNITUDE RETURNED AT 34D WILL BE TOO BIG BY A FACTOR OF 2(26).
NORMUNX1 CAF ONE
TCF NORMUNIT +1
NORMUNIT CAF ZERO
AD FIXLOC
TS MPAC +2
TC BANKCALL # GET SIGN AGREEMENT IN ALL COMPONENTS
CADR VECAGREE
CCS MPAC
TCF NOSHIFT
TCF +2
TCF NOSHIFT
CCS MPAC +3
TCF NOSHIFT
TCF +2
TCF NOSHIFT
CCS MPAC +5
TCF NOSHIFT
TCF +2
TCF NOSHIFT
# Page 1515
CA MPAC +1 # SHIFT ALL COMPONENTS LEFT 13
EXTEND
MP BIT14
DAS MPAC # DAS GAINS A LITTLE ACCURACY
CA MPAC +4
EXTEND
MP BIT14
DAS MPAC +3
CA MPAC +6
EXTEND
MP BIT14
DAS MPAC +5
CAF THIRTEEN
INDEX MPAC +2
TS 37D
OFFTUNIT TC POSTJUMP
CADR UNIT +1 # SKIP THE "TC VECAGREE" DONE AT UNIT
NOSHIFT CAF ZERO
TCF OFFTUNIT -2
# RTB VECSGNAG ... FORCES SIGN AGREEMENT OF VECTOR IN MPAC.
VECSGNAG TC BANKCALL
CADR VECAGREE
TC DANZIG
# Page 1516
# MODULE CHANGE FOR NEW LUNAR GRAVITY MODEL
SETLOC MODCHG3
BANK
QUALITY1 BOF DLOAD
MOONFLAG
NBRANCH
URPV
DSQ GOTO
QUALITY2
SETLOC MODCHG2
BANK
QUALITY2 PDDL DSQ # SQUARE INTO 2D, B2
URPV +2 # Y COMPONENT, B1
DSU
DMP VXSC # 5(Y**2-X**2)UR
5/8 # CONSTANT, 5B3
URPV # VECTOR, RESULT MAXIMUM IS 5, SCALING
# HERE B6
VSL3 PDDL # STORE SCALED B3 IN 2D, 4D, 6D FOR XYZ
URPV # X COMPONENT, B1
SR1 DAD # 2 X X COMPONENT FOR B3 SCALING
2D # ADD TO VECTOR X COMPONENT OF ANSWER.
# SAME AS MULTIPLYING BY UNITX. MAX IS 7.
STODL 2D
URPV +2 # Y COMPONENT, B1
SR1 BDSU # 2 X Y COMPONENT FOR B3 SCALING
4D # SUBTRACT FROM VECTOR Y COMPONENT OF
# ANSWER, SAME AS MULTIPLYING BY UNITY.
# MAX IS 7.
STORE 4D # 2D HAS VECTOR, B3.
SLOAD VXSC # MULTIPLY COEFFICIENT TIMES VECTOR IN 2D
E3J22R2M
PDDL RVQ # J22 TERM X R**4 IN 2D, SCALED B61
COSPHI/2 # SAME AS URPV +4, Z COMPONENT
# *** END OF CHIEFTAN.028 ***

236
RTB_OP_CODES.s Normal file
View File

@ -0,0 +1,236 @@
# Copyright: Public domain.
# Filename: RTB_OP_CODES.agc
# Purpose: Part of the source code for Luminary 1A build 099.
# It is part of the source code for the Lunar Module's (LM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1397-1401
# Mod history: 2009-05-10 SN (Sergio Navarro). Started adapting
# from the Luminary131/ file of the same
# name, using Luminary099 page images.
#
# This source code has been transcribed or otherwise adapted from
# digitized images of a hardcopy from the MIT Museum. The digitization
# was performed by Paul Fjeld, and arranged for by Deborah Douglas of
# the Museum. Many thanks to both. The images (with suitable reduction
# in storage size and consequent reduction in image quality as well) are
# available online at www.ibiblio.org/apollo. If for some reason you
# find that the images are illegible, contact me at info@sandroid.org
# about getting access to the (much) higher-quality images which Paul
# actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 001 of AGC program LMY99 by NASA 2021112-61
# 16:27 JULY 14, 1969
# Page 1397
BANK 22
SETLOC RTBCODES
BANK
EBANK= XNB
COUNT* $$/RTB
# LOAD TIME2, TIME1 INTO MPAC:
LOADTIME EXTEND
DCA TIME2
TCF SLOAD2
# CONVERT THE SINGLE PRECISION 2'S COMPLEMENT NUMBER ARRIVING IN MPAC (SCALED IN HALF-REVOLUTIONS) TO A
# DP 1'S COMPLEMENT NUMBER SCALED IN REVOLUTIONS.
CDULOGIC CCS MPAC
CAF ZERO
TCF +3
NOOP
CS HALF
TS MPAC +1
CAF ZERO
XCH MPAC
EXTEND
MP HALF
DAS MPAC
TCF DANZIG # MODE IS ALREADY AT DOUBLE-PRECISION
# FORCE TP SIGN AGREEMENT IN MPAC:
SGNAGREE TC TPAGREE
TCF DANZIG
# CONVERT THE DP 1'S COMPLEMENT ANGLE SCALED IN REVOLUTIONS TO A SINGLE PRECISION 2'S COMPLEMENT ANGLE
# SCALED IN HALF-REVOLUTIONS.
1STO2S TC 1TO2SUB
CAF ZERO
TS MPAC +1
TCF NEWMODE
# DO 1STO2S ON A VECTOR OF ANGLES:
V1STO2S TC 1TO2SUB # ANSWER ARRIVES IN A AND MPAC.
DXCH MPAC +5
DXCH MPAC
TC 1TO2SUB
# Page 1398
TS MPAC +2
DXCH MPAC +3
DXCH MPAC
TC 1TO2SUB
TS MPAC +1
CA MPAC +5
TS MPAC
TPMODE CAF ONE # MODE IS TP.
TCF NEWMODE
# V1STO2S FOR 2 COMPONENT VECTOR. USED BY RR.
2V1STO2S TC 1TO2SUB
DXCH MPAC +3
DXCH MPAC
TC 1TO2SUB
TS L
CA MPAC +3
TCF SLOAD2
# SUBROUTINE TO DO DOUBLING AND 1'S TO 2'S CONVERSION:
1TO2SUB DXCH MPAC # FINAL MPAC +1 UNSPECIFIED.
DDOUBL
CCS A
AD ONE
TCF +2
COM # THIS WAS REVERSE OF MSU.
TS MPAC # AND SKIP ON OVERFLOW.
TC Q
INDEX A # OVERFLOW UNCORRECT AND IN MSU.
CAF LIMITS
ADS MPAC
TC Q
# THE FOLLOWING ROUTINE INCREMENTS IN 2S COMPLEMENT THE REGISTER WHOSE ADDRESS IS IN BUF BY THE 1S COMPL.
# QUANTITY FOUND IN TEM2. THIS MAY BE USED TO INCRMENT DESIRED IMU AND OPTICS CDU ANGLES OR ANY OTHER 2S COMPL.
# (+0 UNEQUAL TO -0) QUANTITY. MAY BE CALLED BY BANKCALL/SWCALL.
CDUINC TS TEM2 # 1S COMPL.QUANT. ARRIVES IN ACC. STORE IT
INDEX BUF
CCS 0 # CHANGE 2S COMPL. ANGLE(IN BUF)INTO 1S
AD ONE
TCF +4
AD ONE
# Page 1399
AD ONE # OVEFLOW HERE IF 2S COMPL. IS 180 DEG.
COM
AD TEM2 # SULT MOVES FROM 2ND TO 3D QUAD. (OR BACK)
CCS A # BACK TO 2S COMPL.
AD ONE
TCF +2
COM
TS TEM2 # STORE 14BIT QUANTITY WITH PRESENT SIGN
TCF +4
INDEX A # SIGN.
CAF LIMITS # FIX IT, BY ADDING IN 37777 OR 40000
AD TEM2
INDEX BUF
TS 0 # STORE NEW ANGLE IN 2S COMPLEMENT.
TC Q
# Page 1400
# RTB TO TORQUE GYROS, EXCEPT FOR THE CALL TO IMUSTALL. ECADR OF COMMANDS ARRIVES IN X1.
PULSEIMU INDEX FIXLOC # ADDRESS OF GYRO COMMANDS SHOULD BE IN X1
CA X1
TC BANKCALL
CADR IMUPULSE
TCF DANZIG
# Page 1401
# THE SUBROUTINE SIGNMPAC SETS C(MPAC, MPAC +1) TO SIGN(MPAC).
# FOR THIS, ONLY THE CONTENTS OF MPAC ARE EXAMINED. ALSO +0 YIELDS POSMAX AND -0 YIELDS NEGMAX.
#
# ENTRY MAY BE BY EITHER OF THE FOLLOWING:
# 1. LIMIT THE SIZE OF MPAC ON INTERPRETIVE OVERFLOW:
# ENTRY: BOVB
# SIGNMPAC
# 2. GENERATE IN MPAC THE SIGNUM FUNCTION OF MPAC:
# ENTRY: RTB
# SIGNMPAC
# IN EITHER CASE, RETURN IS TO TEH NEXT INTERPRETIVE INSTRUCTION IN THE CALLING SEQUENCE.
SIGNMPAC EXTEND
DCA DPOSMAX
DXCH MPAC
CCS A
DPMODE CAF ZERO # SETS MPAC +2 TO ZERO IN THE PROCESS
TCF SLOAD2 +2
TCF +1
EXTEND
DCS DPOSMAX
TCF SLOAD2
# RTB OP CODE NORMUNIT IS LIKE INTERPRETIVE INSTRUCTION UNIT, EXCEPT THAT IT CAN BE DEPENDED ON NOT TO BLOW
# UP WHEN THE VECTOR BEING UNITIZED IS VERY SMALL -- IT WILL BLOW UP WHEN ALL COMPONENT ARE ZERO. IF NORMUNIT
# IS USED AND THE UPPER ORDER HALVES OF ALL COMPONENTS ARE ZERO, THE MAGNITUDE RETURNED IN 36D WILL BE TOO LARGE
# BY A FACTOR OF 2(13) AND THE SQUARED MAGNITUDE RETURNED ATE 34D WILL BE TOO BIG BY A FACTOR OF 2(26).
NORMUNX1 CAF ONE
TCF NORMUNIT +1
NORMUNIT CAF ZERO
AD FIXLOC
TS MPAC +2
TC BANKCALL # GET SIGN AGREEMENT IN ALL COMPONENTS
CADR VECAGREE
CCS MPAC
TCF NOSHIFT
TCF +2
TCF NOSHIFT
CCS MPAC +3
TCF NOSHIFT
TCF +2
TCF NOSHIFT
CCS MPAC +5
TCF NOSHIFT
TCF +2
TCF NOSHIFT
# Page 1402
CA MPAC +1 # SHIFT ALL COMPONENTS LEFT 13
EXTEND
MP BIT14
DAS MPAC # DAS GAINS A LITTLE ACCURACY
CA MPAC +4
EXTEND
MP BIT14
DAS MPAC +3
CA MPAC +6
EXTEND
MP BIT14
DAS MPAC +5
CAF THIRTEEN
INDEX MPAC +2
TS 37D
OFFTUNIT TC POSTJUMP
CADR UNIT +1 # SKIP THE "TC VECAGREE" DONE AT UNIT
NOSHIFT CAF ZERO
TCF OFFTUNIT -2
# RTB VECSGNAG ... FORCES SIGN AGREEMENT OF VECTOR IN MPAC.
VECSGNAG TC BANKCALL
CADR VECAGREE
TC DANZIG
# *** END OF SKIPPER .087 ***

129
S-BAND_ANTENNA_FOR_CM.s Normal file
View File

@ -0,0 +1,129 @@
# Copyright: Public domain.
# Filename: S-BAND_ANTENNA_FOR_CM.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Jim Lawton <jim.lawton@gmail.com>.
# Website: www.ibiblio.org/apollo.
# Pages: 934-935
# Mod history: 2009-05-11 JVL Adapted from the Colossus249/ file
# of the same name, using Comanche055 page
# images.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 934
# S-BAND ANTENNA FOR CM
BANK 23
SETLOC SBAND
BANK
COUNT* $$/R05
EBANK= EMSALT
SBANDANT TC BANKCALL # V 64 E GETS US HERE
CADR R02BOTH # CHECK IF IMU IS ON AND ALIGNED
TC INTPRET
RTB CALL
LOADTIME # PICKUP CURRENT TIME SCALED B-28
CDUTRIG # COMPUTE SINES AND COSINES OF CDU ANGLES
STCALL TDEC1 # ADVANCE INTEGRATION TO TIME IN TDEC1
CSMCONIC # USING CONIC INTEGRATION
SLOAD BHIZ # ORIGIN OF REFERENCE INERTIAL SYSTEM IS
X2 # EARTH = 0, MOON = 2
EISOI
VLOAD
RATT
STORE RCM # MOVE RATT TO PREVENT WIPEOUT
DLOAD CALL # MOON, PUSH ON
TAT # GET ORIGINAL TIME
LUNPOS # COMPUTE POSITION VECTOR OF MOON
VAD VCOMP # R= -(REM+RCM) = NEG. OF S/C POS. VEC
RCM
GOTO
EISOI +2
EISOI VLOAD VCOMP # EARTH, R= -RCM
RATT
SETPD MXV # RCS TO STABLE MEMBER: B-1X B-29X B+1
2D # 2D
REFSMMAT # STABLE MEMBER. B-1X B-29X B+1= B-29
VSL1 PDDL # 8D
HI6ZEROS
STOVL YAWANG # ZERO OUT YAWANG, SET UP FOR SMNB
RCM # TRANSFORMATION. SM COORD. SCALED B-29
CALL
*SMNB*
STORE R # SAVE NAV. BASE COORDINATES
UNIT PDVL # 14D
R
VPROJ VSL2 # COMPUTE PROJECTION OF VECTOR INTO CM
HIUNITZ # XY-PLANE, R-(R.UZ)UZ
BVSU BOV # CLEAR OVERFLOW INDICATOR IF SET
R
COVCNV
COVCNV UNIT BOV # TEST OVERFLOW FOR INDICATION OF NULL
NOADJUST # VECTOR
PUSH DOT # 20D
# Page 935
HIUNITX # COMPUTE YAW ANGLE = ACOS (URP.UX)
SL1 ACOS # REVOLUTIONS SCALED B0
PDVL DOT # 22D YAWANG
URP
HIUNITY # COMPUTE FOLLOWING: URP.UY
SL1 BPL # POSITIVE
NOADJUST # YES, 0-180 DEGREES
DLOAD DSU # NO, 181-360 DEGREES 20D
DPPOSMAX # COMPUTE 2 PI MINUS YAW ANGLE
PUSH # 22D YAWANG
NOADJUST VLOAD DOT # COMPUTE PITCH ANGLE
UR # ACOS (UR.UZ) - PI/2
HIUNITZ
SL1 ACOS # REVOLUTIONS B0
DSU
HIDP1/4
STODL RHOSB
YAWANG
STORE GAMMASB # PATCH FOR CHECKOUT
EXIT
CA EXTVBACT # IS BIT 5 STILL ON
MASK BIT5
EXTEND
BZF ENDEXT # NO, WE HAVE BEEN ANSWERED
CAF V06N51 # DISPLAY ANGLES
TC BANKCALL
CADR GOMARKFR
TC B5OFF # TERMINATE
TC B5OFF
TC ENDOFJOB # RECYCLE
CAF BIT3 # IMMEDIATE RETURN
TC BLANKET # BLANK R3
CAF BIT1 # DELAY MINIMUM TIME TO ALLOW DISPLAY IN
TC BANKCALL
CADR DELAYJOB
TCF SBANDANT +2
V06N51 VN 0651
RCM EQUALS 2D
UR EQUALS 8D
URP EQUALS 14D
YAWANG EQUALS 20D
PITCHANG EQUALS 22D
R EQUALS RCM
SBANK= LOWSUPER

Some files were not shown because too many files have changed in this diff Show More