1034_Signal_Corps_Alegbraic_Translator SALT_Jan61 1034 Signal Corps Alegbraic Translator SALT Jan61

1034_Signal_Corps_Alegbraic_Translator-SALT_Jan61 1034_Signal_Corps_Alegbraic_Translator-SALT_Jan61

User Manual: 1034_Signal_Corps_Alegbraic_Translator-SALT_Jan61

Open the PDF directly: View PDF PDF.
Page Count: 32

Download1034_Signal_Corps_Alegbraic_Translator-SALT_Jan61 1034 Signal Corps Alegbraic Translator-SALT Jan61
Open PDF In BrowserView PDF
RECOMP II USERS' PROGRAM NO.

PROGIWi TITLE:

1034

SIGNAL CORPS RECOr-fP ALGEBRAIC TRANSLATOR - SALT

PROGRAH .CLASSIFICATI ON: Execu ti ve and Control
AUTHOR:

T. J. Tobias
U. S. Army Signal Engineering Agency

Arlington Hall Station
Arlington, Virginia
This program was modified and adapted for use
with a subroutine package - RECOMP II Program
No. ~O - p3_2 byL. Raphael and A. W. England,
and the text was rewritten by R. S. Lynn of
Autonetics Industrial Products.
CHECKED BY:

R. S. Lynn and H. D. Goddard

PURPOSE:

The Signal Corps RECOMP Algebraic Translator
(SALT) is a one pass compiler system which
translates from algebraic statements into a
SCRAP assembly language program. This program
may then be assembled by use of the SCRAP
processor.

DATE:

January 1960

REISSUED:

January 1961

Published by
RECOMP Users 1 Library

at
AUTONETICS INDUSTRIAL PRODUCTS

A DIVISION OF NORTH ANERICAN AVIATION, INC.
3400 E. 70th St., Long Beach 5, Calif.

TABLE
-----

OF

CONTENTS

----~-~-

SUMMARY OF OPERATING INSTRUCTIONS
1. EXPRESSING PROBLEMS IN SALT FORMAT

Page 1

2. SALT STATEMENT GRAMMAR

Page 1 - 12

3. RESTRICTIONS

Page 13

4.
S.

OPERATING INSTRUCTIONS

Page 13 - lS

EX AMP IE

Page 15 - 26

6. CODING INFORr.fATION

Page 27

SUMMARY OF OPERATING INSTRUCTIONS
See § 4 for Greater Detail

1. Load and verify SALT compiler

2. Press Start 1.
3. Type in SALT coding

4.

After the last statement, END$, has been punched, tear ott
and label SALT-punched tape.

S.

Load and verify SCRAP Assembly.

6. Place SALT-punched tape in photoreader.
7 • Set sense antch B on if printout of. first pas s is desired·.
Set sense switch D §. Sense switch C must be !lU.

8. Press Start 1.
9. After END OF FmST PASS is typed, advance several folds of
blank tape and press Start 3. This punches SAVE material.
10. Tear off and label first pass punched tape, and place it in
the photoreader.
11.

Sense switch D is not used. Set sense switch C off. If printed
copy of second pass, including absolute coding, rs-desired, set
sense switch B on. Press Start 2.

12. When second pass has completed punching, tear off and label the
tape.

This is the SCRAP assembled program.

. 13. If the first and second passes were not run sequentially, or it
memory contents were aJ.tered, load SCRAP Assembly, then the
SAVE material. Place first pass punched tape 1n photoreader and
go
step·ll.

to

14.

To use the SCRAP assembled program, load the program tape and PPP-2,
or the single tape containing the assembled p~ogram plus subroutines
from PPP-2. See § 4.3 (h). Set the location counter to the origin,
which is usually 3000.0, and press the Start button.

SIGNAL CORPS RECOMP ALGEBRAIC TRAJISLATOR

SALT

INTRODUCTION
SALT is a RECOMP II program which allows the user to express his
problem in a simple format, eliminating for the user the task of
machine language 'programmi.ng and ooding. SALT translates statements in this simple format to a RECOMP II symbol.ic code fonnat
which is later assembled by the SCRAP program into absolute
machine language. The assembled program ut1~izes relevant subroutines oontained in RECOMP II Program No. ,0, Program Preparation Paokage Number Two.

This combination of programs enables the
is known as "automatic programming."
1.

RECO~fP

II to offer what

, EXPRESSING PROBLEMS IN SAIJT FORMAT

Expressing a probleM in SALT langl1age is much like writing in
standard mathematical notation. Additionally, SALT language is
used to provide for input and output of information. Statements
in SALT language may be grouped as:
1.1

ARITHMETIC STATEMENTS - which are the algebraic equations used in
solving the problem.

1.2

INPUT/OUTPUT STATEMENTS - which provide for input of infomation
from the typewriter or photoread.er and output of infonnation on
the typewriter, and

1.3

'CONTROL STATEMENTS - which are used for transfer of control from
one statement to another in t.he program. Such statements are used
to control repetitions and conditional transfers.

2.

SALT STATEMENT GRAMHAR

SALT statements consist of combinations of numbers, variables,

subscripted variables, functions, expressions, and keywords.

2

2.1.1

NUMBERS

Numbers in SALT are the ordinary decimal numbers, in the corrunon format.
They are .restricted in that they may contain no more than fifteen (15)
characters, oounting the decimal point, if used, as a character.
Neither the integral part nor the fractional part of a number may contain more than eleven (11) characters.
For example,

723.

+7

-7

+7.0
0.006

4.39$3
- •.3362

Plus signs may be omitted
VARIABLES
A variable is an all-alphabetic word containing at most eight (8)

letters. See § 3.1 for restrictions on variable names.

Examples of permissible variables are:

DELTA

X

NSUBSIX

ITEM

