Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-01 - 43,50110/sba1.bnk
There are 2 other files named sba1.bnk in the archive. Click here to see a list.
10' NAME--SBA1
20'
30' DESCRIPTION--SBA LOAN AMORTIZATION SCHEDULE
40'
50' SOURCE--WRITTEN 7/20/68 BY EUGENE FELCH,IV, KEENE,N.H.
51' REVISED 8/8/69 BY J. ROKUS
60'
70' THIS PROGRAM WAS WRITTEN FOR STUDENT USE.  AMOS TUCK SCHOOL,
71' HANOVER, N.H., DOES NOT ASSUME RESPONSIBILITY FOR
73' ITS ACCURACY.
80'
90' * * * * * * * * * * * * * MAIN PROGRAM * * * * * * * * * * * * 
95'
100 DIM M$(12)
110 DIM P(12)
115REM FUNCTION FOR PRINTING IN A DOLLARS AND CENTS FORMAT
120 DEF FNP(P1,P5)
130 LET P0=0
140 LET FNP=P1
150 IF P1>=O THEN 180
160 LET P1 =ABS(P1)
170 LET P0=1
180 LET P9=7 'NUMBER OF DIGETS LEFT OF DECIMAL POINT
190 LET P8 = 2'NUMBER OF DECIMALS
200 LET P(0) = P9+P8+1
210 LET P2 = INT(P1*(10^P8)+ .5)
220 FOR P4 = 1TO P8
230 LET P3=P2-INT (P2/10)*10
240 LET P(P9+P8+2-P4) =P3+48
250 LET P2=INT(P2/10)
260 NEXT P4
270 LET P(P9+1) = 46
280 FOR P4=1 TO P9
290 LET P3=P2-INT(P2/10)*10
300 LET P(P9+1-P4)=P3+48
310 IF P2 = 0 THEN 340
320 LET P2 =INT (P2/10)
330 GO TO 390
340 IF P0=0 THEN 380
350 LET P(P9+1-P4) =45
360 LET P0=0
370 GO TO 390
380 LET P(P9+1-P4) = 32
390 NEXT P4
400 PRINT TAB(P5-2);
410 CHANGE P TOP$
420 PRINT P$;
430 FNEND
440 DATA JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC
450 FOR Z9= 1TO12
460 READ M$(Z9)
470 NEXT Z9
480 DEF FNI(A,R)=INT(100*(R/12)*A+.5)/100
490 PRINT "BORROWER'S NAME";
500 INPUT C$
510 PRINT "ORIGINAL PRINCIPAL";
520 INPUT A1
530 LET A9=A1
540 PRINT "SBA SHARE";
550 INPUT S1
560 IF S1<1 THEN 580
570 LET S1 = S1/100
580 PRINT "BANK RATE";
590 INPUT R3
600 IF R3<1 THEN 620
610 LET R3=R3/100
620 PRINT "SBA RATE";
630 INPUT R2
640 IF R2<1 THEN 660
650 LET R2=R2/100
660 PRINT "LOAN DATED (MO,YR)";
670 INPUT M,Y
680 LET M=M+1
681 IF M <= 12 THEN 690
682 LET M=1
683 LET Y=Y+1
690 PRINT "MONTHLY PAYMENT";
700 INPUTE0
710 LET A2 = INT(100*A1*S1+.5)/100
720 PRINT "SERVICE FEE(%)";
730 INPUT S9
760 LET S9=S9/1200
761 PRINT "FOR HOW MANY CALENDAR YEARS DO YOU WISH THE SCHEDULE";
762 INPUT Y9
763 LET Y8 = 1
770 PRINT""
780 PRINT "        ****SBA LOAN SCHEDULE****"
790 PRINT
800 PRINT "BORROWER:  " C$
810 PRINT "AMOUNT OF LOAN";
820 LET A1 = FNP(A1,17)
830 PRINT
840 PRINT "SBA PARTICIPATION:"100*S1"%"
850 PRINT "SBA INTEREST RATE:"100*R2"%"
860 PRINT "BANK INTEREST RATE:"100*R3"%"
870 PRINT "MONTHLY PAYMENT:";
880 LET E0=FNP(E0,17)
890 PRINT
900 PRINT
910 PRINT
920 PRINT TAB(15);"BEGINNING";TAB(27);"INTEREST";TAB(39)"PRINCIPAL";
930 PRINT TAB(51)"SERVICE"TAB(63)"TOTAL"
940 PRINT TAB(15);"PRINCIPAL";TAB(27);"PAYMENT";TAB(39);"REPAYMENT";
950 PRINT TAB(51);"  FEE";TAB (63)"PAYMENT"
960 PRINT
970 LET N=1
980 LET A3=A1-A2
990 LET I2 = FNI(A2,R2)
1000 LET I3=FNI(A3,R3)
1010 LET I1=I2+I3
1020 LET E1=E0-I1
1030 IF E1<=1.1*A1 THEN 1080
1040 LET E3=A3
1050 LET E2=A2
1060 LET E1=E2+E3
1070 GO TO1100
1080 LET E2=A2-INT(100*S1*(A1-E1)+.5)/100
1090 LET E3=E1-E2
1100PRINT"=========================================================================="
1110 PRINT
1120 PRINT "PMT #"N;
1130 PRINT M$(M);","Y
1140 PRINT
1150 LET N=N+1
1160 LET M=M+1
1170 LET C1=C1+I1
1180 LET C2=C2+P1
1190 PRINT "TOTAL LOAN";
1200 LET A1=FNP(A1,15)
1210 LET I1=FNP(I1,27)
1220 LET E1=FNP(E1,39)
1230 IF ABS(E0-E1-I1)<.0001 THEN 1270
1240 LET E9=FNP(E1+I1,63)
1260 GO TO 1280
1270 LET E0=FNP(E0,63)
1280 LET C2=C2+E1
1290 PRINT "SBA SHARE";
1300 LET A2=FNP(A2,15)
1310 LET I2=FNP(I2,27)
1320 LET E2=FNP(E2,39)
1330 LET S2=INT(S9*A2*100+.5)/100
1340 LET S2=FNP(-S2,51)
1350 LET E8=FNP(E2+I2+S2,63)
1360 PRINT
1370 PRINT"BANK SHARE";
1380 LET A3=FNP(A3,15)
1390 LET I3=FNP(I3,27)
1400 LET E3=FNP(E3,39)
1410 LET S2=FNP(-S2,51)
1420 LET E7=FNP(E3+I3+S2,63)
1430 PRINT
1440 IF M<=12 THEN 1710
1450 PRINT
1460PRINT"========================================================================="
1470 LET M=1
1480 LET Y=Y+1
1490 PRINT
1500 PRINT "FOR"Y-1":"
1510 LET T1=23
1520 PRINT "  BEGINNING PRINCIPAL";
1530 LET A9=FNP(A9,T1)
1540 PRINT
1550 PRINT "  ENDING PRINCIPAL";
1560 LET A8=A1-E1
1570 IF A8>=O THEN 1590
1580 LET A8=0
1590 LET A8=FNP(A8,T1)
1600 PRINT 
1610 PRINT"  PRINCIPAL REPAYMENT";
1620 LET C2=FNP(C2,T1)
1630 PRINT 
1640 PRINT"  TOTAL INTEREST PAID";
1650 LET C1=FNP(C1,T1)
1660 PRINT
1661 IF Y8=Y9 THEN 1752
1662 LET Y8 = Y8 + 1
1670 IF A1=0 THEN 1752
1680 LET C1=C2=0
1690 LET A9=A1-E1
1700 PRINT
1710 LET A1=A1-E1
1720 IF A1=0 THEN 1450
1730 LET A2=A2-E2
1740 PRINT
1750 GO TO 980
1752 PRINT
1756 PRINT
1760PRINT"==========================================================================="
1770 END