
/SAMPLE PROGRAM

/TIME SHARING II,       TELEPRINTER NO. 1

/OBJECTIVE: WITH A GIVEN INTEREST RATE, A GIVEN
/           NUMBER OF YEARS AND A GIVEN MONTHLY
/           DEPOSIT, PREPARE A TABLE SHOWING THE
/           ACCUMULATED MONTHLY DEPOSITS AND 
/           BALANCE (COMPOUNDED MONTHLY).

/TELE NO. 1

IN=4532
INN=4533

*1000
CLA           /STANDARD START
DCA 21
DCA 51
TCR

CLR           /INITIALIZE
PUT 
TOTAL1
PUT
TOTAL2

TSC
INTRST
IN            /INTEREST RATE TO 2 DECIMAL PLACES (2D)
PUT
RATE
TCR
TSC
YRS
IN            /NUMBER OF YEARS (0D)
PUT
YEARS
TCR
TSC
DEP
IN            /MONTHLY DEPOSIT (2D)
PUT 
DEPOSIT
TCR
TCR

CLR
ADD
YEARS
MPY
TWLVE
TAD 103
CIA
DCA CNTR      /WILL COUNT THE NUMBER OF MONTHS

CLR
ADD
RATE
MPY
HUND
DDV
TWLVE
ADD
ONE
PUT
FACTOR        /MONTHLY MULTIPLIER

LOOP1,  TAD M12
DCA TALY      /EXTRA LINE FEED EACH 12 MONTHS

LOOP2,  CLR
ADD
DEPOSIT
ADD
TOTAL1
PUT
TOTAL1
OT2           /ACCUMULATED DEPOSITS

CLR
ADD
TOTAL2
MPY
FACTOR
DDV
ONE           /TO ADJUST DECIMAL PLACE
ADD
DEPOSIT
PUT
TOTAL2
OT2           /BALANCE
TCR

ISZ CNTR
JMP BACK

ISZ 21        /STANDARD END
IN
JMP .-1

BACK, ISZ TALY
JMP LOOP2
TCR
JMP LOOP1

CNTR, 0
TALY, 0
M12,  0-14
RATE, 0
0
YEARS, 0
0
DEPOSIT, 0
0
TWLVE, #12#
ONE, #1000000#

TOTAL1, 0
0
TOTAL2, 0
0
FACTOR, 0
0

INTRST, [INTEREST  = ]
YRS,    [YEARS     = ]
DEP,    [DEPOSIT   = ]

$