SUBSCRIPTED VARIABLES
Subscripted variables have the form V(K) or V(K,J), where V is a
variable and K and J are either numbers or variables. The nanes of a
subscripted variable should contain at most seven (7) letters, because
the assembly program, SCRAP, places a letter K at the beginning of
the subscripted variable name. Using eight (8) letters may not cause
an error in the machine language program, but the assembly printout
will replaoe the first letter with a K, as mentioned above.
Subscripted variables in SALT may refer to elements in a one or a two
dimensional list or table. Examples of proper subscripted variables
are:

MATRIX(I,J)
MATRIX (ROW, COLUMN)
x(5)
I(J)

MATRIX(5 t J)
VECTOR(P)

example of a subscripted variable which is not permitted is
TENSOR (I,J,K). If the user attempts to input a third dimension, the
program will reject the input and result in an error return.
.

An

3

The subscripts themselves may represent ~ixed number values, but only
the integer part is used in the machine language program. SCRAP will
print out the fractional part on the assembly printout if a mixed
nUJ1lber was entered in SALT. However, the machine language pro gram
shifts off the fraction part in computing addresses.

2.1.4

FUNCTIONS
Functions have the form F(E), "Where F is the alphabetic name of a
function, and E is an expression as described under § 2.1.,. The
following £unctions are defined in SALT and SCRAP.

SQRT(E)

means

~

SIN (E)

Sine of E (automatic angle reduction)*

COS(E)

