forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
P70-P71.s
434 lines (361 loc) · 7.67 KB
/
P70-P71.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
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
# 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 <[email protected]>.
# 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 [email protected]
# 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