Contents
Introduction
This is an abridged version of the AS-512 LVDC Flight Program, with all code
removed except purely mathematical utilities such as the square root subroutine,
the exponential subroutine, trigonometric subroutines, and so on. The intent
is to illustrate LVDC code that cannot conceivably be restricted under U.S.
International Traffic in Arms Regulations (ITAR).
The LVDC assembly-language source code herein was transcribed from an original
Apollo-era assembly listing into a set of source-code files. Those source-code
files were then assembled using a post-Apollo-era LVDC assembler, and the
resulting assembly listing was manually edited to remove most of it. The
present listing resulted. It was designed to superficially resemble the
original assembly listing in its full state, though there are some differences
in presentation.
An important difference is the presence of "modern" comments that were not
present in the original listings. Modern comments can be recognized because
they are preceded by the character "#".
Moreover, this assembly listing uses colorized syntax highlighting, according
to the following color key:
- Numbers and assembler-generated text.
- Fatal assembly errors
- Assembly warnings
- "Modern" comments
- Original Apollo-era comments
- Punchcard column 71.
- LVDC instruction opcodes.
- Pseudo-ops and assembler directives.
Besides which, the following colors are used for symbols defined within the LVDC
source code, and they double as hyperlinks that jump to the source-code lines at
which the symbols are defined:
- Program labels.
- Names of variables
- Names of preprocessor constants.
- Names of macros.
- Names of forms.
Finally, if you encounter icons like the one to the right, those are clickable
hyperlinks to experimental flowcharts of the associated sections of the LVDC
program.
Assembly Listing
# Copyright: Public domain.
# Restrictions: Presently, treat as if export of the full version
# of the file from U.S. is restricted by ITAR.
# Filename: GFP_DATA_PACK.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-04-18 RSB Pp. 1-9 transcribed. (In LibreOffice Writer
# with scanned page as background, and then
# cut-and-pasted here.)
# 2023-04-19 RSB Transcribed through p. 24. (LibreOffice.)
# 2023-04-20 RSB Transcribed through p. 46.
# 2023-04-21 RSB Transcribed through p. 84.
# 2023-04-22 RSB Transcribed through p. 112.
# 2023-04-23 RSB Transcribed through p. 163.
# 2023-04-24 RSB Transcription completed. (No proof-reading.)
# 2023-04-27 RSB Replaced instances of HOP* and TRA* by HOP and
# TRA respectively, to conform to guidelines.
# 2023-04-28 RSB Corrected initial page. Simplified some of the
# comments I had added.
# 2023-05-05 RSB Corrected P.N403 to P.N4O3.
# 2023-05-17 RSB Proofed through p. 13, making 8 corrections,
# using the transparent nano over PDF method.
# Also some corrections found during assembly.
# 2023-05-18 RSB Fixes identified during assembly.
# 2023-05-22 RSB More of the same.
# 2023-05-23 RSB Fixed some problems discovered by assembling.
# 2023-05-24 RSB More assembly-related fixes.
# 2023-05-25 RSB More of the same.
# 2023-05-26 RSB More of the same.
# 2023-05-29 RSB Ditto.
# 2023-06-02 RSB Ditto.
# 2023-06-03 RSB Ditto.
# 2023-06-04 RSB Ditto.
# 2023-06-06 RSB Ditto.
# 2023-06-07 RSB Ditto.
# 2023-06-11 RSB Ditto.
# 2023-06-14 RSB Ditto.
# 2023-06-16 RSB Ditto.
# 2023-06-17 RSB Ditto.
# 2023-06-21 RSB Added TITLE directive.
# 2023-06-22 RSB Fixed a few typos found during AS-513
# transcription.
# 2023-06-23 RSB More of the same.
# 2023-06-24 RSB Ditto.
# 2023-07-21 RSB Typo correction.
.
.
.
P.MOD DEQD 4,0,000 DATA MODULE STARTING LOCATION
.
.
.
D.KDAN TABLE 1 DATA AREA N
.
.
.
D.KDAP TABLE 1 DATA AREA P
.
.
.
C.UT TABLE 1 UTILITY ROUTINES
.
.
.
C.SD TABLE 1 SCALED DIVIDE MODULE
.
.
.
276 2 17 000000002 D.KB25 OCT 000000002
.
.
.
200 2 17 D.VUEM BSS 1 EXM LOCATION FOR USE BY UTILITIES
.
.
.
W 027 2 17 D.VUTB BSS 8
.
.
.
070 2 17 000000000 D.KZRO DEC 0 ZERO
.
.
.
P.P135 EQU (135/180) 135 DEGREES IN PIRADS
P.P90 EQU (90/180) 90 DEGREES
P.P45 EQU (45/180) 45 DEGREES
.
.
.
P.AT1 EQU (.31830264) *
P.AT3 EQU (-.10587734) * COEFFICIENTS TO ARCTANGENT
P.AT5 EQU (.0616068) * POLYNOMIAL APPROXIMATION
P.AT7 EQU (-.37061734E-1) *
P.AT9 EQU (.16760072E-1) *
P.AT11 EQU (-.37309738E-2) *
.
.
.
P.LNC1 EQU (.99990167) *
P.LNC2 EQU (-.49787544) *
P.LNC3 EQU (.31765005) * COEFFICIENTS TO NATURAL LOGARITHM
P.LNC4 EQU (-.19376149) * POLYNOMINAL APPROXIMATION
P.LNC5 EQU (.08556927) *
P.LNC6 EQU (-.01833831) *
P.LN2 EQU (.693147181) NATURAL LOGARITHM OF 2, LN(2)
.
.
.
P.SCC1 EQU (3.1415897) *
P.SCC3 EQU (-5.16736782) * COEFFICIENTS TO SINE-COSINE
P.SCC5 EQU (2.5436052) * POLYNOMINAL APPROXIMATION
P.SCC7 EQU (-.558396947) *
.
.
.
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: POLYNOMIAL_EVALUATION_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created
# 2023-04-19 JAP Transcribed from scans
# 2023-04-28 RSB Corrected title of p. 1049.
# 2023-06-16 RSB Corrected typo discovered via assembly.
# 2023-06-21 RSB Added TITLE directive.
# PAGE 1049, SEQUENCE PN000000-PN000000
VARIABLE LAUNCH AZIMUTH (LA) A0800 PAGE 1049
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT PN REF POLYNOMIAL EVALUATION UTILITY (PN)
# PAGE 1050, SEQUENCE PN000020-PN000240
POLYNOMIAL EVALUATION UTILITY (PN) A0810 PAGE 1050
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* POLYNOMIAL EVALUATION UTILITY (PN) *J
* *
* *
**********************************************************************
* DATE
* REVISIONS NONE
* FUNCTION EVALUATION OF A 4TH OR 6TH ORDER POLYNOMIAL
* (NOTE: OTHER ORDER POLYNOMIALS MAY BE EVALUATED
IF THE APPROPRIATE ENTRIES ARE INCORPORATED)
* ENTRIES U.PN06 EVALUATION OF 6TH ORDER POLYNOMIAL
* U.PN04 EVALUATION OF 4TH ORDER POLYNOMIAL
* RESTRICTIONS NONE
* NOTES INPUT INDEPENDENT VARIABLE IN ACCUMULATOR
* OUTPUT RESULT IN ACCUMULATOR
# PAGE 1051, SEQUENCE PN000260-PN000720
POLYNOMIAL EVALUATION UTILITY (PN) A0810 PAGE 1051
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
DOGD 0,16,000
BLOCK 33
*Q *
6 16 0 011 0 16 377 1 13 U.PN04 STO 777 U.PN04 S
* ENTRY FOR 4TH ORDER POLYNOMIAL *
6 16 0 012 0 16 200 1 13 STO 600 SAVE DFW IN EXM LOCATION B
6 16 0 013 0 16 204 1 16 EXM 0,0,4 LOAD A4 COF
6 16 0 014 0 16 030 0 10 TRA GOON4 G
*Q *
6 16 0 015 0 16 377 1 13 U.PN06 STO 777 U.PN06 S
* ENTRY FOR 6TH ORDER POLYNOMIAL *
6 16 0 016 0 16 200 1 13 STO 600 SAVE DFW IN EXM LOCATION B
6 16 0 017 0 16 206 1 16 EXM 0,0,6 LOAD A6 COF
6 16 0 020 0 16 220 1 16 EXM 0,1,0 MULTIPLY BY INDEPENDENT VARIABLE
6 16 0 021 000 1 16 SHL 0 DELAY
6 16 0 022 0 16 205 1 16 EXM 0,0,5 A5
6 16 0 023 0 16 375 1 07 ADD 775 ADD PRODUCT OF MULTIPLY
6 16 0 024 0 16 220 1 16 EXM 0,1,0 MULTIPLY BY INDEPENDENT VARIABLE
6 16 0 025 000 1 16 SHL 0 DELAY
6 16 0 026 0 16 204 1 16 EXM 0,0,4 A4
6 16 0 027 0 16 375 1 07 ADD 775 ADD PRODUCT OF MULTIPLY
6 16 0 030 0 16 220 1 16 GOON4 EXM 0,1,0 COMPUTE APPROPRIATE POLYNOMIAL B
6 16 0 031 000 1 16 SHL 0 DELAY
6 16 0 032 0 16 203 1 16 EXM 0,0,3 A3
6 16 0 033 0 16 375 1 07 ADD 775 ADD PRODUCT OF MULTIPLY
6 16 0 034 0 16 220 1 16 EXM 0,1,0 MULTIPLY BY INDEPENDENT VARIABLE
6 16 0 035 000 1 16 SHL 0 DELAY
6 16 0 036 0 16 202 1 16 EXM 0,0,2 A2
6 16 0 037 0 16 375 1 07 ADD 775 ADD PRODUCT OF MULTIPLY
6 16 0 040 0 16 220 1 16 EXM 0,1,0 MULTIPLY BY INDEPENDENT VARIABLE
6 16 0 041 000 1 16 SHL 0 DELAY
6 16 0 042 0 16 201 1 16 EXM 0,0,1 A1
6 16 0 043 0 16 375 1 07 ADD 775 ADD PRODUCT OF MULTIPLY
6 16 0 044 0 16 220 1 16 EXM 0,1,0 MULTIPLY BY INDEPENDENT VARIABLE
6 16 0 045 000 1 16 SHL 0 DELAY
6 16 0 046 0 16 200 1 16 EXM 0,0,0 A0
6 16 0 047 0 16 375 1 07 ADD 775 ADD PRODUCT OF MULTIPLY
6 16 0 050 0 16 377 1 00 HOP 777 RETURN X
* E
* H
# PAGE 1052, NO SOURCE CODE
POLYNOMIAL EVALUATION UTILITY (PN) A0810 PAGE 1052
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
... Pages removed ...
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: SINE-COSINE_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-06 RSB Fixed typo identified during assembly.
# 2023-06-21 RSB Added TITLE directive.
# 2023-07-23 RSB Added FLOW.
# PAGE 1059, SEQUENCE SC000000
SECTOR DUMP TELEMETRY (DT) A0820 PAGE 1059
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT SC REF SINE-COSINE UTILITY (SC)
# PAGE 1060, SEQUENCE SC000020-SC000460
SINE/COSINE UTILITY (SC) A0830 PAGE 1060
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* SINE-COSINE UTILITY (SC) *J
* *
* *
**********************************************************************
* DATE 4 - 23 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE SINE-COSINE UTILITY MODULE IS
* TO COMPUTE THE SINE AND COSINE OF INPUT ANGLE.
* ENTRIES U.SC00 - ANGLE ARGUMENT TO BE IN AC IN PIRADS ON
* ENTRY. ON EXIT SINE(ANGLE) IN AC,
* COSINE(ANGLE) IN PQ.
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
* U.SC00 S
6 16 0 152 2 10 377 1 13 U.SC00 STO 777 SAVE RETURN LINKAGES B
6 16 0 153 2 10 027 1 13 STO D.VUTB DETERMINE WHICH QUADRANT ANGLE IS IN B
6 16 0 154 2 10 163 0 14 TMI SC100
RSU =(P.P90)B0 90 DEGREES
6 16 0 155 2 10 217 1 15 200000000 + RSU =0.5B0 90 DEGREES
6 16 0 156 2 10 030 1 13 STO D.VUTB+1
6 16 0 157 2 10 161 0 14 TMI *+2 QUADRANT II
6 16 0 160 2 10 171 0 10 TRA SC300 QUADRANT I
ADD =(P.P90)B0 90 DEGREES
6 16 0 161 2 10 217 1 07 200000000 + ADD =0.5B0 90 DEGREES
6 16 0 162 2 10 170 0 10 TRA SC200
SC100 ADD =(P.P90)B0 90 DEG.
6 16 0 163 2 10 217 1 07 200000000 + SC100 ADD =0.5B0 90 DEG.
6 16 0 164 2 10 030 1 13 STO D.VUTB+1
6 16 0 165 2 10 167 0 14 TMI *+2 QUADRANT III
6 16 0 166 2 10 171 0 10 TRA SC300 QUADRANT IV
RSU =(-P.P90)B0 -90 DEG.
6 16 0 167 2 10 125 0 15 600000000 + RSU =-0.5B0 -90 DEG.
6 16 0 170 2 10 027 1 13 SC200 STO D.VUTB
6 16 0 171 2 10 377 1 17 SC300 CLA 777 SAVE RETURN
6 16 0 172 2 10 031 1 13 STO D.VUTB+2
CALL SC1000,D.VUTB (SC1000)COMPUTE SINE OF ANGLE L
6 16 0 173 2 10 027 1 17 + CLA D.VUTB
6 16 0 174 2 10 126 0 00 + HOP* SC1000
# PAGE 1061, SEQUENCE SC000470-SC000710
SINE/COSINE UTILITY (SC) A0830 PAGE 1061
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
6 16 0 175 2 10 027 1 13 STO D.VUTB
CALL SC1000,D.VUTB+1 (SC1000)COMPUTE COSINE OF ANGLE L
6 16 0 176 2 10 030 1 17 + CLA D.VUTB+1
6 16 0 177 2 10 126 0 00 + HOP* SC1000
6 16 0 200 2 10 375 1 13 STO 775
6 16 0 201 2 10 027 1 17 CLA D.VUTB
6 16 0 202 2 10 031 1 00 HOP D.VUTB+2 RETURN X
* E
*Q *
6 16 0 203 2 10 377 1 13 SC1000 STO 777 SC1000 S
6 16 0 204 2 10 032 1 13 STO D.VUTB+3 USE POLY. APPROX. FOR SIN-COS EQ.13.2.1 B
6 16 0 205 2 10 032 1 05 MPH D.VUTB+3
6 16 0 206 020 1 16 SHL 1
6 16 0 207 2 10 033 1 13 STO D.VUTB+4
MPH =(P.SCC7)B3
6 16 0 210 2 10 127 0 05 756103162 + MPH =-0.558396947B3
ADD =(P.SCC5)B2
6 16 0 211 2 10 130 0 07 242624666 + ADD =2.5436052B2
6 16 0 212 2 10 033 1 05 MPH D.VUTB+4
6 16 0 213 002 1 16 SHR 2
ADD =(P.SCC3)B3
6 16 0 214 2 10 131 0 07 532511662 + ADD =-5.16736782B3
6 16 0 215 2 10 033 1 05 MPH D.VUTB+4
ADD =(P.SCC1)B2
6 16 0 216 2 10 132 0 07 311037470 + ADD =3.1415897B2
6 16 0 217 2 10 032 1 05 MPH D.VUTB+3
6 16 0 220 040 1 16 SHL 2 RESCALE
6 16 0 221 2 10 377 1 00 HOP 777 RETURN X
* E
* H
# PAGE 1062, NO SOURCE CODE
SINE/COSINE UTILITY (SC) A0830 PAGE 1062
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
# PAGE 1063, NO SOURCE CODE
SINE/COSINE UTILITY (SC) A0830 PAGE 1063
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: MATRIX_MULTIPLY_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-19 RSB Fixed typos discovered in assembly.
# 2023-06-21 RSB Added TITLE directive.
# 2023-07-23 RSB Added FLOW.
# PAGE 1064, SEQUENCE MM000000
SINE/COSINE UTILITY (SC) A0830 PAGE 1064
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT MM REF MATRIX MULTIPLY UTILITY (MM)
# PAGE 1065, SEQUENCE MM000020-MM000250
MATRIX MULTIPLY UTILITY (MM) A0840 PAGE 1065
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* MATRIX MULTIPLY UTILITY (MM) *J
* *
* *
**********************************************************************
* DATE 5 - 18 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE MATRIX MULTIPLY UTILITY MODULE
* IS TO PERFORM A MATRIX MULTIPLICATION ON THE TWO
* SPECIFIED MATRICES
* ENTRIES U.MM00 - TWO ARGUMENTS SUPPLIED UPON ENTRY. IN AC,
* A DFW ON THE FORM CLA,A,MPY,B WHERE A AND
* B ARE THE INITIAL LOCATIONS OF THE
* MATRICES TO BE MULTIPLIED. IN PQ, A WORD
* CONTAINING A DFW OF THE FORM STO,C IN
* SYLLABLE 1 AND A COUNTER (SCALED B25) IN
* SYLLABLE 0. C IS THE INITIAL LOCATION OF
* THE PRODUCT MATRIX.
# PAGE 1066, SEQUENCE MM000270-MM000700
MATRIX MULTIPLY UTILITY (MM) A0840 PAGE 1066
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
* U.MM00 S
6 16 0 222 2 10 377 1 13 U.MM00 STO 777 SAVE RETURN LINKAGES AND INPUT ARGUMENTS B
6 16 0 223 2 10 223 1 02 010000000 SUB =O01 AKJUST DFW FOR USE
6 16 0 224 2 10 033 1 13 STO D.VUTB+4
6 16 0 225 2 10 375 1 17 CLA 775
6 16 0 226 2 10 027 1 13 STO D.VUTB
6 16 0 227 2 10 133 0 06 000000006 AND =3
6 16 0 230 2 10 034 1 13 STO D.VUTB+5 SAVE COUNTER
6 16 0 231 2 10 377 1 17 CLA 777
6 16 0 232 2 10 035 1 13 STO D.VUTB+6
6 16 0 233 2 10 134 0 00 MM100 HOP* MM500 (U.VD01)FORM VECTOR DOT P
6 16 0 234 2 10 220 1 16 EXM 0,1,0 STORE 1ST ELEMENT B
6 16 0 235 2 10 134 0 00 HOP* MM500 (U.VD01)FORM VECTOR DOT P
6 16 0 236 2 10 221 1 16 EXM 0,1,1 STORE 2ND ELEMENT B
6 16 0 237 2 10 134 0 00 HOP* MM500 (U.VD01)FORM VECTOR DOT P
6 16 0 240 2 10 222 1 16 EXM 0,1,2 STORE 3RD ELEMENT B
6 16 0 241 2 10 034 1 17 CLA D.VUTB+5
6 16 0 242 2 10 276 1 02 000000002 SUB =1
6 16 0 243 2 10 245 0 04 TNZ MM200 MATRIX MULTIPLICAT- ION COMPLETE N
6 16 0 244 2 10 035 1 00 HOP D.VUTB+6 RETURN X
* NONE 8 $
6 16 0 245 2 10 034 1 13 MM200 STO D.VUTB+5 SET TO FORM ELEMENTS FOR NEXT ROW B
6 16 0 246 2 10 033 1 17 CLA D.VUTB+4 *
6 16 0 247 2 10 135 0 07 750000400 ADD =O7500004 * RESET A ADDRESS, INCREMENT B ADDRESS
6 16 0 250 2 10 033 1 13 STO D.VUTB+4 *
6 16 0 251 2 10 027 1 17 CLA D.VUTB
6 16 0 252 2 10 223 1 07 010000000 ADD =O01 * INCREMENT C ADDRESS
6 16 0 253 2 10 027 1 13 STO D.VUTB
6 16 0 254 2 10 233 0 10 TRA MM100 G
6 16 0 255 2 10 377 1 13 MM500 STO 777 SET TO PEFORM VECTOR DOT
6 16 0 256 2 10 033 1 17 CLA D.VUTB+4
6 16 0 257 2 10 223 1 07 010000000 ADD =O01
6 16 0 260 2 10 033 1 13 STO D.VUTB+4
6 16 0 261 2 10 170 1 10 TRA U.VD01
* E
* H
# PAGE 1067, NO SOURCE CODE
MATRIX MULTIPLY UTILITY (MM) A0840 PAGE 1067
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: EXPONENTIAL_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-21 RSB Added TITLE directive.
# 2023-07-23 RSB Added FLOW.
# PAGE 1068, SEQUENCE EU000000
MATRIX MULTIPLY UTILITY (MM) A0840 PAGE 1068
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT EU REF EXPONENTIAL UTILITY (EX)
# PAGE 1069, SEQUENCE EU000020-EU000230
EXPONENTIAL UTILITY (EX) A0845 PAGE 1069
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* EXPONENTIAL UTILITY (EX) *J
* *
**********************************************************************
* DATE 3-20-69
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE EXPONENTIAL UTILITY MODULE IS
* TO COMPUTE Y WHEN Y = E(X)
* ENTRY U.EX00 - ARGUMENT X TO BE IN ACCUMULATOR UPON
* ENTRY AND SCALED B1. ON EXIT OUTPUT Y
* WILL BE IN ACCUMULATOR SCALED B1.
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
# PAGE 1070, SEQUENCE EU000250-EU000580
EXPONENTIAL UTILITY (EX) A0845 PAGE 1070
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
ORG P.MOD,C.UT
*Q *
6 16 0 262 2 10 377 1 13 U.EX00 STO 777 U.EX00 S
6 16 0 263 2 10 035 1 13 STO D.VUTB+6 SAVE RETURN LINKAGES AND INPUT ARGUMENTS B
6 16 0 264 2 10 217 1 17 200000000 CLA =1B1 SET OUTPUT FACTOR TO 1.0 B
6 16 0 265 2 10 036 1 13 EX10 STO D.VUTB+7 IS INPUT ARGUMENT < -.5 Q
6 16 0 266 2 10 035 1 17 CLA D.VUTB+6
ADD =.5B1
6 16 0 267 2 10 220 1 07 100000000 + ADD =0.5B1
6 16 0 270 2 10 307 0 14 TMI EX20 IS ARGUMENT < -.5 Y
* CALCULATE THE VALUE OF E**X EQ.13.5.1 B
CLA =.00841598B-3
6 16 0 271 2 10 136 0 17 021170626 + CLA =0.00841598B-3
6 16 0 272 2 10 035 1 05 MPH D.VUTB+6 B1
ADD =.04216020B-2
6 16 0 273 2 10 137 0 07 053130054 + ADD =0.0421602B-2
6 16 0 274 2 10 035 1 05 MPH D.VUTB+6 B1
ADD =.16665739B-1
6 16 0 275 2 10 140 0 07 125250170 + ADD =0.16665739B-1
6 16 0 276 2 10 035 1 05 MPH D.VUTB+6 B1
ADD =.49995983B0
6 16 0 277 2 10 141 0 07 177772570 + ADD =0.49995983B0
6 16 0 300 2 10 035 1 05 MPH D.VUTB+6 B1
6 16 0 301 2 10 142 0 07 200000006 ADD =1.0000002B1
6 16 0 302 2 10 035 1 05 MPH D.VUTB+6 B1
6 16 0 303 2 10 143 0 07 100000004 ADD =1.0000002B2
6 16 0 304 2 10 036 1 05 MPH D.VUTB+7
6 16 0 305 040 1 16 SHL 2 SET OUTPUT TO E**X*OUTPUT FACTOR B
6 16 0 306 2 10 377 1 00 HOP 777 RETURN X
6 16 0 307 2 10 036 1 17 EX20 CLA D.VUTB+7 INCREMENT INPUT ARG X BY 1.0 B
MPY =.36787944B0
6 16 0 310 2 10 144 0 01 136132544 + MPY =0.36787944B0
6 16 0 311 2 10 035 1 17 CLA D.VUTB+6 B1
6 16 0 312 2 10 217 1 07 200000000 ADD =1B1
6 16 0 313 2 10 035 1 13 STO D.VUTB+6 B1
6 16 0 314 2 10 375 1 17 CLA 775 SET OUTPUT FACTOR TO E**-1 B
6 16 0 315 2 10 265 0 10 TRA EX10 G
* E
* H
# PAGE 1071, NO SOURCE CODE
EXPONENTIAL UTILITY (EX) A0845 PAGE 1071
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: MATRIX_TRANSPOSE_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-19 RSB Fixed typos discovered in assembly.
# 2023-06-21 RSB Added TITLE directive.
# PAGE 1072, SEQUENCE MT000000
EXPONENTIAL UTILITY (EX) A0845 PAGE 1072
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT MT REF MATRIX TRANSPOSE UTILITY (MT)
# PAGE 1073, SEQUENCE MT000020-MT000220
MATRIX TRANSPOSE UTILITY (MT) A0850 PAGE 1073
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* MATRIX TRANSPOSE UTILITY (MT) *J
* *
* *
**********************************************************************
* DATE 5 - 18 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE MATRIX TRANSPOSE UTILITY
* MODULE IS TO FORM TRANSPOSE MATRIX OF SPECIFIED
* MATRIX.
* ENTRIES U.MT00 - UPON ENTRY A DFW OF THE FORM STO,B,CLA,A
* IS TO BE IN AC. WHERE A AND B ARE THE
* INITIAL LOCATIONS OF THE MATRIX TO BE
* TRANSPOXED AND THE MATRIX IN WHICH
* TRANSPOSE IS TO BE STORED.
# PAGE 1074, SEQUENCE MT000240-MT000600
MATRIX TRANSPOSE UTILITY (MT) A0850 PAGE 1074
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
6 16 0 316 2 10 377 1 13 U.MT00 STO 777 U.MT00 S
* SAVE RETURN LINKAGE AND INPUT ARGUMENTS B
6 16 0 317 2 10 200 1 13 STO D.VUEM FORM TRANSPOSE MATRIX B
6 16 0 320 2 10 200 1 16 EXM 0,0,0 TRANSPOSE AND STORE DIAGONAL ELEMENTS
6 16 0 321 2 10 220 1 16 EXM 0,1,0 *
6 16 0 322 2 10 205 1 16 EXM 0,0,5 *
6 16 0 323 2 10 225 1 16 EXM 0,1,5 *
6 16 0 324 2 10 212 1 16 EXM 0,0,12 *
6 16 0 325 2 10 232 1 16 EXM 0,1,12 *
6 16 0 326 2 10 201 1 16 EXM 0,0,1 SAVE LEFT OFF DIAGONAL ELEMENTS
6 16 0 327 2 10 030 1 13 STO D.VUTB+1 *
6 16 0 330 2 10 202 1 16 EXM 0,0,2 *
6 16 0 331 2 10 031 1 13 STO D.VUTB+2 *
6 16 0 332 2 10 206 1 16 EXM 0,0,6 *
6 16 0 333 2 10 032 1 13 STO D.VUTB+3 *
6 16 0 334 2 10 204 1 16 EXM 0,0,4 TRANSPOSE AND MOVE RIGHT OFF DIGONAL EL.
6 16 0 335 2 10 221 1 16 EXM 0,1,1 *
6 16 0 336 2 10 210 1 16 EXM 0,0,10 10
6 16 0 337 2 10 222 1 16 EXM 0,1,2 *
6 16 0 340 2 10 211 1 16 EXM 0,0,11 *
6 16 0 341 2 10 226 1 16 EXM 0,1,6 *
6 16 0 342 2 10 030 1 17 CLA D.VUTB+1 TRANSPOSE AND MOVE LEFT OFF DIAGONAL EL.
6 16 0 343 2 10 224 1 16 EXM 0,1,4 *
6 16 0 344 2 10 031 1 17 CLA D.VUTB+2 *
6 16 0 345 2 10 230 1 16 EXM 0,1,10 *
6 16 0 346 2 10 032 1 17 CLA D.VUTB+3 *
6 16 0 347 2 10 231 1 16 EXM 0,1,11 *
6 16 0 350 2 10 377 1 00 HOP 777 RETURN X
* E
* H
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: VECTOR_CROSS_PRODUCT_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-21 RSB Added TITLE directive
# PAGE 1075, SEQUENCE VC000000
MATRIX TRANSPOSE UTILITY (MT) A0850 PAGE 1075
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT VC REF VECTOR CROSS PRODUCT UTILITY (VC)
# PAGE 1076, SEQUENCE VC000020-VC000240
VECTOR CROSS PRODUCT (VC) A0860 PAGE 1076
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* VECTOR CROSS PRODUCT UTILITY (VC) *J
* *
* *
**********************************************************************
* DATE 5 - 18 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE VECTOR CROSS PRODUCT UTILITY
* MODULE IS TO PEFORM A VECTOR CROSS OF SPECIFIED
* VECTORS.
* ENTRIES U.VC00 - UPON ENTRY, AC TO CONTAIN A DFW OF THE
* FORM CLA,A,MPY,B. WHERE A AND B ARE
* THE INITIAL LOCATIONS OF THE VECTORS.
* UPON EXIT,
* D.VUTB+1 = A(2)*B(3) - A(3)*B(2)
* D.VUTB+2 = A(3)*B(1) - A(1)*B(3)
* D.VUTB+3 = A(1)*B(2) - A(2)*B(1)
# PAGE 1077, SEQUENCE VC000260-VC000740
VECTOR CROSS PRODUCT (VC) A0860 PAGE 1077
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
* U.VC00 S
6 16 0 351 2 10 377 1 13 U.VC00 STO 777 SAVE RETURN LINKAGE AND INPUT ARGUMENTS B
6 16 0 352 2 10 200 1 13 STO D.VUEM
6 16 0 353 2 10 221 1 16 EXM 0,1,1 CLA A2
6 16 0 354 2 10 202 1 16 EXM 0,0,2 MPY A3
6 16 0 355 2 10 222 1 16 EXM 0,1,2 CLA A3
6 16 0 356 2 10 033 1 13 STO D.VUTB+4
6 16 0 357 2 10 375 1 17 CLA 775
6 16 0 360 2 10 030 1 13 STO D.VUTB+1 A2*B3
6 16 0 361 2 10 033 1 17 CLA D.VUTB+4
6 16 0 362 2 10 201 1 16 EXM 0,0,1 MPY B2
6 16 0 363 2 10 220 1 16 EXM 0,1,0 CLA A1
6 16 0 364 2 10 030 1 17 CLA D.VUTB+1
6 16 0 365 2 10 375 1 02 SUB 775 COMPUTE I ELEMENT OF VECTOR EQ.13.9.1 B
6 16 0 366 2 10 030 1 13 STO D.VUTB+1 A2*B3-A3*B2
6 16 0 367 2 10 033 1 17 CLA D.VUTB+4
6 16 0 370 2 10 200 1 16 EXM 0,0,0 MPY B1
6 16 0 371 2 10 220 1 16 EXM 0,1,0 CLA A1
6 16 0 372 2 10 033 1 13 STO D.VUTB+4
6 16 0 373 2 10 375 1 17 CLA 775
6 16 0 374 2 10 031 1 13 STO D.VUTB+2 A3*B1
6 16 0 375 2 10 033 1 17 CLA D.VUTB+4
6 16 0 376 2 10 202 1 16 EXM 0,0,2 MPY B3
6 16 0 377 2 10 011 1 10 *
6 16 1 011 2 10 220 1 16 EXM 0,1,0 CLA A1
6 16 1 012 2 10 031 1 17 CLA D.VUTB+2
6 16 1 013 2 10 375 1 02 SUB 775 COMPUTE J ELEMENT OF VECTOR EQ.13.9.1 B
6 16 1 014 2 10 031 1 13 STO D.VUTB+2 A3*B1-A1*B3
6 16 1 015 2 10 033 1 17 CLA D.VUTB+4
6 16 1 016 2 10 201 1 16 EXM 0,0,1 MPY B2
6 16 1 017 2 10 221 1 16 EXM 0,1,1 CLA A2
6 16 1 020 2 10 033 1 13 STO D.VUTB+4
6 16 1 021 2 10 375 1 17 CLA 775
6 16 1 022 2 10 032 1 13 STO D.VUTB+3 A1*B2
6 16 1 023 2 10 033 1 17 CLA D.VUTB+4
6 16 1 024 2 10 200 1 16 EXM 0,0,0 MPY B1
6 16 1 025 2 10 220 1 16 EXM 0,1,0 CLA A1
6 16 1 026 2 10 032 1 17 CLA D.VUTB+3
6 16 1 027 2 10 375 1 02 SUB 775 COMPUTE K ELEMENT OF VECTOR EQ.13.9.1 B
6 16 1 030 2 10 032 1 13 STO D.VUTB+3 A1*B2-A2*B1
6 16 1 031 2 10 377 1 00 HOP 777 RETURN X
* E
* H
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: NATURAL_LOG_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-21 RSB Added TITLE directive.
# 2023-07-17 RSB Added a couple of FLOW directives.
# PAGE 1078, SEQUENCE LN000000
VECTOR CROSS PRODUCT (VC) A0860 PAGE 1078
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT LN REF NATURAL LOG UTILITY (LN)
# PAGE 1079, SEQUENCE LN000020-LN000490
NATURAL LOG UTILITY (LN) A0870 PAGE 1079
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* NATURAL LOG UTILITY (LN) *J
* *
* *
**********************************************************************
* DATE 5 - 17 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE NATURAL LOG UTILITY MODULE IS
* TO COMPUTE THE NATURAL LOGARITHM OF THE INPUT
* ARGUMENT.
* ENTRIES U.LN00 - TWO ARGUMENTS SUPPLIED UPON ENTRY. ARG1
* IN AC AND ARG2 IN PQ. THESE TWO
* ARGUMENTS MUST HAVE SAME SCALING. ON
* EXIT LN(ARG1/ARG2) IN AC SCALED B1.
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
* U.LN00 S
6 16 1 032 2 10 377 1 13 U.LN00 STO 777 SAVE RETURN LINKAGE AND INPUT ARGUMENTS B
6 16 1 033 2 10 030 1 13 STO D.VUTB+1
6 16 1 034 2 10 375 1 17 CLA 775
6 16 1 035 2 10 032 1 13 STO D.VUTB+3
6 16 1 036 2 10 030 1 15 RSU D.VUTB+1 (LN100)ARE ARGUMENTS EQUAL N
6 16 1 037 2 10 046 1 14 TMI LN200 ARG1 < ARG2
6 16 1 040 2 10 042 1 04 TNZ LN100 ARG1 > ARG2
* SET NATURAL LOG OF NUMBER TO=ZERO B
6 16 1 041 2 10 377 1 00 HOP 777 RETURN X
6 16 1 042 2 10 032 1 17 LN100 CLA D.VUTB+3 PERFORM ARGUMENT DIVIDE B
6 16 1 043 2 10 030 1 03 DIV D.VUTB+1 USE ARG2/ARG1 AS ARGUMENT
CLA =(-P.LN2)B2
6 16 1 044 2 10 145 0 17 723506750 + CLA =-0.693147181B2
6 16 1 045 2 10 052 1 10 TRA LN300
6 16 1 046 2 10 030 1 17 LN200 CLA D.VUTB+1
6 16 1 047 2 10 032 1 03 DIV D.VUTB+3 USE ARG1/ARG2 AS ARGUMENT
6 16 1 050 2 10 070 1 17 CLA D.KZRO
6 16 1 051 2 10 052 1 10 TRA LN300 DUMMY INSTURCTION (NECESSARY FOR DIVIDE)
6 16 1 052 2 10 033 1 13 LN300 STO D.VUTB+4
6 16 1 053 2 10 260 1 16 EXM 1,1,0 DELAY 2 INSTRUCTIONS
# PAGE 1080, SEQUENCE LN000500-LN000930
NATURAL LOG UTILITY (LN) A0870 PAGE 1080
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
CLA =(-2*P.LN2)B2
6 16 1 054 2 10 146 0 17 647215720 + CLA =-1.386294362B2
6 16 1 055 2 10 031 1 13 STO D.VUTB+2
6 16 1 056 2 10 375 1 17 CLA 775
6 16 1 057 001 1 16 SHR 1 RESCALE
6 16 1 060 2 10 030 1 13 STO D.VUTB+1
SUB =(1/4)B1
6 16 1 061 2 10 221 1 02 040000000 + SUB =0.25B1
6 16 1 062 2 10 073 1 14 TMI LN400
SUB =(1/4)B1
6 16 1 063 2 10 221 1 02 040000000 + SUB =0.25B1
6 16 1 064 2 10 101 1 14 TMI LN500
6 16 1 065 2 10 031 1 17 CLA D.VUTB+2
SUB =(-P.LN2)B2
6 16 1 066 2 10 145 0 02 723506750 + SUB =-0.693147181B2
6 16 1 067 2 10 031 1 13 STO D.VUTB+2
6 16 1 070 2 10 030 1 17 CLA D.VUTB+1
6 16 1 071 020 1 16 SHL 1 RESCALE
6 16 1 072 2 10 103 1 10 TRA LN700
6 16 1 073 2 10 031 1 17 LN400 CLA D.VUTB+2
ADD =(-P.LN2)B2
6 16 1 074 2 10 145 0 07 723506750 + ADD =-0.693147181B2
6 16 1 075 2 10 031 1 13 STO D.VUTB+2
6 16 1 076 2 10 030 1 17 CLA D.VUTB+1
6 16 1 077 020 1 16 SHL 1
6 16 1 100 2 10 102 1 10 TRA LN600
6 16 1 101 2 10 030 1 17 LN500 CLA D.VUTB+1
6 16 1 102 040 1 16 LN600 SHL 2
6 16 1 103 2 10 217 1 02 200000000 LN700 SUB =1B1
6 16 1 104 020 1 16 SHL 1
6 16 1 105 2 10 030 1 13 STO D.VUTB+1
MPH =(P.LNC6)B2 USE NATURAL LOG APPROX. POLY. EQ.13.4.1 B
6 16 1 106 2 10 147 0 05 776647056 + MPH =-0.01833831B2 USE NATURAL LOG APPROX. POLY. EQ.13.4.1
ADD =(P.LNC5)B2 * *
6 16 1 107 2 10 150 0 07 005363736 + ADD =0.08556927B2 * *
6 16 1 110 2 10 030 1 05 MPH D.VUTB+1 * *
ADD =(P.LNC4)B2 * *
6 16 1 111 2 10 151 0 07 763462646 + ADD =-0.19376149B2 * *
6 16 1 112 2 10 030 1 05 MPH D.VUTB+1 * *
ADD =(P.LNC3)B2 * LN(X) = (X-1)*(C1 + (X-1)*(C2 + *
6 16 1 113 2 10 152 0 07 024250604 + ADD =0.31765005B2 * LN(X) = (X-1)*(C1 + (X-1)*(C2 +
6 16 1 114 2 10 030 1 05 MPH D.VUTB+1 * (X-1)*(C3 + (X-1)*(C4 + *
ADD =(P.LNC2)B2 * (X-1)*(C5 + (X-1)*(C6)))))
6 16 1 115 2 10 153 0 07 740105474 + ADD =-0.49787544B2 * (X-1)*(C5 + (X-1)*(C6))))
6 16 1 116 2 10 030 1 05 MPH D.VUTB+1 * *
ADD =(P.LNC1)B2 * *
6 16 1 117 2 10 154 0 07 077774616 + ADD =0.99990167B2 * *
6 16 1 120 2 10 030 1 05 MPH D.VUTB+1 * *
6 16 1 121 2 10 031 1 07 ADD D.VUTB+2 * *
6 16 1 122 020 1 16 SHL 1
6 16 1 123 2 10 030 1 13 STO D.VUTB+1 * *
6 16 1 124 2 10 033 1 17 CLA D.VUTB+4
6 16 1 125 2 10 130 1 04 TNZ LN800
6 16 1 126 2 10 030 1 17 CLA D.VUTB+1 NATURAL LOG FOR NUMBER BETWEEN .5 AND 16
6 16 1 127 2 10 377 1 00 HOP 777
# PAGE 1081, SEQUENCE LN000940-LN000980
NATURAL LOG UTILITY (LN) A0870 PAGE 1081
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
6 16 1 130 2 10 070 1 17 LN800 CLA D.KZRO LN(X * 2**() = N * LN(2) + LN(X)
6 16 1 131 2 10 030 1 02 SUB D.VUTB+1
6 16 1 132 2 10 377 1 00 HOP 777 RETURN X
* E
* H
# PAGE 1082, NO SOURCE CODE
NATURAL LOG UTILITY (LN) A0870 PAGE 1082
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: SQUARE_ROOT_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-05-23 RSB Fixed some problems discovered by assembling.
# 2023-06-21 RSB Added TITLE directive.
# 2023-07-19 RSB Added various FLOW directives in the course of
# creating a tutorial page about the topic.
# PAGE 1083, SEQUENCE SR000000
NATURAL LOG UTILITY (LN) A0870 PAGE 1083
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT SR REF SQUARE ROOT UTILITY (SR)
# PAGE 1084, SEQUENCE SR000020-SR000220
SQUARE ROOT UTILITY ROUTINE (SR) A0880 PAGE 1084
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* SQUARE ROOT UTILITY (SR) *J
* *
* *
**********************************************************************
* DATE 4 - 23 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE SQUARE ROOT ROUTINE
* IS TO COMPUTE THE SQUARE ROOT OF AN INPUT
* ARGUMENT.
* ENTRIES U.SR00 ARGUMENT IS TO BE IN AC AND PREVIOUS
* SQUARE ROOT OF ARGUMENT IS TO BE IN
* D.VUTB. SQUARE ROOT OF ARGUMENT IN AC
* ON EXIT AND RESULT OF ALGORITHM DIVIDE
* IS IN PQ.
# PAGE 1085, SEQUENCE SR000240-SR000620
SQUARE ROOT UTILITY ROUTINE (SR) A0880 PAGE 1085
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
* U.SR00 S
6 16 1 133 2 10 377 1 13 U.SR00 STO 777 SAVE RETURN LINKAGE B
6 16 1 134 2 10 165 1 14 TMI SR10 NEGATIVE ARGUMENT Y
6 16 1 135 001 1 16 SHR 1 DIVIDE BY 2
6 16 1 136 2 10 030 1 13 STO D.VUTB+1
6 16 1 137 2 10 027 1 02 SUB D.VUTB
6 16 1 140 2 10 142 1 14 TMI *+2
6 16 1 141 2 10 165 1 10 TRA SR10 IS 1/2 ARGUMENT LESS THAN FIRST GUESS N
6 16 1 142 2 10 250 1 17 000000004 CLA =2
6 16 1 143 2 10 031 1 13 STO D.VUTB+2
6 16 1 144 2 10 030 1 17 SR05 CLA D.VUTB+1
6 16 1 145 2 10 027 1 03 DIV D.VUTB
6 16 1 146 2 10 250 1 17 CLA D.KB24 DELAY FOR DIVIDE
BLOCK 2
6 16 1 147 2 10 276 1 02 SUB D.KB25
6 16 1 150 2 10 147 1 04 TNZ *-1
6 16 1 151 2 10 027 1 17 CLA D.VUTB
6 16 1 152 001 1 16 SHR 1 PERFORM SQUARE ROOT ALGORITHM EQ.13.6.1 B
6 16 1 153 2 10 375 1 07 ADD 775 ARG(L-1)/2 + ARG(L)/2* ARG(-1)
6 16 1 154 2 10 165 1 14 TMI SR10 ALGORITHM RESULT NEGATIVE Y
6 16 1 155 2 10 027 1 13 STO D.VUTB
6 16 1 156 2 10 031 1 17 CLA D.VUTB+2
6 16 1 157 2 10 276 1 02 000000002 SUB =1
6 16 1 160 2 10 163 1 14 TMI *+3
6 16 1 161 2 10 031 1 13 STO D.VUTB+2
6 16 1 162 2 10 144 1 10 TRA SR05
6 16 1 163 2 10 027 1 17 CLA D.VUTB
6 16 1 164 2 10 377 1 00 HOP 777 RETURN X
6 16 1 165 2 10 255 1 17 377777770 SR10 CLA =O377777770 OVERFLOW PROTECTION, SET TO LARGE NUMBER B
6 16 1 166 2 10 377 1 00 HOP 777 RETURN X
* E
* H
# PAGE 1086, NO SOURCE CODE
SQUARE ROOT UTILITY ROUTINE (SR) A0880 PAGE 1086
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: VECTOR_DOT_PRODUCT.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-04-18 RSB Transcribed. 1st page with nano, 2nd page
# with LibreOffice. LibreOffice Writer was a lot
# easier.
# 2023-04-27 RSB P. 1087 added due to guideline changes.
# Number of p. 1088 corrected.
# 2023-04-28 RSB Corrected title of p. 1087.
# 2023-06-19 RSB Fixed typo discovered in assembly.
# 2023-06-21 RSB Added TITLE directive.
# PAGE 1087, SEQUENCE VD000000
SQUARE ROOT UTILITY ROUTINE (SR) A0880 PAGE 1087
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT VD REF VECTOR DOT PRODUCT (VD)
# PAGE 1088, SEQUENCE VD000020-VD000210
VECTOR DOT PRODUCT (VD) A0890 PAGE 1088
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* VECTOR DOT PRODUCT UTILITY (VD) *J
* *
* *
**********************************************************************
* DATE 4 - 23 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE VECTOR DOT PRODUCT MODULE IS
* TO COMPUTE THE DOT PRODUCT OF THE TWO SPECIFIED
* VECTORS.
* ENTRIES U.VD00 - UPON ENTRY DATA WORD GENERATED BY DFW IS
* TO BE IN AC. CONTAINS CLA P, MPY Q.
* P AND Q ARE LOCATIONS OF FIRST COMPONENT
* OF RESPECTIVE VECTORS.
# PAGE 1089, SEQUENCE VD000230-VD000570
VECTOR DOT PRODUCT (VD) A0890 PAGE 1089
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
*U.VD00 U.VD00 S
6 16 1 167 2 10 377 1 13 U.VD00 STO 777 SAVE RETURN LINKAGE B
* (VD10) G
*U.VD01 U.VD01 S
*VD10 SAVE INPUT ARGUMENTS B
6 16 1 170 2 10 200 1 13 U.VD01 STO D.VUEM
6 16 1 171 2 10 220 1 16 EXM 0,1,0 CLA P(1)
6 16 1 172 2 10 200 1 16 EXM 0,0,0 MPY Q(1)
6 16 1 173 2 10 221 1 16 EXM 0,1,1 CLA P(2)
6 16 1 174 2 10 030 1 13 STO D.VUTB+1
6 16 1 175 2 10 375 1 17 CLA 775 FIRST PRODUCT
6 16 1 176 2 10 031 1 13 STO D.VUTB+2
6 16 1 177 2 10 030 1 17 CLA D.VUTB+1
6 16 1 200 2 10 201 1 16 EXM 0,0,1 MPY Q(2)
6 16 1 201 2 10 222 1 16 EXM 0,1,2 CLA P(3)
6 16 1 202 2 10 030 1 13 STO D.VUTB+1
6 16 1 203 2 10 375 1 17 CLA 775 SECOND PRODUCT
6 16 1 204 2 10 032 1 13 STO D.VUTB+3
6 16 1 205 2 10 030 1 17 CLA D.VUTB+1
6 16 1 206 2 10 202 1 16 EXM 0,0,2 MPY Q(3)
6 16 1 207 2 10 027 1 17 CLA D.VUTB
6 16 1 210 2 10 200 1 13 STO D.VUEM SET EXM LOCATION FOR MM
6 16 1 211 2 10 031 1 17 CLA D.VUTB+2 FORM DOT PRODUCT EQ.13.8.1 B
6 16 1 212 2 10 032 1 07 ADD D.VUTB+3
6 16 1 213 2 10 375 1 07 ADD 775 THIRD PRODUCT
6 16 1 214 2 10 377 1 00 HOP 777 RETURN X
* E
* H
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: ARCTANGENT_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-21 RSB Added TITLE directive.
# PAGE 1090, SEQUENCE AT000000
VECTOR DOT PRODUCT (VD) A0890 PAGE 1090
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT AT REF ARCTANGENT UTILITY (AT)
# PAGE 1091, SEQUENCE AT000020-AT000270
ARCTANGENT UTILITY (AT) A0900 PAGE 1091
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* ARCTANGENT UTILITY (AT) *J
* *
* *
**********************************************************************
* DATE 5 - 17 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE ARCTANGENT UTILITY MODULE IS
* TO COMPUTE THE ARCTANGENT OF THE QUOTIENT OF TWO
* SPECIFIED NUMBERS BY MEANS OF AN ALGORITHM WHICH
* UTILIZES A POLYNOMIAL APPROXIMATION TO THE
* ARCTANGENT FUNCTION.
* ENTRIES U.AT00 - ENTERED FROM ANY MODULE.
* ON ENTRY THE ACCUMULATOR MUST CONTAIN
* THE SINE OF THE DESIRED ANGLE (ARG1) AND
* THE PQ REGISTER MUST CONTAIN THE COSINE
* OF THE DESIRED ANGLE (ARG2).
* UPON EXIT THE DESIRED ANGLE, ARCTAN
* (ARG1/ARG2), WILL BE IN THE ACCUMULATOR
* IN PIRADS SCALED B0.
# PAGE 1092, SEQUENCE AT000290-AT000790
ARCTANGENT UTILITY (AT) A0900 PAGE 1092
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
* LIST $
* ARROWLEFT DRAW < $
* ARROWRIGHTDRAW > $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
* U.AT00 S
6 16 1 215 2 10 377 1 13 U.AT00 STO 777 SAVE RETURN LINKAGE AND INPUT ARGUMENTS B
6 16 1 216 001 1 16 SHR 1
6 16 1 217 2 10 030 1 13 STO D.VUTB+1 SIN (ARG1)
BLOCK 4
6 16 1 220 2 10 222 1 14 TMI *+2
6 16 1 221 2 10 223 1 10 TRA *+2
6 16 1 222 2 10 070 1 15 RSU D.KZRO
6 16 1 223 2 10 032 1 13 STO D.VUTB+3 ABS SIN (ARG1)
6 16 1 224 2 10 375 1 17 CLA 775
6 16 1 225 001 1 16 SHR 1
6 16 1 226 2 10 031 1 13 STO D.VUTB+2 COS (ARG2)
BLOCK 4
6 16 1 227 2 10 231 1 14 TMI *+2
6 16 1 230 2 10 232 1 10 TRA *+2
6 16 1 231 2 10 070 1 15 RSU D.KZRO
6 16 1 232 2 10 033 1 13 STO D.VUTB+4 ABS COS (ARG2)
6 16 1 233 2 10 032 1 07 ADD D.VUTB+3
6 16 1 234 2 10 034 1 13 STO D.VUTB+5
6 16 1 235 2 10 033 1 17 CLA D.VUTB+4
6 16 1 236 2 10 032 1 02 SUB D.VUTB+3
6 16 1 237 001 1 16 SHR 1
6 16 1 240 2 10 034 1 03 DIV D.VUTB+5
6 16 1 241 2 10 250 1 17 CLA D.KB24
BLOCK 3
6 16 1 242 2 10 276 1 02 SUB D.KB25
6 16 1 243 2 10 244 1 10 TRA *+1
6 16 1 244 2 10 242 1 04 TNZ *-2
6 16 1 245 2 10 375 1 17 CLA 775
*
* V = (ABS (ARG2) - ABS (ARG1)) / (ABS (ARG2) + ABS (ARG1))
*
6 16 1 246 2 10 033 1 13 STO D.VUTB+4 SAVE V
6 16 1 247 2 10 033 1 05 MPH D.VUTB+4
6 16 1 250 020 1 16 SHL 1 RESCALE
6 16 1 251 2 10 034 1 13 STO D.VUTB+5
* PERFORM ARCTANGENT ALGORITHM EQ.13.3.1 B
MPH =(P.AT11)B-6 T= V**2 * C11
6 16 1 252 2 10 155 0 05 702676246 + MPH =-0.0037309738B-6 T= V**2 * C11
ADD =(P.AT9)B-5 T=T+C9
6 16 1 253 2 10 156 0 07 211230654 + ADD =0.016760072B-5 T=T+C9
6 16 1 254 2 10 034 1 05 MPH D.VUTB+5 T = T * V**2
ADD =(P.AT7)B-4 T=T+C7
6 16 1 255 2 10 157 0 07 550143722 + ADD =-0.037061734B-4 T=T+C7
6 16 1 256 2 10 034 1 05 MPH D.VUTB+5 T = T * V**2
ADD =(P.AT5)B-3 T=T+C5
6 16 1 257 2 10 160 0 07 176127322 + ADD =0.0616068B-3 T=T+C5
6 16 1 260 2 10 034 1 05 MPH D.VUTB+5 T = T * V**2
# PAGE 1093, SEQUENCE AT000800-AT001040
ARCTANGENT UTILITY (AT) A0900 PAGE 1093
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
ADD =(P.AT3)B-2 T=T+C3
6 16 1 261 2 10 161 0 07 623451620 + ADD =-0.10587734B-2 T=T+C3
6 16 1 262 2 10 034 1 05 MPH D.VUTB+5 T = T * V**2
ADD =(P.AT1)B-1 T=T+C1
6 16 1 263 2 10 162 0 07 242761102 + ADD =0.31830264B-1 T=T+C1
6 16 1 264 2 10 033 1 05 MPH D.VUTB+4 T = T * V
6 16 1 265 2 10 033 1 13 STO D.VUTB+4
*
* T = V*(C1 + V**2*(C3 + V**2*(C5 + V**2*(C7 + V**2*(C9+V**2*C11)))))
*
6 16 1 266 2 10 031 1 17 CLA D.VUTB+2 COS (ARG2)
6 16 1 267 2 10 273 1 14 TMI AT100 NEG = II , III QUADRANT
CLA =(P.P45)B0
6 16 1 270 2 10 220 1 17 100000000 + CLA =0.25B0
6 16 1 271 2 10 033 1 02 SUB D.VUTB+4 45 DEG - ARCTAN (ARG1/ARG2)
6 16 1 272 2 10 275 1 10 TRA AT200
AT100 CLA =(P.P135)B0 135 DEG - ARCTAN (ARG1/ARG2)
6 16 1 273 2 10 163 0 17 300000000 + AT100 CLA =0.75B0 135 DEG - ARCTAN (ARG1/ARG2)
6 16 1 274 2 10 033 1 07 ADD D.VUTB+4
6 16 1 275 2 10 033 1 13 AT200 STO D.VUTB+4
6 16 1 276 2 10 030 1 17 CLA D.VUTB+1 SIN (ARG1)
6 16 1 277 2 10 302 1 14 TMI AT300 NEG = III , IV QUADRANT
6 16 1 300 2 10 033 1 17 CLA D.VUTB+4
6 16 1 301 2 10 377 1 00 HOP 777
6 16 1 302 2 10 070 1 17 AT300 CLA D.KZRO 0 DEG - ARCTAN (ARG1/ARG2)
6 16 1 303 2 10 033 1 02 SUB D.VUTB+4
6 16 1 304 2 10 377 1 00 HOP 777 RETURN X
* E
* H
# PAGE 1094, NO SOURCE CODE
ARCTANGENT UTILITY (AT) A0900 PAGE 1094
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: FIXED_POINT_DIVIDE_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-21 RSB Added TITLE directive.
# PAGE 1095, SEQUENCE FD000000
ARCTANGENT UTILITY (AT) A0900 PAGE 1095
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT FD REF FIXED POINT DIVIDE UTILITY (FD)
# PAGE 1096, SEQUENCE FD000020-FD000390
FIXED-POINT DIVIDE UTILITY (FD) A0910 PAGE 1096
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* FIXED POINT DIVIDE UTILITY (FD) *J
* *
* *
**********************************************************************
* DATE 4 - 23 - 68
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE FIXED POINT DIVIDE ROUTINE IS
* TO PERFORM A DIVIDE OPERATION WITH THE SPECIFIED
* INPUTS.
* ENTRIES U.FD00 - NUMERATOR TO BE IN AC. AND DENOMINATOR
* IN D.VUTB. QUOTIENT WILL BE IN PQ
* AND AC ON EXIT.
* LIST $
* ARROWRIGHTDRAW > $
* ARROWLEFT DRAW < $
* ARROWDOWN DRAW V $
* SYMBOL DRAW . $
ORG P.MOD,C.UT
*Q *
* U.FD00 S
6 16 1 305 2 10 377 1 13 U.FD00 STO 777 SAVE RETURN LINKAGE B
6 16 1 306 2 10 027 1 03 DIV D.VUTB PERFORM DIVIDE B
6 16 1 307 2 10 250 1 17 CLA D.KB24 DELAY FOR DIVIDE EXECUTION TIME B
BLOCK 3
6 16 1 310 2 10 276 1 02 SUB D.KB25
6 16 1 311 2 10 312 1 10 TRA *+1
6 16 1 312 2 10 310 1 04 TNZ *-2
6 16 1 313 2 10 375 1 17 CLA 775 PLACE DIVIDE RESULT IN ACCUMULATOR B
6 16 1 314 2 10 377 1 00 HOP 777 RETURN X
* E
* H
... Pages removed ...
# Copyright: Public domain.
# Restrictions: This file is being treated as unrestricted by ITAR, since it
# relates only to commonly-known mathematical methods non-specific
# to the launch vehicle.
# Filename: SCALE_DIVIDE_UTILITY.lvdc
# Purpose: This is a portion of LVDC flight program AS-512, as
# transcribed directly from the assembly listing.
# The transcription does not include individual line
# numbers, but does indicate the range of card sequence
# numbers for each page of the listing.
# Assembler: yaASM.py
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo/LVDC.html
# Page images: Inquire
# Mod history: 2023-04-01 RSB Created.
# 2023-05-12 RSB Transcribed but not proofed.
# 2023-06-21 RSB Added TITLE directive.
# 2023-07-02 RSB Typo correction.
# 2023-07-23 RSB Added FLOW.
# PAGE 1117, SEQUENCE SD000000
GRAVITATION ACCELERATION (GR) A0940 PAGE 1117
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
$SEGMENT SD REF SCALE DIVIDE UTILITY (SD)
# PAGE 1118, SEQUENCE SD000020-SD000520
SCALED DIVIDE UTILITY (SD) A0950 PAGE 1118
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
**********************************************************************
* *
* *
* SCALE DIVIDE UTILITY (SD) *J
* *
* *
**********************************************************************
* DATE JUNE 1, 1968
* REVISIONS NONE
* FUNCTION THE FUNCTION OF THE SCALE DIVIDE UTILITY ROUTINE IS TO
* COMPUTE AS ACCURATELY AS POSSIBLE A SCALED QUOTIENT OF
* TWO SPECIFIED NUMBERS WHICH ARE NOT IDENTICALLY SCALED.
* ENTRY U.SD00 - ENTER TO COMPUTE THE SCALED QUOTIENT OF TWO
* SPECIFIED NUMBERS. THE FOLLOWING MUST HAVE
* BEEN SETUP BEFORE ENTRY
*
* 1. ACC - NUMERATOR
* 2. PQ - DENOMINATOR
* 3. D.VUTB+1 - SCALING OF NUMERATOR. THIS SCALE
* FACTOR MUST BE SCALED B25
* 4. D.VUTB+2 - SCALING OF DENOMINATOR. THIS
* SCALE FACTOR MUST BE SCALED B25
* 5. D.VUTB+3 - DESIRED SCALING OF QUOTIENT TO
* BE RETURNED IN THE ACCUMULATOR.
* THIS VALUE, ITSELF, MUST BE
* SCALED B25.
*
* THE SCALED DIVIDE ROUTINE NOT ONLY EXECUTES THE
* DIVIDE AND THE APPROPRIATE DELAY, BUT HANDLES
* ALL SCALING PROBLEMS. THE ROUTINE FIRST SHIFTS
* BOTH THE DIVIDEND AND DIVISOR AS FAR LEFT AS
* POSSIBLE WITHOUT OVERFLOWING INTO THE SIGN BIT
* AND UPDATES THE SCALING ACCORDINGLY. THIS ALLOWS
* MAXIMUM ACCURACY IN THE DIVISION PROCESS. IF THE
* NUMERATOR IS LARGER THAN THE DENOMINATOR, THE
* NUMERATOR IS SHIFTED BACK TO THE RIGHT SO THAT
* THE REGISTER CAN CONTAIN THE COMPLETE QUOTIENT.
* SCALING IS AGAIN UPDATED. IN ORDER TO PLACE THE
* QUOTIENT IN THE DESIRED SCALING, THE ROUTINE
* DETERMINES THE DIFFERENCE BETWEEN THE PRESENT
* QUOTIENT SCALING AND THE DESIRED SCALING AND
* SHIFTS RIGHT OR LEFT ACCORDINGLY. IF THE
* DENOMINATOR IS ZERO, THE ROUTINE RETURNS THE
* LARGEST POSSIBLE VALUE AS QUOTIENT. A ZERO
* NUMERATOR WILL ALSO BE DETECTED. BY COMPARING
* THE SIGN BITS OF THE DIVISOR AND DIVIDEND, THE
* SIGN OF THE ANSWER WILL BE DETERMINED.
# PAGE 1119, SEQUENCE SD000530-SD001030
SCALED DIVIDE UTILITY (SD) A0950 PAGE 1119
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
* LIST
* ARROWDOWN DRAW V
* ARROWRIGHTDRAW >
* ARROWLEFT DRAW <
* SYMBOL DRAW .
ORG P.MOD,C.SD
*Q *
6 17 0 355 2 15 377 1 13 U.SD00 STO 777 U.SD00 S
6 17 0 356 2 15 033 1 13 STO D.VUTB+4 SAVE RETURN LINKAGE AND INPUT ARGUMENTS B
6 17 0 357 2 15 375 1 17 SD000 CLA 775
6 17 0 360 2 15 034 1 13 STO D.VUTB+5
6 17 0 361 2 15 033 1 11 XOR D.VUTB+4
6 17 0 362 2 15 035 1 13 STO D.VUTB+6 DETERMINE SIGN OF ANSWER B
* FORCE NUM. AND DEN. TO POSITIVE VALUES B
6 17 0 363 2 15 033 1 17 CLA D.VUTB+4
6 17 0 364 2 15 070 1 15 RSU D.KZRO
6 17 0 365 2 15 367 0 14 TMI SD01 IS NUMERATOR POSITIVE
6 17 0 366 2 15 033 1 13 STO D.VUTB+4
6 17 0 367 2 15 034 1 17 SD01 CLA D.VUTB+5 IS DENOMINATOR POSITIVE
6 17 0 370 2 15 070 1 15 RSU D.KZRO
6 17 0 371 2 15 373 0 14 TMI SD011
6 17 0 372 2 15 034 1 13 STO D.VUTB+5 COMPLEMENT DENOMINATOR
6 17 0 373 2 15 034 1 17 SD011 CLA D.VUTB+5 IS DENOMINATOR ZERO Q
6 17 0 374 2 15 001 1 10 *
6 17 1 001 2 15 003 1 04 TNZ SD012
6 17 1 002 2 15 075 1 10 TRA SD024 Y
* DELETE
6 17 1 003 020 1 16 SD012 SHL 1 RESCALE DENOMINATOR FOR MAXIMUM ACCURACY B
6 17 1 004 2 15 012 1 14 TMI SD013
6 17 1 005 2 15 034 1 13 STO D.VUTB+5
6 17 1 006 2 15 031 1 17 CLA D.VUTB+2
6 17 1 007 2 15 276 1 02 SUB D.KB25
6 17 1 010 2 15 031 1 13 STO D.VUTB+2
6 17 1 011 2 15 373 0 10 TRA SD011
6 17 1 012 001 1 16 SD013 SHR 1 REPAIR DENOM, SHR 1 AND RESTORE SIGN
6 17 1 013 2 15 254 1 06 377777776 AND =O377777776
6 17 1 014 2 15 034 1 13 STO D.VUTB+5
6 17 1 015 2 15 033 1 17 SD014 CLA D.VUTB+4 IS NUMERATOR ZERO Q
6 17 1 016 2 15 020 1 04 TNZ SD015 N
6 17 1 017 2 15 377 1 00 HOP 777 RETURN X
6 17 1 020 020 1 16 SD015 SHL 1 RESCALE NUMERATOR FOR MAXIMUM ACCURACY B
6 17 1 021 2 15 027 1 14 TMI SD016
6 17 1 022 2 15 033 1 13 STO D.VUTB+4
6 17 1 023 2 15 030 1 17 CLA D.VUTB+1
6 17 1 024 2 15 276 1 02 SUB D.KB25 UPDATE SCALING ACCORDINGLY
6 17 1 025 2 15 030 1 13 STO D.VUTB+1
6 17 1 026 2 15 015 1 10 TRA SD014
6 17 1 027 001 1 16 SD016 SHR 1 REPAIR NUM, SHR 1 AND RESTORE SIGN
6 17 1 030 2 15 254 1 06 377777776 AND =O377777776
6 17 1 031 2 15 033 1 13 STO D.VUTB+4
# PAGE 1120, SEQUENCE SD001040-SD001540
SCALED DIVIDE UTILITY (SD) A0950 PAGE 1120
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
6 17 1 032 2 15 034 1 02 SUB D.VUTB+5
6 17 1 033 2 15 042 1 14 TMI SD02 WILL QUOTIENT BE A FRACTION Y
6 17 1 034 2 15 033 1 17 CLA D.VUTB+4 FORCE NUMERATOR LT DENOMINATOR AND RESCALEB
6 17 1 035 001 1 16 SHR 1
6 17 1 036 2 15 033 1 13 STO D.VUTB+4
6 17 1 037 2 15 030 1 17 CLA D.VUTB+1
6 17 1 040 2 15 276 1 07 ADD D.KB25
6 17 1 041 2 15 030 1 13 STO D.VUTB+1
*
6 17 1 042 2 15 033 1 17 SD02 CLA D.VUTB+4 EXECUTE DIVIDE B
6 17 1 043 2 15 034 1 03 DIV D.VUTB+5
* RESCALE QUOTIENT AS SPECIFIED B
6 17 1 044 2 15 030 1 17 CLA D.VUTB+1 DETERMINE DEVIATION FROM DESIRED SCALING
6 17 1 045 2 15 031 1 02 SUB D.VUTB+2
6 17 1 046 2 15 032 1 02 SUB D.VUTB+3
6 17 1 047 2 15 036 1 13 STO D.VUTB+7
6 17 1 050 2 15 053 1 14 TMI SD021 IS SCALING TOO SMALL
6 17 1 051 2 15 064 1 04 TNZ SD023 IS SCALING TOO LARGE
6 17 1 052 2 15 077 1 10 TRA SD025 G
6 17 1 053 2 15 036 1 17 SD021 CLA D.VUTB+7 SHIFT RIGHT UNTIL SCALING IS CORREDT
6 17 1 054 2 15 276 1 07 ADD D.KB25
6 17 1 055 2 15 036 1 13 STO D.VUTB+7
6 17 1 056 2 15 060 1 14 TMI SD022
6 17 1 057 2 15 077 1 04 TNZ SD025
6 17 1 060 2 15 375 1 17 SD022 CLA 775
6 17 1 061 001 1 16 SHR 1
6 17 1 062 2 15 375 1 13 STO 775
6 17 1 063 2 15 053 1 10 TRA SD021
6 17 1 064 2 15 036 1 17 SD023 CLA D.VUTB+7 IS SCALING CORRECT YET
6 17 1 065 2 15 276 1 02 SUB D.KB25
6 17 1 066 2 15 036 1 13 STO D.VUTB+7
6 17 1 067 2 15 077 1 14 TMI SD025 XFER IF SCALING IS NOT CORRECT
6 17 1 070 2 15 375 1 17 CLA 775
6 17 1 071 020 1 16 SHL 1 SHIFT QUOTIENT LEFT 1
6 17 1 072 2 15 075 1 14 TMI SD024 XFER IF OVERFLOW OCCURS
6 17 1 073 2 15 375 1 13 STO 775
6 17 1 074 2 15 064 1 10 TRA SD023
*
6 17 1 075 2 15 254 1 17 377777776 SD024 CLA =O377777776 SET QUOTIENT TO LARGE POSITIVE VALUE B
6 17 1 076 2 15 375 1 13 STO 775
*
6 17 1 077 2 15 035 1 17 SD025 CLA D.VUTB+6 PLACE SIGN ON QUOTIENT B
BLOCK 5
6 17 1 100 2 15 103 1 14 TMI SD027
6 17 1 101 2 15 375 1 17 SD026 CLA 775 STORE QUOTIENT IN THE ACCUMULATOR B
6 17 1 102 2 15 377 1 00 HOP 777 RETURN
6 17 1 103 2 15 375 1 17 SD027 CLA 775
6 17 1 104 2 15 070 1 15 RSU D.KZRO COMPLEMENT ANSWER
6 17 1 105 2 15 377 1 00 HOP 777 RETURN X
* E
* H
# PAGE 1121, NO SOURCE CODE
SCALED DIVIDE UTILITY (SD) A0950 PAGE 1121
IM IS S LOC DM DS A8-A1 A9 OP CONSTANT SOURCE STATEMENT
... Pages removed ...