cosine of E (au't,omatic angle rf>1uc tion) *

TAN(E)

tangent of E (automatic angle reduction) *

ARCTAN (E)

Arctangent of E

ARCSIN(!)

Arcsine of E

ARCCOS (E)

Arccosine of E

IDOTWO(E)

log2E

IDO(E)

loglOE (common logarithm)

UJ(E)

log E (natural logarithm)

ABS(E) ,

lEI

e

EXP(E)
EXP'lWO(E)
EXPTEN(E)
E modulo

ANGRED(E)

It,

in radians

*Arguments of trigonometric functions must be in radians.
Additional functions may

'be

defined by the user.

See

96.1.

EXPRESSIONS

An EXPRESSION is a statement element or a combination of elements.
Numbers, variables, subscripted variables and functions are expressions.

4

If X and I are expressions, then the following are also expressions:
+Y

X/I

(means X-:-- I)

-t

I&Y

(means I times I)

X+I

X'I

(means

«X)+(I»

(means 1+1, :i.llustrating use ot
more parentheses than are
required)

Xl)

X-I
(y)

(X)
(-y)

(+1)

Note that using parentheses when not -required is permitted. It the
user attempts t~ input X++Y or any other case of two signs in juxtaposition, the program will reject the statement and error return.
Examples ot expressions are:
,

2

.A&(X·2)+B&X+C

meaning AX +BX +C

(A+Z)/(N-l) - SQRT(2&A)

meaning A+Z

(X(I,J)/K) & ARCTAN(1.710) - I'LOG(K/J)

meaning:!l Arctan 1.770 -

~

-l/2A

X

K
K,

1oglO -:
y
KEYWORDS

Keywords relate elements in SALT statements in a manner that is easier
to illustrate than to define. In the following discussion, a "ta('
refers to a symbolic location assigned to a SALT statement. See '2.1.6.3.

2.1.6.1 ARITHMETIC STATEMENTS
Keywords used in arithmetic statements are:
:
+

&

_/

•
In general,

equality sign
addition
subtraction
multiplication
division
exponentiation
terminates the statement
arithmet~c

Variable:

statements have the form:

expression $

The value of the variable is defined by the expression.

Fo~

example:

LIST(A,B):SQRT(LIST(1,19»+10&ALPHA$
GROUP:GROUP+l$
Arithmetic statements may have a location tag. In the following
examples, MODIFY and COMPUTE are location tags assigned to their
respective statements.
.

MODIFY, X:X-1$
C01~UTE, ELEMENT(5) :EIEMENT(,)/ELEMENT(J)$

arithmetio statement may contain any EXPRESSION that is proper
under the conditions ot § 2.1.5, describing EXPRESSIONS.

An

2.1.6.2 INPUT/OUTPUT STA~rTS
KeYWOrds used for input/output are:
READY; READZ, PRINT, CXP, TAB, and ORR
READY

statements have the form
READY variable$or
READY subscripted variable$
READY statements may have a location tag. One value only is typed in
on a READY statement. Examples of proper READY statements are:
01, READY X$

READY

yt

READY MATRIX(I,J)$
READY TABLE(ITEM,6)$
23, READY DATA$

INPUT,

The format of the value typed in is discussed fully in the descrip. tion for Program Preparation Package Number Two.
These examples of proper formats should make the input format clear.
format is variable, as shown.
+1
-1

1
+1.0

The

7.,3

-4

+3.9599
698.7634

The numbers are typed using the top keys of the typewriter using any
cormnon format for the values. In addition, extremely large or small
values may be inputlgsing the notation reco~zed by AN-007.1.
21+16 means 21 X 10 , 14-10 means 14 X 10- 0. 1.6+6 means 1.6 X 106,
and so on. The form may be expressed +a+b, where "an is any proper
value in common format times 10 to the-+b power, where lal.( 239 _1, and

Ibl-f 511.

- -

6
Tenninate the typing of the value nth a carriage return, tab, space
or blank.
READZ

statements have the form
READZ
READZ

variable$ or
subscripted variab1e$

READZ statements will not carry location tags thru the seoond pass of
SCRAP.
SALT~

Therefore, they may not be addressed by any tag given then in

If it is necessary to address them, a dummy statement before the

READZ statement may be used.

The dummy statement is of the form

tag, CONTlNUE$ or
tag, CRR$
The READZ causes the photoreader to try to read paper tape and to store
the input information in the memory, starting at the location assigned
to the variable. The information may be in any proper mode - N, 0, F,
or L. The tape may be prepared off-line. Atter the last word to be
entered, there must be at least eight (8) spaces, then L2213l CIR S.
The eight spaces allow the logic time to change modes, the L22131 sets
the location counter to looation 221).1, the carriage return acts as an
enter code, and the letter S acts as a start code.
PRINT

statements have the form
PRINT variable$
For example,
PRINT ANSWER$ or
PRINT MATRIX(K,J)$
Print statements may have a location tag. The PRINT statement types
the value of the variable in fixed point format ir the exponent --power
of ten ~- olthe variable is between -13 and +39. Otherwise, the value
is typed in floating point fonnat. Any formatting of output must be
taken care at by the user, as no carriage return nor tab is included in
the PRINT subroutine.

elP

statements have the form
cXP$

The CXP statement may be used as a check-point during program debugging.
~ it will type the absolute memory location of the
OXP command that willoe in the final SCRAP assembled machine language
program, followed by the contents of the A and R registers l.n floating
point format. The A and R are not destroyed. CXP statements may carry
a location tag.

If Sense Switch B is

TAB

statements have the form
TAB$

TAB statements may be tagged.

This conunand causes the typewriter to tab

7

if and only if the tab defeat sW1tch is in the off position.
the typewri tar will carriage return.
CRR

Otherwise,

statements have the form
CRR$
CRR statements may be tagged.

This command causes the typewriter to

letter shift and carriage retum.

2.1.6.3 CONTROL

STA~rTS

A location tag is the symbolic name of a certain location.

Location tags
are involved in most contl~l statements. Tags are either all Arabic
numerals or all alphabetic characters. The numerals may be from 00
through 99. The looation 00 is distinct from O. If more than two digits
are attem.pted asa tag, the SCRAP assembly will cut off and ignore the
excess leading numerals. As many as eight alphabetic oharacters may ~e
used for a tag. Array and routine names Should be restrioted to seven
letters, because the SCRAP program places a K or an R in front of the
name, and if there are already eight letters, a misspelling will occur.
This does not necessarily cause an error in the final machine language
problem, however. A tag identifying a statement is followed by a comma,
as in the examples
DONE,GO TO FINISH$
l8,K:K+M$

GO TO

statements are of the form
GO TO tag$ or
GO TO tag$
The GOTO statement may be tagged. This statement unconditionally
transfers control to the location specified by the tag in the address.
Examples of GOTO statements are

23, GOTO START$

GOTO 14$
ENDPASS, GO TO ITERATE$

IF

statements have two forms;
(a)
(b)

IF (expression) minus, zero, plus $
IF (SENSE n) 2,.1;, ~$

These statements may be tagged.
the parentheses. They need not
the same, or all three for that
of these locations according to

In fom (a), three location tags follow
be distinct; that is, two tags may be
matter. Control is transferred to one
the value of (expression).

In form (b), n stands forB, C, or D, referring to the three sense switches
on the console. Two location tags follow the parentheses. Control is
transferred to one of these locations according to the condition of the

8

sense switch referred to.

Examples of proper IF statements are

TEST,IF(X-3.4) REDO,REDO,OUT$

IF(SENSE D) OUTPUT,ITERATE$
In the first example, if X-3.4 is negative or zero, control is transferred to location REDO. If x-3.4 is positive, control is transferred
to OUT. In the second example, if sense switch D is on, control is
transferred to OUTPUT. Otherwise, control is transferred to ITERATE.
DO

statements have the form

DO tag FOR variable 1.1.(inc.)u.l.'
The DO atatement controls iteration loops~ The variable may be a
vanable or a subscript. The value of the variable goes .from 1.1.,
lower limit, to u.l, upper limit, by increments of inc. The tag specifies
the last statement in the range ot the DO statement. For example,
LOOP, DO SWITCH FOR K l(l)M$ means "perform all statements starting just past the DO statement down to and
including the SWITCH statement, with K-l the first time,
X-2 the second time, and so on until incrementing K by 1
would make it greater than. M." -

DO ITERATE FOR K 1(2)7$
FUNCTION: THETA(K)/SIGMA(K)$
cRR$
PRINT FUNCTICti$

TAB$
ITERATE, PRINT K$

This DO loop would print out

(actual value of function)
9
9

9

11CIi

1.0000000000

10-3

3.0000000000

3

5/

0-,

/07

97

5.0000000000
7.0000000000

Do loops may be contained wi thin the range of another DO loop.

simple example is
DO OUTPUT FOR K 1(1) 3 $ - - - - - - ___ Range

DO OUTPUT FOR J 1(1)4$~

PRINT MATRIX(K,J)$
QUTPUT,CRR$

Range of
inner loop

of

outer loop

A

9

This would print
Mll

M12
M13

M14
M2l '.
M22
. M23

•

•
•

Note that the inner DO loop is done before control ~s transferred to
the outer 00 loop. The DO loops are said to be "nested."
Note some restrictions on the use of DO loops. In the diagrams, the
brackets represent the range of statements under control of a DO
statement.
(a)

If the range of a DO statement includes another DO
statement, all statements in the range of this second
statement must also be in the range of the first DO
statement.
Permitted

Not Permitted

10

(b)

No transfer of control by IF or GOTO statements is permitted
into the range of any DO statement from outside its range,
since such transfers would not permit the DO loop to be
properly indexed.
Permitted

[=/

Not pennitted

~

L(c)

The last statement in the range of a DO loop may not be an
A CONTINUE statement may be used as

IF or a GOTO statement.
a dummy last statement.

STOP

statements have the form
STOP$
A STOP statement may be tagged. A halt is generated in the final machine
language program. The STOP should be used only at the end of a program,
usually, because it is not possible to continue the program after.a
STOP merely by pressing start button. The location counter would have
to be changed before the program could be continued.

CONTINUE statements usually have the form
tag, CONTlNUE$
CONTINUE statements are dummy statements Which are used as last statements in a DO loop instead of an IF or OOTO, and as a means of tagging
an ARRAY or READZ, which may not be directly tagged. . For example:
START, CONTINUE$
ARRAY REGION(5,lO)$
RDZ, CONTlNUE$
READZ DATA$
ARRAY

statements have the form
or

ARRAY subscripted variable (items)$
ARRAY subscripted variable (rows, columns) $

11

ARRAY statements may not be directly tagged, but may be addressed
using a dummy statement, as described in the preceding paragraph.
ARRAY statements save storage space tor vectors and matrices, which
are to be defined and used in the program. ARRAY statements must come
before any reference ~atsoever to a subscripted variable, and it is
provident to make all ARRAY statements the first statements in a SALT
program.
ARRAY LIST (2.3)$ would save storage tor 23 fioating point values in a

region called LIST. ARRAY TABLE (5,6)$ would save storage for 5 X 6 • 30
floating point values in a region called TABIE.

PAUSE

statements have the.unique form
PAUSE$
The SCRAP assembly will halt at this point in the program. For use
of this special instruction, see the SCRAP program description.

ENTER SCRAP statements have the unique form
ENTER

SCRAP$

This permits the typing of SCRAP coding in the manner described in the
SCRAP program description. One enters SCRAP coding to accomplish that
which may not be done with SALT statements., The SALT compiler ordinarily
generates SCRAP coding for assembly by the SCRAP program. There are no
provisions in SALT for generating alphanumeric output. This problem is
solved by entering the proper SCRAP coding directly, using the ENTER SCRAP
statement.
To input SCRAP coding, set margins at 10 and 90, and tab stops at 20, 35,
and 50. Suppose that two function values had been computed using regular
SALT coding; say X and X prime. Let these values be in symbolic locations
X and XPRIME. The SALT and SCRAP coding to label and output these values
could be:

CRR$
ENTER SCRAP$
. tab
tab
tab
tab
tab
tab
tab
tab
tab
tab
GO TO SALT

tab
tab
tab
PRINT tab
tab
CRR
CL.A
tab
tab
TYA
tab
FCA
PRItTT tab
tab
HALT
tab
tab
CLA
TYA
FeA

A
N

A

N

tab
tab
tab
tab
tab
tab
tab
tab
tab
tab
tab

L/S X F/S:
7760

X
L/S X F/S •
7760
XPRIME

C/R
C/R
C/R
C/R
C/R
C/R
C/R
C/R
C/R
C/R
C/R

12
In the above coding, L/S means letter shift, Fls means tigure shift,
and c/R means carriage return. The address 1160 1s a special" code
used to type alphanumeric characters. No more than 8 characters including shifts may be in the heading. A and N are codes to identify the
information that tollows the tab. "Tab" means depress the tab key. The
mnemonic codes CLA, TYA, ~tc., are typed in as shown. Depressing the
carriage return key terminates each line of SCRAP coding.
Always return to SALT to make an END$ statement.
accepted after the line of SCRAP coding:
·GOTOSALT
'ROUTINE

tab

tab

tab

SALT. statements are

CIR

statements have the unique form
ROUTINE name$
where "name" is the name of the subroutine. This statement allows the
construction of very simple subroutines. The use is illustrated 1n the
deSCription of the RETURN statement.·

RETURN

statements have the form
RETURN name$
where "name" is the name of the subroutine. The RETURN statement may
be tagged with the permissible numerals or up to 1 alpha characters.
Examples of ROUTINE and RETURN statements are

ROUTINE FOFX$
Y:(BETA & X') +(BETA -7) & XI 2)'(BETA-2)$
RETURN FOFX$
or

ROUTINE FACTOR$
•

• ( subroutine)

•

GOBACK, RETURN FACTOR$
\ihen a subroutine is to be used, it is entered with a GOTO name statement
or an IF statement. The SALT statements defini~g a subroutine should be
near or at the end of the SALT program, after a STOP or GOTO statement
which would prevent control passing sequentially to the coding in ROUTINE.
In other words, do not place ROUTINE definition in the middle of a program, unless care is taken to transfer control around the routine.

END

statements have the unique form

END$
This must be the very. last statement in every SALT program.
It.Lll not accept further statements.

The compiler

13

3.

RESTRICTIONS

3.1

The following letter oombinations may not be used as names or variables
or subsoripts.
(a)

the single letter C

any function name defined in SALT or SCRAP
.any symbolic command or pseudo-operation code defined in
SALT or SCRAP, such as CLA or HALT.
(d) . 'the name of any array prefixed by a K or an R. If, for
examp1~,VECTOR is a subscripted variable, do not use
RVECTOR or KVECTOR.
(e) the name of any subroutine prefixed by an R. If ROUTI~lE
SORT is defined in the program, do not use RSORT.
(r) any location tag

(b)
(c)

3.2

Certain restrictions must be recognized in the use of tags.
(a)

(b)

Tags must be all alpha characters -- up to eight letters
or all Arabic numerals -- from 00 to 99. Note that 00 is
a different tag from 0, as 01 is different from 1.
Do not use tags on a READZ statement or an ARRAY statement.

No statement oontaining an arithmetic expression may contain more than
128 variables, numbers, and keywords.

OPERATING INSTRUCTIONS
Load SALT tape. The memory will be cleared by a short program at the
beginning of the tape, after which the tape will continue to load.
The tape may be verified by placing the tape in the photoreader past the
short memory zero program and pressing the Verify button.
Set typewriter margins at 10 and 90. Set tab stops at 20,
'Set tab override switch in. the ?~ position.

35, and 50.

Advance at least two folds of blank tape.
Press Start 1 to begin.

TIPrNG STATEMENTS
4.2.1

The ALPHA light must be Q.!! and the COMPUTE light off before typing each
character.
Each number or name must be separated by a space, figure shift, letter·
shift, or carriage return. A tab does not separate.
The symbols + - & / ( ) I : $ and comma are individually recognized if
they are the first symbols of a new' field, but not when contained within
afield.
.
Typing extra spaces, letter shifts, figure shifts, or carriage returns
is permitted, where they do not change the total meaning.

14

Examine each stat~ent for errors. If there are none, type $ symbol
to enter the statement. If' errors are discovered, type "line teed"
symbol next .to the M key, and type in the correc~ statement.' 11' an
error is recognized after the $ has been typed, and before the tape
has begun to punch, it may be corrected by depressing the stop button,
error reset button, and Start 1. Enter the correct statement. If
the incorrect statement has started punching, there is no remedy but
to start the whole operation over again, back to 94.1.1. It is
possible sometimes to patch the error by SALT statements which will
nullify the error, or to correct the error during the SCRAP first pass,
but in general, this is difficult and perhaps unrewarding. If the
compiler program finds format errors in the statement, there will be an
ERROR printout. Discover source of. error, usually one of field termination or parenthesis usage, and retype the correct statement.
If there is an output error due to fast typing, press Error Reset button,
Start 1, and retype the statement.
If it is desired to enter SCRAP coding, the SCRAP program description
should be consulted. For simple typing of labels, see remarks under
ENTER SCRAP statement.
TERHINATION - Every SALT program must end· with the statement END$.
USing SCRAP assembly program
It is not necessary to be familiar with SCRAP to be able to process
most SALT programs. The procedure for using SALT and SCRAP is essentially
as follows:
(a)

Load SALT compiler tape, and type in the SALT statements
making up your program. After the last statement has been
punched, advance several folds of leader and tear off the
tape, leaving at least 2 folds for the next tape. It is
provident to write "SALT output,
program"
on the tape punched by the SALT compiler program. Reset
the margins and tabs if they have been changed.

(b)

Load the SCRAP Assembly tape. Set sense switch C off. Set
sense switch B on if printout of the first pass of SCRAP is
desired. The assembly is very much faster if B is off. Turn
sense switch D on. This will make 'absolute assignment of
symbolic locations on the first pass.

(c)

Place the SALT punched output tape in the photo reader and
press Start 1.

(d)

After the typewriter prints END OF FIRST PASS, advance
several folds of blank tape, and press Start 3. This is the
SAVEroutlne of SCRAP. This is necessary in order to per~
form the second pass of the assembly in the event the
computer memory contents will be changed between passes.

15
It is improvident to ignore this procedure. After the
SAVE material is punched, sdvance several folds of ieader
and tear off the first pass output. Leave at least 2 folds
ot tape for the next. ~~'+put leader. Label this tape "SCRAP
FmST. PASS,
program" to avoid confusing it with
the 5 other tapes which Will be around the computer.
(e)

Sense switch C must be oft. Place the SCRAP FIRST PASS tape
in the photoreader and press. Start 2. If there has been any
change in the contents of computer memor,y since the first
pass was punched, relor..d the SCRAP Assembly program, then the
SAVE tape, then place the SCRAP FIRST PASS tape in the photoreader and press Start 2.

(f)

~en

(g)

The final program is not yet in memory. If it is desired to
try the program, it must be read in through the photoreader.
Then it. may be redumped with any dump routine if desired. After
loading the final program, load PPP-2, RECOMP II Program No.
This will halt at 3000, the starting point of the f'inal program.
Press Start to begin.

the second pass is completed, the absolute machine language
tape has been punched. Tear off and label this tape with the
name of the program. This tape will be much shorter than
either the SALT output or the SCRAP FIRST PASS tape. This
final tape will be in command format if sense switch B was ~
and in the more compact alpha format if sense switch B was off.

,0.

(h)

,.

If it is desired to have the entire program on a single tape,
see the description of PPP-2 for the procedure of punching those
subroutines utilized. When this is done, be certain to punch
also the calling sequence regions.

EXAMPLE

An·example of the use of.SALT and SCRAP coding to solve a Mortgage Amortization problem is shown. The first and second passes of the assembly are
included.
It is desired to compute the month~ payment on a loan, and to obtain a
complete amortization schedule including payment number, principal,
interest, and new balance. The formulas to compute the desired results
may be found in standard textbooks on the subj~ct.
The relationships may be expressed as:
Monthly rate (MONRATE)-yearly rate ";'12.

+

Monthly payment (MONPAY)-balance x monthly rate
(l-(monthly rate +1) -~1)
where N is the number of monthly payments.
Interest (INTEREST)-balance x monthly rate.
Principal (PRINCIPL)-monthly payment - interest.
Balance {BALANCE)-balance - principal.

16
The monthl1 payment will remain constant, the interest and balance for
each month become less, and the principal becomes greater.
.
In SALT cOding, these relationships may be expressed as:

, MONRATE :RATE/l2$
MONPAY:(BALANCE&MONRATE)/(l-MONRATE+l)'N)$
INTEREST: BALANCE&MONRATE$
PRINCIPL:MONPAY-INTEREST$
BALANCE:BALANCE-PRINCIPL$
These arithmetic statements are use~ in the SALT coding in the order
shown. MONRATE and MONPAY are computed only once. The INTEREST,,'
PRINGIPL, and BALANCE are computed for each month, under the control
ot a DO statement. The DO statement contains the lower and upper limits
ot the paymen~ number, and the amount by which it is incremented.
SALT language may not be used to output headings.
SCRAP language must·be used for this purpose.

The more detailed

Explanation ot Mortgage Amortization Program Coding
The tag START is used at the beginning to permit repetition of the program with new data. SCRAP must be entered to type alphanumeric information. In the line of coding tagged !REF, the letter shift (L/S) might
have been omitted, because after the initial carriage return, the typewriter is left in letter shift. In line BREF, the spaces (sp) are for
appearance. Similarly, other spaces in alphabetic type addresses are
used to position the output. Blanks (b) are typed to make a total ot
8 characters. The code 777n or 776n is used to specify the number ot
characters to be typed. An-n of zero speQifies 8 characters. From 1
'thru 7 characters are specified by an n of 1 thru 7 respectively.
After SCRAP is entered the second time, note that no L/S is used before
MONTHLY because the CRR leaves the t,rpewriter in letter shift. The CRR
macro types a L/S c/R. , .
,
The 3 READY commands are for the purpose of entering, trom the typewriter,
the balance, rate andN when using the final assembled program.
The command pair

CIA
STO

C
N

+0006020+5705300
2256

modifies the output subroutine oalling sequence to allow 6 places to the
lett of the decimal point, and 2 places to the right.
The DO statement specifies the first payment number as 1, and increments
this number by 1 each time the statements in the loop are performed, until

17
the' computations for the Nth payment are performed. The program then
transfers to START, and the program may be repeated with new information
it desired.
In the Assignment Table of the first pass printout, the alpha characters
designa ted by ALFCNO" ALFCN06, ALFCnO, and ALFCN12 are printed in,
figure shift rather than letter shUt. This is not an error. The typewritar is left in figure shift after typing the figures (XX) of' any
ALFt:NXX. The alpha characters of the other ALFCN words are in letter
shift' because a letter shift was typed at the beginning of each of the
address fields.
In the sample problem, 1200 was entered atter BAIA~E $ was typed, .09
was 'entered atter RATE was typed, and 24' was entered after N was typed.

18

START,CRR$
ENTER SCRAo$
AREF"
CLA
,
·TYA
BREF"
CLA .
TYA
READY
F"ST

CLA

TYA
READY

A ~BALANCE
N

.77!Ob J, b b
..,jt!
77 4

A

~

·N

A~

N

7m
RATE

F"ST

CLA
TYA
READY

BALANCE
RA TE 4-p.Af'

~N ~ ..4f

A

7774

N

F"ST

1 . , ,

bhbo

N

GOTOSAL T

MONRATE:RATE/12$
MONnAY:(BALANCE&MONRATE)/(l-(MONRATE+l)'(-N»$
ENTER·SCRAo$
CRR
CLA
TYA
CLA
TYA
CLA

C

STO

N

F"CA
PRINT
eRR
CRR
CLA
TYA
CLA
TYA
TAB
. CLA
TYA
CLA
TYA
TAB
CLA
TYA
CLA
TYA

A
N
A

MONTHLY 4f'

N

7777

70
71
P YMENT"

+0006020+5705300
2256 .
MONPAY

A
N

A
N
L

A~4f?Af''-4f".,.PR

N
A

N

7770

INCI PAL

7771

A .~ 4f.J'f·'f4p I NT
N
A

7770
£R£ST bbb

N

7775

19

GOTOSALT

TAB
CLA
TVA
CLA'
TYA

CRR$
DO DONE FOR PAYMENT l(l)N$
PRINTPAYMENT$
TAB$
INTEREST:BALANCE&MONRATE$
PRINCIPL:MONPAY-INTEREST$
PRINT' PRINCrPL$
TAB$
PRINT INTEREST$
BAlANCEIBAlANCE-PRINCIPL$
TAB $
PRINT BALANCE$
DONE,CRR$
GO TO·START$
EN)$

20

LOCATION
START
. AREr:. BREF"

r.OMMAN:>

ORG
CRR
CLA
TVA
CLA
TYA
READY
f"ST
. CLA
TYA.
READY
f"ST
CLA
. TYA
. READY
f"ST
f"CA
F'DV

F'ST
f"es
f"ST
·F'CA
~

F'MP
EX?
rST
rCA
FSB

rST
reA
FMP

rov
rST

CRR
eLA.
TYA
CLA
TYA
eLA

.STA

+3000

+nr .
(BALANCE)

( ~
+77

BALANCE
(RATE )

+m7
RATE
(N

+777

~

N
RATE

(+12)

MONRATE
N
STORE01
MONRATE

F"AD

LN

. ADDRESS

'reA
PRINT
eRR

(+1 )

STORE01
STORE01
(+1 )

STOREOl
STORE01
BALANCE
MONRATE
STORE01
. MONPAY
(MONTHLY)

0
+7,17
(PYMENT)

+7666
(+
6020+57053OQ
+2256
MONPAY

21

LOCATION COM'-1AN:>

TAG 01

DONE

CRR
CLA
TVA
CLA
TYA
TAB
CLA
TYA
CLA
TYA
TAB
CLA
TVA
CLA
TYA
TAB
CLA
TYA
CLA
TYA
CRR
rCA
rST
rCA
PRINT
TAB
rCA
F'MP
F'ST
rCA
F'SB
F'ST
rCA
PRINT.
TAB
rCA
PRINT
rCA
F'SB
F'ST
TAB
F'CA
PRINT
eRR

ADDRESS
(

)

.

rij~~NT)

+1770
(

PR)

r7~l?PAL)

+7777
(

INT)

+[lJO
( ST)
+m5
(

)

rnl~NCE)

+7770
(+1 )

PAYMENT
PAYMENT

BALANCE
MONRATE
INTEREST
MONPAY
INTEREST
PRfNCIPL
PRfNCfPL
INTEREST
BALANCE
PRINCIPl
BALANCE
BALANCE

22
F'CA

PAYMENT

FST

PAYMENT

(*, )

FAD

F'SB

N

1M1

TAG 01+00001

TZE
TRA

START

TAG 01+00001

EN)

ALF"CNOI
ALF'CN02
ALF"CN03
ALF'CNOij.
F"LOCNOl
.F"LOCNQ2
A.'LF'eNOS
ALF"CN06
COMCNOl
A. LF"CN07
AlF"CNoB
.. ALF"CN09
ALF'CN10
ALF"CN11
ALF"CN12

START
AREF'
BREF'
BALANCE
RATE
N
.
MONRATE
STOREOl
MONPAY
TAG 01
·PAYMENT
INTEREST
PRINCIPl.
DONE
AlF"CNOl
AlF'CN02
ALFCN03
ALF'CN~

F"LOCNOl
F"lOCN02
ALF'CN05
ALF'CN06
COMCN01
ALF'CN07
AlF'CNoB
AlF"CN09
ALF'CN10
ALF"CN11
ALF'CN12
EN)TABLE

BALANCE

$

RATE
N

+12
+1

.9 J 5 )6
,5

O-b.

g

+000 020....5705300 .

PAYMENT
PR

8, :80.)
INT
4
3 3s5

+0000000-0030000
+0000000.0°30010

+OOOOOOo-OOiOO2O

+0000000-00 11 00
+0000000-00 1120

+0000000-00 1140

+0000000-0031160
+0000000-0031200
+0000000.0031220
+0000000-0030460
+0000000-0031240
+0000000-0031260
+0000000-0031300
+0000000-0030620
+0000000-0030670
+0000000-0°3°700
+0000000-0030710
+0000000-0°30720
+0000000-0030730
+0000000-0030750
+0000000-0030770

+0000000-0031000
+0000000-0031010
+0000000-0031020

+0000000-0031030

+oOOOOOO-0031Qli.o
+0000000-0°31050
+0000000.0031060
+0000000-0031070
+0000000-0031320

EN:> F'I RST PASS .

23

LOCATION
START'
AREF
BREF"

COMMA~

ORG

Tve
Tye·
CLA
TVA
CLA
TYA
TRA
TRA
FST
CLA
TYA
TRA
TRA
FST
CLA
TVA
TRA
TRA
F"ST
FCA
FDV
FST
f"CS
FST,
FCA
FAD
TRA
FMP
TRA
FST
FCA
FSB
FST
FCA
FMP
FDV
FST
Tve
Tye
eLA
TVA
CLA
TVA

'ADDRESS
+~oo

!oor68
ALF"CNOI

tl~l~02

+ffig
+ 100
C- 01

BALANCE
ALF"CN03

!ffi60
C-ooool

RATE
ALFCNolJ.

L30000
+7200370+7200100
+0030670+7277700
+003 0700+1277640
+5723100+5730030
+3531100+0030710
+72m70+5723100
+573 0051+3531120

!Hl~
C-ooool

+0030720+7277740
+5723100+5730 100

RATE
F"LOCNOI
MONRATE

+3531140+3031120

N

N

STOREOI
MONRATE
FLoeN02
+26001
ST REOI
201
+26
ST REOI
' FLoeN02
STOREOI
STORE01
BALANCE
MONRATE
STORE01
MONPAV
+00370
+00100
ALFeN05

tl'fl~06
+7777

+0530730+3531160 '
+3 431140+3531200
+3 031160+0430 750
+572700 1+0731200
+572720 1+3531200
+3 030 750+0631200
+3531200+3031100
+0731160+0531200
+3531220+7200370
+72~100+0030770

+7277700+0031000

24
LOCATION COMMAf'l>
CLA
5TO
reA
TRA

, TAG 01

Tye
Tye
Tye
Tye
eLA
. TYA
eLA
TYA
Tye
TYC
CLA
'TYA
CLA
·TYA
Tye
TYC
CLA
TYA
CLA
TYA
TYCTYC
CLA
TYA
CLA
TYA
TYC
lYC
rCA
rST
rCA
TRA
TYC
TYC
rCA
rMP
rST
rCA.
rSB
rST

ADDRESS

COMCNOI
+22~6
MON AY
+22~31

68
68

+00
+001
003
+
+001
ALreN07

tln~08

:00 ~
ALrCN09

+ggr

!lfl~10

+72·m70+0031 010
+6022560+3031220
+572 2531+7200370
+7200100+7200370
+7200100+0031020
+7277750+0031030
+7277700+7200330
+7200 100+0031 040
+7277700+0031050

:~
+00

+7277770+7200330

!l1~~'2

+7277700+0031070

ALF"CN11

+1;675
+ 330
+00100
ALF"CN07

Al1l~01

+6670
+ 3~
+001
rLOCNQ2
PAYMENT
. PAYMENT
+22531
+00330
+00100 .
BALANCE
MONRATE
INTEREST
MONPAY
INTEREST
PR1NCIPL

+7200100+0031060
+7277750+7200330
+7200100+0031020
+7277750+0030670
+7277700+7200370
+7200100+3030750
+3531240+3 031240
+5722531+7200330
+7200100+3031100
+0731160+3531260
+3 031220+0631260

LOCATION

DONE

COMMA~

ADDRESS

F'CA
TRA
rye
Tye
F'CA
TRA
F'CA
F'SB
F'ST
Tye
Tye
F"CA
TRA
ryc
TYC
F"eA
F"AD
F"ST
F"SB

PRINCfPL
+22531
+00330
+00100
INTEREST
+22531
BALANeE
PR'f NCf PL
BAI.ANCE

1MI

:ggrag
BALANCE

+3531300+3031300
+572 2531+7200330
+7200100+3031260
+5722 531+3031100
+0631300+3531100
+7200330+7200100

+22~~0
+00
+00
PAYMENT
F"LOCN02
PAYMENT

+3031100+5722531
+7200370+7200100

N

TA'3'01+00001
TAG 01+00001
START

+3031240+0430750
+3'31240+063114u

ALF"C
F"LOCNOI

TZE
TRA
SL
ALPHA
ALPHA
ALPHA
ALPHA
DECIMAL

F'LOCN02

DECIMAL

(+1 )

ALF"CN~

ALPHA
ALPHA
COMMAN)
ALPHA
ALPHA
ALPHA
ALPHA
ALPHA
ALPHA
Ef\l)

