forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ALARM_AND_ABORT.s
231 lines (184 loc) · 4.4 KB
/
ALARM_AND_ABORT.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
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