forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ERASABLE_ASSIGNMENTS.s
3785 lines (2976 loc) · 100 KB
/
ERASABLE_ASSIGNMENTS.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
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright: Public domain.
# Filename: ERASABLE_ASSIGNMENTS.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 Started adapting from the Colossus249/ file
# of the same name, using Comanche055 page
# images. Only through page 51 so far.
# 2009-05-07 RSB Through page 92 so far.
# 2009-05-07 RSB (Again!) First draft completed.
# 2009-05-20 RSB Fixed some bugs uncovered in trial assemblies:
# EMDOT, STATEXIT, VGDISP, DVPREV, POSTCDH,
# RETROFLG not defined correctly, changed the
# typing of labels 9X9LOC1 and 9X9LOC2,
# R32FLBIT -> R31FLBIT.
# 2009-05-21 RSB Corrected definition of DELBRTMP, which
# chained to quite a lot of off-by-one errors.
# Changed a +8 to a +8D.
#
# 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 37
# CONVENTIONS AND NOTATIONS UTILIZED FOR ERASABLE ASSIGNMENTS.
# EQUALS IS USED IN TWO WAYS. IT IS OFTEN USED TO CHAIN A GROUP
# OF ASSIGNMENTS SO THAT THE GROUP MAY BE MOVED WITH THE
# CHANGING OF ONLY ONE CARD. EXAMPLE:
#
# X EQUALS START
# Y EQUALS X +SIZE.X
# Z EQUALS Y +SIZE.Y
#
# (X, Y, AND Z ARE CONSECUTIVE AND BEGIN AT START.
# SIZE.X AND SIZE.Y ARE THE RESPECTIVE SIZES OF X AND Y.
# USUALLY NUMERIC, IE. 1, 2, 6, 18D, ETC.)
# EQUALS OFTEN IMPLIES THE SHARING OF REGISTERS (DIFFERENT NAMES
# AND DIFFERENT DATA). EXAMPLE:
#
# X EQUALS Y
# = MEANS THAT MULTIPLE NAMES HAVE BEEN GIVEN TO THE SAME DATA.
# (THIS IS LOGICAL EQUIVALENCE, NOT SHARING.) EXAMPLE:
#
# X = Y
# THE SIE AND UTILIZATION OF AN ERASABLE ARE OFTEN INCLUDED IN
# THE COMMENTS IN THE FOLLOWING FORM: M(SIZE)N.
#
# M REFERS TO THE MOBILITY OF THE ASSIGNMENT.
# B MEANS THAT THE SYMBOL IS REFERENCED BY BASIC
# INSTRUCTIONS AND THUS IS E-BANK SENSITIVE.
# I MEANS THAT THE SYMBOL IS REFERENCED ONLY BY
# INTERPRETIVE INSTRUCTIONS, AND IS THUS E-BANK
# INSENSITIVE AND MAY APPEAR IN ANY E-BANK.
#
# SIZE IS THE NUMBER OF REGISTERS INCLUDED BY THE SYMBOL.
#
# N INDICATES THE NATURE OF PERMANENCE OF THE CONTENTS.
# PL MEANS THAT THE CONTENTS ARE PAD LOADED.
# DSP MEANS THAT THE REGISTER IS USED FOR A DISPLAY.
# PRM MEANS THAT THE REGISTER IS PERMANENT. IE., IT
# IS USED DURING THE ENTIRE MISSION FOR ONE
# PURPOSE AND CANNOT BE SHARED.
# TMP MEANS THAT THE REGISTER IS USED TEMPORARILY OR
# IS A SCRATCH REGISTER FOR THE ROUTINE TO WHICH
# IT IS ASSIGNED. THAT IS, IT NEED NOT BE SET
# PRIOR TO INVOCATION OF THE ROUTINE NOR DOES IT
# CONTAIN USEFUL OUTPUT TO ANOTHER ROUTINE. THUS
# Page 38
# IT MAY BE SHARED WITHANY OTHER ROUTINE WHICH
# IS NOT ACTIVE IN PARALLEL
# IN MEANS INPUT TO THE ROUTINE AND IT IS PROBABLY
# TEMPORARY FOR A HIGHER-LEVEL ROUTINE/PROGRAM.
# OUT MEANS OUTPUT FROM THE ROUTINE, PROBABLY
# TEMPORARY FOR A HIGHER-LEVEL ROUTINE/PROGRAM.
# Page 39
# SPECIAL REGISTERS.
A EQUALS 0
L EQUALS 1 # L AND Q ARE BOTH CHANNELS AND REGISTERS
Q EQUALS 2
EBANK EQUALS 3
FBANK EQUALS 4
Z EQUALS 5 # ADJACENT TO FBANK AND BBANK FOR DXCH Z
BBANK EQUALS 6 # (DTCB) AND DXCH FBANK (DTCF).
# REGISTER 7 IS A ZERO-SOURCE, USED BY ZL.
ARUPT EQUALS 10 # INTERRUPT STORAGE
LRUPT EQUALS 11
QRUPT EQUALS 12
SAMPTIME EQUALS 13 # SAMPLED TIME 1 & 2.
ZRUPT EQUALS 15 # (13 AND 14 ARE SPARES.)
BANKRUPT EQUALS 16 # USUALLY HOLDS FBANK OR BBANK.
BRUPT EQUALS 17 # RESUME ADDRESS AS WELL.
CYR EQUALS 20
SR EQUALS 21
CYL EQUALS 22
EDOP EQUALS 23 # EDITS INTERPRETIVE OPERATION CODE PAIRS.
TIME2 EQUALS 24
TIME1 EQUALS 25
TIME3 EQUALS 26
TIME4 EQUALS 27
TIME5 EQUALS 30
TIME6 EQUALS 31
CDUX EQUALS 32
CDUY EQUALS 33
CDUZ EQUALS 34
CDUT EQUALS 35 # OPTICS TRUNNION CDU (WAS OPTY).
OPTY = CDUT
CDUS EQUALS 36 # OPTICS SHAFT CDU (WAS OPTX).
OPTX = CDUS
PIPAX EQUALS 37
PIPAY EQUALS 40
PIPAZ EQUALS 41
BMAGX EQUALS 42
BMAGY EQUALS 43
BMAGZ EQUALS 44
INLINK EQUALS 45
RNRAD EQUALS 46
GYROCTR EQUALS 47
GYROCMD EQUALS 47
CDUXCMD EQUALS 50
CDUYCMD EQUALS 51
# Page 40
CDUZCMD EQUALS 52
CDUTCMD EQUALS 53 # OPTICS TRUNNION COMMAND (WAS OPTYCMD)
OPTYCMD = CDUTCMD
TVCYAW EQUALS CDUTCMD # SPS YAW COMMAND IN TVC MODE
CDUSCMD EQUALS 54 # OPTICS SHAFT COMMAND (WAS OPTXCMD).
TVCPITCH EQUALS CDUSCMD # SPS PITCH COMMAND IN TVC MODE
OPTXCMD = CDUSCMD
EMSD EQUALS 55
THRUST EQUALS 55
LEMONM EQUALS 56
LOCALARM EQUALS 57
BANKALRM EQUALS 60
# INTERPRETIVE REGISTERS ADDRESSED RELATIVE TO VAC AREA.
LVSQUARE EQUALS 34D # SQUARE OF VECTOR INPUT TO ABVAL AND UNIT
LV EQUALS 36D # LENGTH OF VECTOR INPUT TO UNIT.
X1 EQUALS 38D # INTERPRETIVE SPECIAL REGISTER RELATIVE
X2 EQUALS 39D # TO THE WORK AREA.
S1 EQUALS 40D
S2 EQUALS 41D
QPRET EQUALS 42D
# Page 41
# INPUT/OUTPUT CHANNELS
# *** CHANNEL ZERO IS TO BE USED IN AN INDEXED OPERATION ONLY. ***
LCHAN EQUALS L
QCHAN EQUALS Q
HISCALAR EQUALS 3
LOSCALAR EQUALS 4
PYJETS EQUALS 5
ROLLJETS EQUALS 6
SUPERBNK EQUALS 7
OUT0 EQUALS 10
DSALMOUT EQUALS 11
CHAN12 EQUALS 12
CHAN13 EQUALS 13
CHAN14 EQUALS 14
MNKEYIN EQUALS 15
NAVKEYIN EQUALS 16
CHAN30 EQUALS 30
CHAN31 EQUALS 31
CHAN32 EQUALS 32
CHAN33 EQUALS 33
DNTM1 EQUALS 34
DNTM2 EQUALS 35
# END OF CHANNEL ASSIGNMENTS
# Page 42
# FLAGWORDS
#
# FLAGWRD0 STATE +0 (000-014)
# FLAGWRD1 STATE +1 (015-029)
# FLAGWRD2 STATE +2 (030-044)
# FLAGWRD3 STATE +3 (045-059)
# FLAGWRD4 STATE +4 (060-074)
# FLAGWRD5 STATE +5 (075-089)
# FLAGWRD6 STATE +6 (090-104)
# FLAGWRD7 STATE +7 (105-119)
# FLAGWRD8 STATE +8D (120-134)
# FLAGWRD9 STATE +9D (135-149)
# SORTED LIST OF
# INTERPRETIVE SWITCH BIT ASSIGNMENTS
# INTERPRETIVE SWITCH BIT ASSIGNMENTS
#
# FLAGWORD DEC NUM BIT & FLAG EQUIVALENT FLAGWORDS
#
# 22DSPFLG 032D BIT 13 FLAG 2
# 360SW 134D BIT 1 FLAG 8
# 3AXISFLG 084D BIT 6 FLAG 5
# ADVTRK 125D BIT 10 FLAG 8
# AMOONFLG 13D BIT 2 FLAG 0
# APSESW 130D BIT 5 FLAG 8
# ASTNFLAG 108D BIT 12 FLAG 7
# ATTCHFLG 118D BIT 2 FLAG 7
# AVEGFLAG 029D BIT 1 FLAG 1
# AVEMIDSW 149D BIT 1 FLAG 9
# AVFLAG 040D BIT 5 FLAG 2
# CALCMAN2 043D BIT 2 FLAG 2
# CMDAPARM 093D BIT 12 FLAG 6
# CMOONFLG 123D BIT 12 FLAG 8
# CM/DSTBY 103D BIT 2 FLAG 6
# COGAFLAG 131D BIT 4 FLAG 8
# COMPUTER 082D BIT 8 FLAG 5
# CPHIFLAG 000D BIT 15 FLAG 0
# CULTFLAG 053D BIT 7 FLAG 3
# D6OR9FLG 058D BIT 2 FLAG 3
# DAPBIT1 090D BIT 15 FLAG 6
# DAPBIT2 091D BIT 14 FLAG 6
# DIM0FLAG 059D BIT 1 FLAG 3
# DMENFLAG 081D BIT 9 FLAG 5
# DRIFTFLG 030D BIT 15 FLAG 2
# DSKYFLAG 075D BIT 15 FLAG 5
# EGSW 097D BIT 8 FLAG 6 KNOTNFLG R57FLAG
# Page 43
# ENG1FLAG 018D BIT 12 FLAG 1
# ENG2FLAG 019D BIT 11 FLAG 1
# ENGONFLG 083D BIT 7 FLAG 5
# ERADFLAG 017D BIT 13 FLAG 1
# ETPIFLAG 038D BIT 7 FLAG 2 FIRSTFLG OPTNSW
# F2RTE 010D BIT 5 FLAG 0
# FINALFLG 039D BIT 6 FLAG 2
# FIRSTFLG 038D BIT 7 FLAG 2 ETPIFLAG OPTNSW
# FREEFLAG 012D BIT 3 FLAG 0
# GAMDIFSW 094D BIT 11 FLAG 6
# GLOKFAIL 046D BIT 14 FLAG 3
# GONEBY 112D BIT 8 FLAG 7
# GONEPAST 095D BIT 10 FLAG 6
# GRRBKFLG 085D BIT 5 FLAG 5
# GUESSW 028D BIT 2 FLAG 1
# GYMDIFSW 104D BIT 1 FLAG 6
# .05GSW 102D BIT 3 FLAG 6
# HIND 099D BIT 6 FLAG 6
# IDLEFAIL 024D BIT 6 FLAG 1
# IDLEFLAG 113D BIT 7 FLAG 7
# IGNFLAG 107D BIT 13 FLAG 7
# IMPULSW 036D BIT 9 FLAG 2
# IMUSE 007D BIT 8 FLAG 0
# INCORFLG 079D BIT 11 FLAG 5
# INFINFLG 128D BIT 7 FLAG 8
# INRLSW 100D BIT 5 FLAG 6
# INTFLAG 151D BIT 14 FLAG 10
# INTYPFLG 056D BIT 4 FLAG 3
# ITSWICH 106D BIT 14 FLAG 7
# KFLAG 014D BIT 1 FLAG 0
# KNOWNFLG 097D BIT 8 FLAG 6 EGSW R57FLAG
# LATSW 101D BIT 4 FLAG 6
# LMOONFLG 124D BIT 11 FLAG 8
# LUNAFLAG 048D BIT 12 FLAG 3
# MAXDBFLG 138D BIT 12 FLAG 9
# MGLVFLAG 088D BIT 2 FLAG 5
# MID1FLAG 147D BIT 3 FLAG 9
# MIDAVFLG 148D BIT 2 FLAG 9
# MIDFLAG 002D BIT 13 FLAG 0
# MKOVFLAG 072D BIT 3 FLAG 4
# MOONFLAG 003D BIT 12 FLAG 0
# MRKIDFLG 060D BIT 15 FLAG 4
# MRKNVFLG 066D BIT 9 FLAG 4
# MRUPTFLG 070D BIT 5 FLAG 4
# MWAITFLG 064D BIT 11 FLAG 4
# N22ORN17 144D BIT 6 FLAG 9
# NEEDLFLG 006D BIT 9 FLAG 0
# NEWIFLG 122D BIT 13 FLAG 8
# NJETSFLG 015D BIT 15 FLAG 1
# NODOFLAG 044D BIT 1 FLAG 2
# Page 44
# NODOP01 018D BIT 12 FLAG 1
# NORFHOR 004D BIT 11 FLAG 0
# NORMSW 110D BIT 10 FLAG 7
# NOSWITCH 098D BIT 7 FLAG 6
# NRMIDFLG 062D BIT 13 FLAG 4
# NRMNVFLG 067D BIT 8 FLAG 4
# NRUPTFLG 071D BIT 4 FLAG 4
# NWAITFLG 065D BIT 10 FLAG 4
# OPTNSW 038D BIT 7 FLAG 2 ETPIFLAG FIRSTFLG
# ORBWFLAG 054D BIT 6 FLAG 3
# ORDERSW 129D BIT 6 FLAG 8
# P21FLAG 033D BIT 12 FLAG 2
# P22MKFLG 049D BIT 11 FLAG 3
# P39/79SW 126D BIT 9 FLAG 8
# PDSPFLAG 063D BIT 12 FLAG 4
# PFRATFLG 041D BIT 4 FLAG 2
# PINBRFLG 069D BIT 6 FLAG 4
# PRECIFLG 052D BIT 8 FLAG 3
# PRFTRKAT 060D BIT 10 FLAG 5
# PRIODFLG 061D BIT 14 FLAG 4
# PRONVFLG 068D BIT 7 FLAG 4
# QUITFLAG 145D BIT 5 FLAG 9
# R21MARK 031D BIT 14 FLAG 2
# R22CAFLG 143D BIT 7 FLAG 9
# R23FLG 021D BIT 9 FLAG 1
# R31FLAG 146D BIT 4 FLAG 9
# R53FLAG 009D BIT 6 FLAG 0
# R57FLAG 097D BIT 8 FLAG 6 KNOWNFLG EGSW
# R60FLAG 086D BIT 4 FLAG 5
# REFSMFLG 047D BIT 13 FLAG 3
# REINTFLG 158D BIT 7 FLAG 10
# RELVELSW 096D BIT 9 FLAG 6
# RENDWFLG 089D BIT 1 FLAG 5
# RNDVZFLG 008D BIT 7 FLAG 0
# RPQFLAG 120D BIT 15 FLAG 6
# RVSW 111D BIT 9 FLAG 7
# SAVECFLG 140D BIT 10 FLAG 9
# SKIPVHF 035D BIT 10 FLAG 2
# SLOPESW 027D BIT 3 FLAG 1
# SOLNSW 087D BIT 3 FLAG 5
# SOURCFLG 142D BIT 8 FLAG 9
# STATEFLG 055D BIT 5 FLAG 3
# STEERSW 034D BIT 11 FLAG 2
# STIKFLAG 016D BIT 14 FLAG 1
# STRULLSW 092D BIT 13 FLAG 6
# SURFFLAG 127D BIT 8 FLAG 8
# SWTOVER 135D BIT 15 FLAG 9
# TARG1FLG 020D BIT 10 FLAG 1
# Page 45
# TARG2FLG 021D BIT 9 FLAG 1
# TERMIFLG 105D BIT 15 FLAG 7
# TFFSW 119D BIT 1 FLAG 7
# TIMRFLAG 109D BIT 11 FLAG 7
# TRACKFLG 025D BIT 5 FLAG 1
# TRM03FLG 026D BIT 4 FLAG 1
# TRUNFLAG 011D BIT 4 FLAG 0
# UPDATFLG 023D BIT 7 FLAG 1
# UPLOCKFL 116D BIT 4 FLAG 7
# V37FLAG 114D BIT 6 FLAG 7
# V59FLAG 078D BIT 12 FLAG 5
# V67FLAG 136D BIT 14 FLAG 9
# V82EMFLG 137D BIT 13 FLAG 9
# V94FLAG 139D BIT 11 FLAG 9
# V96ONFLG 132D BIT 3 FLAG 8
# VEHUPFLG 022D BIT 8 FLAG 1
# VERIFLAG 117D BIT 3 FLAG 7
# VFLAG 050D BIT 10 FLAG 3
# VHFRFLAG 141D BIT 9 FLAG 9
# VINTFLAG 057D BIT 3 FLAG 3
# XDELVFLG 037D BIT 8 FLAG 2
# XDSPFLAG 074D BIT 1 FLAG 4
# Page 46
# INTERPRETIVE SWITCH BIT ASSIGNMENTS
FLAGWRD0 = STATE +0 # (000-014)
# (SET) (RESET)
# BIT 15 FLAG 0
CPHIFLAG = 000D # OUTPUT OF CALCGA IS OUTPUT OF CALCGA IS
# CPHIX THETAD
CPHIBIT = BIT15
# BIT 14 FLAG 0
JSWITCH = 001D # INTEGRATION OF W INTEGRATION OF STATE
# MATRIX VECTOR
JSWCHBIT = BIT14
# BIT 13 FLAG 0
MIDFLAG = 002D # INTEGRATION WITH INTEGRATION WITHOUT
# SOLAR PERTURBATIONS SOLAR PERTURBATIONS
MIDFLBIT = BIT13
# BIT 12 FLAG 0
MOONFLAG = 003D # MOON IS SPHERE OF EARTH IS SPHERE OF
# INFLUENCE INFLUENCE
MOONBIT = BIT12
# BIT 11 FLAG 0
NORFHOR = 004D # FAR HORIZON NEAR HORIZON
NORFBIT = BIT11
# BIT 10 FLAG 0
ZMEASURE = 005D # MEASUREMENT PLANET MEASUREMENT PLANET
# AND PRIMARY PLANET AND PRIMARY PLANET
# DIFFERENT SAME
ZMEASBIT = BIT10
# BIT 9 FLAG 0
NEEDLFLG = 006D # TOTAL ATTITUDE A/P FOLLOWING ERROR
# ERROR DISPLAYED DISPLAYED
NEEDLBIT = BIT9
# BIT 8 FLAG 0
IMUSE = 007D # IMU IN USE IMU NOT IN USE
# Page 47
IMUSEBIT = BIT8
# BIT 7 FLAG 0
RNDVZFLG = 008D # P20 RUNNING P20 NOT RUNNING
RNDVZBIT = BIT7
# BIT 6 FLAG 0
R53FLAG = 009D # V51 INITIATED V51 NOT INITIATED
R53FLBIT = BIT8
# BIT 5 FLAG 0
F2RTE = 010D # IN TIME CRITICAL NOT IN TIME CRITICAL
# MODE MODE
F2RTEBIT = BIT5
# BIT 4 FLAG 0
TRUNFLAG = 011D # DRIVING OF TRUNNION DRIVING OF TRUNNION
# ALLOWED NOT ALLOWED
TRUNBIT = BIT4
# BIT 3 FLAG 0
FREEFLAG = 012D # (TEMPORARY FLAG USED IN MANY ROUTINES)
FREEFBIT = BIT3
# BIT 2 FLAG 0
AMOONFLG = 13D # STATE VECTOR IN STATE VECTOR IN
AMOONBIT = BIT2 # LUNAR SPHERE AT EARTH SPHERE AT
# MIDTOAVE MIDTOAVE
# BIT 1 FLAG 0
KFLAG = 014D # SEARCH SECTOR MORE SEARCH SECTOR LESS
# THAN 180 DEGREES THAN 180 DEGREES
KBIT = BIT1
FLAGWRD1 = STATE +1 # (015-029)
# (SET) (RESET)
# BIT 15 FLAG 1
NJETSFLG = 015D # TWO JET RCS BURN FOUR JET RCS BURN
NJETSBIT = BIT15
# Page 48
# BIT 14 FLAG 1
STIKFLAG = 016D # RHC CONTROL CMC CONTROL
STIKBIT = BIT14
# BIT 13 FLAG 1
ERADFLAG = 017D # EARTH, COMPUTE EARTH, USED FIXED
# FISCHER ELLIPSOID RADIUS
# RADIUS
# MOON, USE FIXED MOON, USE RLS FOR
# RADIUS LUNAR RADIUS
ERADFBIT = BIT13
# BIT 12 FLAG 1
NODOP01 = 018D # P01 NOT ALLOWED P01 ALLOWD
NOP01BIT = BIT12
# BIT 11 FLAG 1
ENG2FLAG = 019D # RCS BURN SPS BURN
ENG2BIT = BIT11
# BIT 10 FLAG 1
TARG1FLG = 020D # SIGHTING LEM NOT SIGHTING LEM
TARG1BIT = BIT10
# BIT 9 FLAG 1
TARG2FLG = 021D # SIGHTING LANDMARK SIGHTING STAR
TARG2BIT = BIT9
# BIT 9 FLAG 1
R23FLG = 021D # R23 MARKING
R23BIT = BIT9
# BIT 8 FLAG 1
VEHUPFLG = 022D # CSM STATE VECTOR LEM STATE VECTOR
# BEING UPDATED BEING UPDATED
VEHUPBIT = BIT8
# BIT 7 FLAG 1
UPDATFLG = 023D # UPDATING BY MARKS UPDATING BY MARKS
# ALLOWED NOT ALLOWED
# Page 49
UPDATBIT = BIT7
# BIT 6 FLAG 1
IDLEFAIL = 024D # INHIBIT R41 ENABLE R41 (ENGFAIL)
IDLEBIT = BIT6
# BIT 5 FLAG 1
TRACKFLG = 025D # TRACKING ALLOWED TRACKING NOT ALLOWED
TRACKBIT = BIT5
# BIT 4 FLAG 1
TRM03FLG = 026D # REQUEST TO NO REQUEST TO
# TERMINATE P03 HAS TERMINATE P03 HAS
# BEEN ENTERED BEEN ENTERED
TRM03BIT = BIT4
# BIT 3 FLAG 1
SLOPESW = 027D # ITERATE WITH BIAS ITERATE WITH REGULA
# METHOD IN ITERATOR FALSI METHOD IN
# ITERATOR
SLOPEBIT = BIT3
# BIT 2 FLAG 1
GUESSW = 028D # NO STARTING VALUE STARTING VALUE FOR
# FOR ITERATION ITERATION EXISTS
GUESSBIT = BIT2
# BIT 1 FLAG 1
AVEGFLAG = 029D # AVERAGEG (SERVICER) AVERAGEG (SERVICER)
# TO CONTINUE TO CEASE
AVEGBIT = BIT1
FLAGWRD2 = STATE +2 # (030-044)
# (SET) (RESET)
# BIT 15 FLAG 2
DRIFTFLG = 030D # T3RUPT CALLS GYRO T3RUPT DOES NO GYRO
# COMPENSATION COMPENSATION
DRFTBIT = BIT15
# Page 50
# BIT 14 FLAG 2
R21MARK = 031D # OPTION ONE FOR OPTION TWO FOR
# MARKRUPT MARKRUPT
R21BIT = BIT14
# BIT 13 FLAG 2
22DSPFLG = 032D # DISPLAY DR,DV DO NOT DISPLAY DR,DV
22DSPBIT = BIT13
# BIT 12 FLAG 2
P21FLAG = 033D # SUCCEEDING PASS 1ST PASS THRU P21,
# THRU P21, USE BASE CALCULATE BASE
P21BIT = BIT12 # VECTOR FOR CALC. VECTOR
STEERSW = 034D # STEERING TO BE DONE STEERING OMITTED
STEERBIT = BIT11
# BIT 10 FLAG 2
SKIPVHF = 035D # DISREGARD RADAR RADAR READ TO
# READ BECAUSE OF PROCEED NORMALLY
SKIPVBIT = BIT10 # SFTWRE OR HDWRE
# RESTART
# BIT 9 FLAG 2
IMPULSW = 036D # MINIMUM IMPULSE STEERING BURN (NO
# BURN (CUTOFF TIME CUTOFF TIME YET
# SPECIFIED) AVAILABLE)
IMPULBIT = BIT9
# BIT 8 FLAG 2
XDELVFLG = 037D # EXTERNAL DELTAV VG LAMBERT (AIMPOINT)
# COMPUTATION VG COMPUTATION
XDELVBIT = BIT8
# BIT 7 FLAG 2
ETPIFLAG = 038D # ELEVATION ANGLE TPI TIME SUPPLIED
# SUPPLIED FOR P34,74 FOR P34,74
# BIT 7 FLAG 2
FIRSTFLG = ETPIFLAG # FIRST PASS SUCCEEDING PASS THRU
# THRU S40.9 S40.9
FIRSTBIT = BIT7
# BIT 7 FLAG 2
# Page 51
OPTNSW = ETPIFLAG # SOI PHASE P38/P78 SOR PHASE OF P38/P78
FINALBIT = BIT6
# BIT 6 FLAG 2
FINALFLG = 039D # LAST PASS THROUGH INTERIM PASS THROUGH
# RENDEZVOUS PROGRAM RENDEZVOUS PROGRAM
# COMPUTATIONS COMPUTATIONS
AVFLBIT = BIT5
# BIT 5 FLAG 2
AVFLAG = 040D # LEM IS ACTIVE CSM IS ACTIVE
# VEHICLE VEHICLE
# BIT 4 FLAG 2
PFRATFLG = 041D # PREFERRED ATTITUDE PREFERRED ATTITUDE
# COMPUTED NOT COMPUTED
PFRATBIT = BIT4
# BIT 3 FLAG 2
= 042D
# BIT 2 FLAG 2
CALCMAN2 = 043D # PERFORM MANEUVER BYPASS STARTING
# STARTING PROCEDURE PROCEDURE
CALC2BIT = BIT2
# BIT 1 FLAG 2
NODOFLAG = 044D # V37 NOT PERMITTED V37 PERMITTED
NODOBIT = BIT1
FLAGWRD3 = STATE +3 # (045-059)
# (SET) (RESET)
# BIT 15 FLAG 3
= 045D
# BIT 14 FLAG 3
GLOKFAIL = 046D # GIMBAL LOCK HAS NOT IN GIMBAL LOCK
# OCCURRED
GLOKFBIT = BIT14
# Page 52
# BIT 13 FLAG 3
REFSMFLG = 047D # REFSMMAT GOOD REFSMMAT NO GOOD
REFSMBIT = BIT13
# BIT 12 FLAG 3
LUNAFLAG = 048D # LUNAR LAT-LONG EARTH LAT-LONG
LUNABIT = BIT12
# BIT 11 FLAG 3
P22MKFLG = 049D # P22 DOWNLINKED MARK P22 DOWNLINK MARK
# DATA WAS JUST TAKEN DATA NOT JUST TAKEN
P22MKBIT = BIT11
# BIT 10 FLAG 3
VFLAG = 050D # LESS THAN TWO STARS TWO STARS IN FIELD
# IN FIELD OF VIEW OF VIEW
VFLAGBIT = BIT10
# BIT 9 FLAG 3
= 051D
# BIT 8 FLAG 3
PRECIFLG = 052D # CSMPREC OR LEMPREC INTEGRV
# OR INTEGRVS CALLED CALLED
PRECIBIT = BIT8
# BIT 7 FLAG 3
CULTFLAG = 053D # STAR OCCULTED STAR NOT OCCULTED
CULTBIT = BIT7
# BIT 6 FLAG 3
ORBWFLAG = 054D # W MATRIX VALID FOR W MATRIX INVALID FOR
# ORBITAL NAVIGATION ORBITAL NAVIGATION
ORBWFBIT = BIT6
# BIT 5 FLAG 3
STATEFLG = 055D # PERMANENT STATE PERMANENT STATE
# VECTOR UPDATED VECTOR NOT UPDATED
STATEBIT = BIT5
# BIT 4 FLAG 3
INTYPFLG = 056D # CONIC INTEGRATION ENCKE INTEGRATION
# Page 53
INTYBIT = BIT4
# BIT 3 FLAG 3
VINTFLAG = 057D # CSM STATE VECTOR LEM STATE VECTOR
# BEING INTEGRATED BEING INTEGRATED
VINTFBIT = BIT3
# BIT 2 FLAG 3
D6OR9FLG = 058D # DIMENSION OF W IS 9 DIMENSION OF W IS 6
# FOR INTEGRATION FOR INTEGRATION
D6OR9BIT = BIT2
# BIT 1 FLAG 3
DIM0FLAG = 059D # W MATRIX IS TO BE W MATRIX IS NOT TO
# USED BE USED
FLAGWRD4 = STATE +4 # (060-074)
# (SET) (RESET)
DIM0BIT = BIT1
# BIT 15 FLAG 4
MRKIDFLG = 060D # MARK DISPLAY IN NO MARK DISPLAY IN
# ENDIDLE ENDIDLE
MRKIDBIT = BIT15
# BIT 14 FLAG 4
PRIODFLG = 061D # PRIORITY DISPLAY IN NO PRIORITY DISPLAY
# ENDIDLE IN ENDIDLE
PRIODBIT = BIT14
# BIT 13 FLAG 4
NRMIDFLG = 062D # NORMAL DISPLAY IN NO NORMAL DISPLAY
# ENDIDLE IN ENDIDLE
NRMIDBIT = BIT13
# BIT 12 FLAG 4
PDSPFLAG = 063D # CAN'T INTERRUPT SEE M. HAMILTON
# PRIORITY DISPLAY
PDSPFBIT = BIT12
# BIT 11 FLAG 4
MWAITFLG = 064D # HIGHER PRIORITY NO HIGHER PRIORITY
# Page 54
# DISPLAY OPERATING DISPLAY OPERATING
# WHEN MARK DISPLAY WHEN MARK DISPLAY
# INITIATED INITIATED
MWAITBIT = BIT11
# BIT 10 FLAG 4
NWAITFLG = 065D # HIGHER PRIORITY NO HIGHER PRIORITY
# DISPLAY OPERATING DISPLAY OPERATING
# WHEN NORMAL WHEN NORMAL DISPLAY
# DISPLAY INITIATED INITIATED
NWAITBIT = BIT10
# BIT 9 FLAG 4
MRKNVFLG = 066D # ASTRONAUT USING ASTRONAUT NOT USING
# KEYBOARD WHEN MARK KEYBOARD WHEN MARK
# DISPLAY INITIATED DISPLAY INITIATED
MRKNVBIT = BIT9
# BIT 8 FLAG 4
NRMNVFLG = 067D # ASTRONAUT USING ASTRONAUT NOT USING
# KEYBOARD WHEN KEYBOARD WHEN
# NORMAL DISPLAY NORMAL DISPLAY
# INITIATED INITIATED
NRMNVBIT = BIT8
# BIT 7 FLAG 4
PRONVFLG = 068D # ASTRONAUT USING ASTRONAUT NOT USING
# KEYBOARD WHEN KEYBOARD WHEN
# PRIORITY DISPLAY PRIORITY DISPLAY
# INITIATED INITIATED
PRONVBIT = BIT7
# BIT 6 FLAG 4
PINBRFLG = 069D # ASTRONAUT HAS ASTRONAUT HAS NOT
# INTERFERED WITH INTERFERED WITH
# EXISTING DISPLAY EXISTING DISPLAY
PINBRBIT = BIT6
# BIT 5 FLAG 4
MRUPTFLG = 070D # MARK DISPLAY MARK DISPLAY NOT
# INTERRUPTED BY INTERRUPTED BY
# PRIORITY DISPLAY PRIORITY DISPLAY
MRUPTBIT = BIT5
# Page 55
# BIT 4 FLAG 4
NRUPTFLG = 071D # NORMAL DISPLAY NORMAL DISPLAY NOT
# INTERRUPTED BY INTERRUPTED BY
# PRIORITY OR MARK PRIORITY OR MARK
# DISPLAY DISPLAY
NRUPTBIT = BIT4
# BIT 3 FLAG 4
MKOVFLAG = 072D # MARK DISPLAY OVER NO MARK DISPLAY OVER
# NORMAL NORMAL
MKOVBIT = BIT3
# BIT 2 FLAG 4 # DISPLAY BIT
= 073D # CLEARED AT INTERVALS
# BIT 1 FLAG 4
XDSPFLAG = 074D # MARK DISPLAY NOT TO NO SPECIAL MARK
# BE INTERRUPTED INFORMATION
XDSPBIT = BIT1
FLAGWRD5 = STATE +5 # (075-099)
# (SET) (RESET)
# BIT 15 FLAG 5
DSKYFLAG = 075D # DISPLAYS SENT TO NO DISPLAYS TO DSKY
# DSKY
DSKYBIT = BIT15
# BIT 14 FLAG 5
RETROFLG = 076D # P37 PREMANEUVER ORBIT NOT RETROGRADE
RETROBIT = BIT14 # ORBIT IS RETROGRADE
# BIT 13 FLAG 5
SLOWFLG = 077D # P37 TRANSEARTH SLOW DOWN IS NOT
SLOWBIT = BIT13 # COAST SLOW DOWN DESIRED
# IS DESIRED
# BIT 12 FLAG 5
V59FLAG = 078D # CALIBRATING FOR NORMAL MARKING FOR
# P23 P23
V59FLBIT = BIT12
# BIT 11 FLAG 5
# Page 56
INCORFLG = 079D # FIRST INCORPORATION SECOND INCORPORATION
INCORBIT = BIT11
# BIT 10 FLAG 5
RNGSCFLG = 080D # ANOTHER TAG FOR PRFTRKAT
# BIT 10 FLAG 5
PRFTRKAT = RNGSCFLG # PREF TRACK ATT +K AXIS TRACK ATT
PRFTRBIT = BIT10
# BIT 9 FLAG 5
DMENFLG = 081D # DIMENSION OF W IS 9 DIMENSION OF W IS 6
# FOR INCORPORATION FOR INCORPORATION
DMENFBIT = BIT9
# BIT 8 FLAG 5
COMPUTER = 082D # COMPUTER IS CMC COMPUTER IS LGC
COMPTBIT = BIT8
# BIT 7 FLAG 5
ENGONFLG = 083D # ENGINE TURNED ON ENGINE TURNED OFF
ENGONBIT = BIT7
# BIT 6 FLAG 5
3AXISFLG = 084D # MANEUVER SPECIFIED MANEUVER SPECIFIED
# BY THREE AXES BY ONE AXIS
3AXISBIT = BIT6
# BIT 5 FLAG 5
GRRBKFLG = 085D # BACKUP GRR RECEIVED BACKUP GRR NOT
# RECEIVED
GRRBKBIT = BIT5
# BIT 4 FLAG 5
R60FLAG = 086D # R61 MUST USE R60 NORMAL R61
R60FLBIT = BIT4
# BIT 3 FLAG 5
SOLNSW = 087D # LAMBERT DOES NOT LAMBERT CONVERGES OR
# Page 57
# CONVERGE, OR TIME- TIME-RADIUS NON
# RADIUS NEARLY CIRC. CIRCULAR.
SOLNSBIT = BIT3
# BIT 2 FLAG 5
MGLVFLAG = 088D # LOCAL VERTICAL MIDDLE GIMBAL ANGLE
# COORDINATES COMPUTED
# COMPUTED
MGLVFBIT = BIT2
# BIT 1 FLAG 5
RENDWFLG = 089D # W MATRIX VALID W MATRIX INVALID
# FOR RENDEZVOUS FOR RENDEZVOUS
# NAVIGATION NAVIGATION
RENDWBIT = BIT1
FLAGWRD6 = STATE +6 # (090-104)
# (SET) (RESET)
# BIT 15 FLAG 6
DAPBIT1 = 090D # 1 SATURN 1 TVC 0 RCS 0 NO
DAP1BIT = BIT15
# BIT 14 FLAG 6
DAPBIT2 = 091D # 1 A/P 0 A/P 1 A/P 0 A/P
DAP2BIT = BIT14
# BIT 13 FLAG 6
STRULLSW = 092D # DO STEERULL DO ULAGEOFF ONLY
STRULBIT = BIT13
# BIT 13 FLAG 6
ENTRYDSP = STRULLSW # DO ENTRY DISPLAY OMIT ENTRY DISPLAY
# VIA ENTRYVN.
ENDSPBIT = BIT13
# BIT 12 FLAG 6
CMDAPARM = 093D # ALLOW ENTRY FIRINGS INHIBIT ENTRY FIRING
# AND CALCULATIONS AND CONTROL FUNCTION
# Page 58
CMDARMBIT = BIT12
# BIT 11 FLAG 6
GAMDIFSW = 094D # CALCULATE GAMDOT GAMDOT NOT TO BE
# CALCULATED
GMDIFBIT = BIT11
# BIT 10 FLAG 6
GONEPAST = 095D # LATERAL CONTROL LATERAL CONTROL
# CALCULATIONS TO BE CALCULATIONS TO BE
# OMITTED DONE
GONEBIT = BIT10
# BIT 9 FLAG 6
RELVELSW = 096D # TARGETING USES TARGETING USES
# EARTH-RELATIVE INERTIAL VELOCITY
# VELOCITY.
RELVBIT = BIT9
# BIT 8 FLAG 6
EGSW = 097D # IN FINAL PHASE NOT IN FINAL PHASE
EGFLGBIT = BIT8
# BIT 8 FLAG 6