fMONTHLY )
+6303100+-222~220
PAYMENT)
+~~~60-0~4 000
+ooo6~0+5705300J +0 020i-5J86~
-2041020-2
PAYMENT~
++7
7~~0721+~0!5!
1020- o· 00
50
PR
INCfPAL)
-3143430+~0~4400
I NT)
+74~1020- 0 3100
EREST)
-0520221+0000000

ALF'CNOI
ALF'CN02

ALF"C~

ALF'CN
COMCNOI
ALF' CN8A
ALF'CN '
ALF"CN09
ALF"CN10
ALF"CN11
ALF"CNl2

BALANCE}

$)

RATE

~12~

)

+5130461+5030461
+573uuuu+4uuouou

+7710610-1543401
+5~41 41-0000000
+!5207OD-0441000

+ 54 1020-0000000
+ 000000-0000000
+0000000-0000020
+4000000-0000000
+0000000-0000001

26

BALANCE $1200
RATE .09
N 24
MONTHLY PAYMENT
PAYMENT

1.00
2.00
~.OO
000

6.

00
- -.00

e·9.00
.00
oo

10 00
11-.00
12.00
. 1'~.OO'
.00
. 1~.00
1 .00
1~.00
1 .00
19.00
20 00
21.00
22.00
2~.OO
2 .00
0

0

54.82
PRINCIPAL
4~.82

4 .11

tt~:~

47.21

ttl.
57
4 ·~s

48:64
49.0~
49.3
49·1~
50.
50• O
50. ~
51.2
51.64
52.03
52.42
52•81

a

530~'

5~. 1

5 .01
54.41

INTEREST
OO

BALANCE

e·.66

1154. 18
1168.01
1061.~O
1014. 4
96~.4~
$1 .8
8ll.~4
3. 6

8·r
I.:2~

6

6·9~
5
6: 8

7~~.01
.00

5.~1

~

. 5.4~

6l6.~
6.

~.o

5l~·76

4:!3

3.95
3.5~
3.1
2.]9
2.QO
2.01
1.61
1.22
.81
.41

tt7~:~~
2 • 13

-372.49
320.47
268.0~
215·2

-

16 .03
10 .42
54•41
000

8

27

6.

conING INFORMATION

6.1

FUNCTION TABLE: The SALT compiler contains a list of permissible tunction names-rn-locations 2300 to 2327. Three function names -- SQRT, EXP,
and LN -- must be included. The names for the other tunctions may be
changed if necessary. The standard revised SALT compiler program recognizes the function names described in § 2.1.4, whose names are listed in
2300 -

2316.

.

Function names in this table are right justifiedJ preceded by as many
blanks' as are necessary to make eight characters total. There must be
a minus zero word after the list.
The SALT compiler does not itself' generate any coding for the functions.
The function name 1s punched out during the SALT phase, to be recognized
as a SCRAP macro. The functions recognized by the standard revised SALT
are defined as macros in the revised SCRAP. SCRAP must generate calling
sequences to the subroutines which will evaluate the function.

6.2

ORIGIN: SALT sets up all program starting locations to be 3000.0. If
for some reason it is desired to change this starting location, enter
the new location in the following manner, before pressing Start 1.

Set location counter to 0,02.0
(b) Turn "fill tab" on typewriter down, and depress F key.
(c) Type + blank blank XXXI blank CIR, where XXXX is the new
origin.
(a)

APPENDIX
TO
RECG1P II USERS' PROGRAM NO. 1034
PROGRAM TITLE:

SIGNAL CORP RECCMP ALGEBRAIC TRANSLATOR - SALT

PK>GRAM CLASSIFICATION:

Executive and Control

AUTHOR:

H. D. Goddard
Autonetics Industrial Products
RECCMP II Users' Program No .,1034 has been
modified to allow typing of SALT statements
as rapidly as desired,initialize the SALT
program for re-use and to permit processing
of off-line tapes typed in SALT language.

CHECKED BY:

H. D. Goddard

PURPOSE:

The Signal Corps RECCMP Algebraic Translator
(SALT) is a one pass compiler system which
translates from algebraic statements into
a SCRAP assembly program.

DATE:

July, 1961
Published by
RECOMP Users' Library

at
AUTONETICS INDUSTRIAL PROIlJCTS
A DIVISION OF NORTH AMERICAN AVIATION, INC.
3400 E. 70th Street, Long Beach 5, Calif.

.PROGRAM TITLE:

SIGNAL CORP RECOMP ALGEBRAIC TRANSLATOR - SALT

----------------~----------

RECOMP II Users' Program No. 1034 issued in July, 1961 permits the following:
I

SALT statements may be typed as rapidly as desired. However typing speed
is still restricted when typing SCRAP coding via an ENTER SCRAP statement.

II

The SALT program may be initialized for re-use by depressing ERROR RESET and
START 2. Thus it is not necessary to re-load the SALT tape if compiling a
new program.
NOTE:

III

After initializing for re-use, advance at least two folds of tape and
depress START 1 if typewriter input is to be used or place paper tape
in photoreader and depress START 3 if paper tape input is to be used.

The SALT program can now process an offline prepared tape that has been tyPed

!!!. SALT language.

To use the SALT program and a tape prepared offline, the following is necessary·
1.

Prepare the offline tape. The SALT input should be typed just as it
would be on line.
There should be at least eight blanks on the tape between each character.
A Friden Flexowriter model FPC-5 modified according to RECOMP Technical
Bulletin No. 21 will automatically insert blanks between each character.

2.

Load and verify the SALT program. -To verify, place the program tape in
the photo reader past the zero memory section that is at the beginning of
the tape.

3.

Set tab override switch in the ON position.

4.
5.

Place offline prepared tape in photoreader.

NOTE:

NOTE:

Depress START 3.
This will generate a SALT punched tape. Further processing (i.e. the
generation of the 1st and 2nd passes in SCRAP) is the same as specified
in RECOMP II Users' Program No. 1034 issued in January, 1961.
If the SALT program detects an error while processing an offline prepared tape, it will do the following:
(a)

1£ it is a SALT statement, it will print ERROR or PAIR ERROR
followed by a print out of the statement.

(b)

If it is an error in SCRAP coding (i.e. symbolic coding entered
via an ENTER SCRAP statement), it will print SCRAP CODE ERROR.
There will be no print out of the error.

See RECOMP Technical Bulletin No. 21 for information concerning the
preparation and use of a decimal data tape.



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Create Date                     : 2010:05:13 15:05:14-08:00
Modify Date                     : 2010:05:13 15:27:39-07:00
Metadata Date                   : 2010:05:13 15:27:39-07:00
Producer                        : Adobe Acrobat 9.32 Paper Capture Plug-in
Format                          : application/pdf
Document ID                     : uuid:08c619ec-6c5d-4075-bbf8-6d42c61e2b43
Instance ID                     : uuid:28f38f92-b4fa-4595-b81d-75d79681d17e
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 32
EXIF Metadata provided by EXIF.tools

Navigation menu