ChipMaster's bwBASIC This also includes history going back to v2.10. *WARN* some binary files might have been corrupted by CRLF.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

758 lines
33 KiB

  1. 1000 REM LOAN CALCULATION PROGRAM (WRITTEN TO RUN WITH BASIC-80 v5.21)
  2. 1020 REM WRITTEN BY MARK MCKIBBEN, WOLD COMMUNICATIONS
  3. 1040 REM THIS PROGRAM WAS WRITTEN IN STAGES AND NEVER REALLY STRAIGHTENED
  4. 1060 REM OUT, SO IT IS A BIT OF A MESS.
  5. 1080 REM THE PROGRAM IS MENU-DRIVEN AND MORE OR LESS SELF-DOCUMENTING.
  6. 1100 REM ONLY ONE STATEMENT NEEDS TO BE CORRECTED (IF RUN UNDER MBASIC)
  7. 1120 REM FOR SPECIFIC TERMINALS: ONE OF THE FIRST STATEMENTS BELOW
  8. 1140 REM DEFINES CLS$, WHICH IS SENT TO THE CONSOLE TO CLEAR SCREEN AND
  9. 1160 REM HOME CURSOR.
  10. 1180 REM THERE IS ONE UNDOCUMENTED MENU ITEM: "L", WHICH LOADS SAMPLE
  11. 1200 REM VALUES INTO THE VARIABLES FOR TESTING.
  12. 1220 REM
  13. 1240 DEFDBL D:DEFSNG S:DEFSTR A-C:DEFINT I:REM GLOBAL VARIABLE DEFINITIONS
  14. 1260 REM CHANGE THE STATMENT BELOW FOR YOUR CLEAR SCREEN SEQUENCE
  15. 1280 CLEAR
  16. 1300 CLS$=CHR$(27)+CHR$(42):REM THIS VARIABLE WILL CLEAR THE SCREEN
  17. 1320 ON ERROR GOTO 1360
  18. 1340 GOTO 1480
  19. 1360 PRINT CLS$
  20. 1380 PRINT:PRINT:PRINT:PRINT " AN ENTRY HAS BEEN MADE WHICH CANNOT BE USED FOR LOAN CALCULATIONS.":PRINT:PRINT
  21. 1400 PRINT " PLEASE DOUBLE CHECK YOUR ENTRIES AND TRY AGAIN. PRESS ANY KEY TO CONTINUE. ";
  22. 1420 ANS$=INPUT$(1)
  23. 1440 RESUME 1280
  24. 1460 REM
  25. 1480 WIDTH 79:REM SET WIDTH TO 79 ON SCREEN
  26. 1500 REM
  27. 1520 GOTO 2660
  28. 1540 REM MENU PROCESSING SUBROUTINE
  29. 1560 PRINT
  30. 1580 PRINT " >>>>>>>>>>>>> NOW WAITING FOR YOUR SELECTION >>>>> ";
  31. 1600 ANS$=INPUT$(1)
  32. 1620 IF ANS$<"a" OR ANS$>"z" THEN GOTO 1660
  33. 1640 ANS$=CHR$(ASC(ANS$)-32)
  34. 1660 FOR MENUNUM%=1 TO LEN(MENULIST$)
  35. 1680 IF ANS$=MID$(MENULIST$,MENUNUM%,1) THEN PRINT ANS$;CHR$(13);SPC(70);CHR$(13);:RETURN
  36. 1700 NEXT
  37. 1720 GOTO 1600
  38. 1740 REM ***** YES/NO SUBROUTINE ****** (MENUNUM% = 1 FOR YES, 2 FOR NO)
  39. 1760 ANS$ = INPUT$(1)
  40. 1780 IF ANS$ = "Y" OR ANS$ = "y" THEN MENUNUM% = 1 : PRINT "Yes" : RETURN
  41. 1800 IF ANS$ = "N" OR ANS$ = "n" THEN MENUNUM% = 2 : PRINT "No" : RETURN
  42. 1820 GOTO 1760
  43. 1840 REM ******* SUBROUTINE FOR PRINTING REUSED MESSAGE #1
  44. 1860 PRINT:PRINT " The calculated amount above will be automatically recalculated anytime you":PRINT " change one of the VARIABLES. Use the menu to select.":RETURN
  45. 1880 REM ******* SUBROUTINE FOR PRINTING REUSED MESSAGE #2
  46. 1900 PRINT " Please enter each missing variable using the menu to select each item.":RETURN
  47. 1920 REM ******* SUBROUTINE FOR PRINTING REUSED MESSAGE #3
  48. 1940 PRINT:PRINT " Variables needed for calculation:":PRINT:PRINT " VARIABLE CURRENT VALUE":RETURN
  49. 1960 REM ******* SUBROUTINE FOR PRINTING REUSED MESSAGE #4
  50. 1980 PRINT:PRINT " PRESS (H) for HELP."
  51. 2000 PRINT " PRESS (M) to return to the MAIN MENU.":RETURN
  52. 2020 REM ****** SUBROUTINE FOR PRINTING REUSED MESSAGE #5
  53. 2040 PRINT " NEGATIVE numbers are not allowed in loan calculations. HIT ANY KEY.";ANS$=INPUT$(1);
  54. 2060 PRINT CHR$(13);SPC(75);CHR$(13);
  55. 2080 RETURN
  56. 2100 REM ORIGINAL TERM LOAN PRINICIPAL USING INTEREST RATE, THE AMOUNT
  57. 2120 REM OF REGULAR PAYMENTS, NUMBER OF PAYMENTS PER YEAR AND TERM OF THE
  58. 2140 REM LOAN.
  59. 2160 REM
  60. 2180 REM REGULAR PAYMENT ON A LOAN USING ORIGINAL LOAN PRINCIPAL, INTEREST
  61. 2200 REM RATE, NUMBER OF PAYMENTS PER YEAR, AND NUMBER OF YEARS TO PAY.
  62. 2220 REM ASSUMES ALL PAYMENTS WILL BE EQUAL.
  63. 2240 REM
  64. 2260 REM LAST PAYMENT ON A LOAN USING AMOUNT OF THE LOAN, THE AMOUNT OF
  65. 2280 REM THE PAYMENTS, INTEREST RATE CHARGED, NUMBER OF PAYMENTS PER YEAR
  66. 2300 REM AND THE TERM OF THE PAYMENTS
  67. 2320 REM
  68. 2340 REM REMAINING BALANCE ON A LOAN AFTER A SPECIFIC NUMBER OF PAYMENTS
  69. 2360 REM USING PAYMENT AMOUNT, NUMBER OF PAYMENTS PER YEAR, AMOUNT OF THE
  70. 2380 REM PRINCIPAL, ANNUAL INTEREST RATE, AND THE PAYMENTS NUMBER. THERE
  71. 2400 REM ALSO A SUBROUTINE THAT WILL CALCULATE THE PAYMENT NUMBER GIVEN
  72. 2420 REM THE FIRST PAYMENT DATE AND THE CURRENT OR PROJECTED DATE.
  73. 2440 REM
  74. 2460 REM TERM OF A LOAN (PERIOD NEEDED TO REPAY) USING PAYMENT AMOUNTS,
  75. 2480 REM NUMBER OF PAYMENTS, ANNUAL INTEREST RATE AND ORIGINAL LOAN AMOUNT.
  76. 2500 REM ALL PAYMENTS ARE ASSUMED TO BE EQUAL.
  77. 2520 REM
  78. 2540 REM ANNUAL INTEREST RATE ON A LOAN USING AMOUNT OF LOAN, AMOUNT OF
  79. 2560 REM PAYMENT, NUMBER OF PAYMENTS PER YEAR, AND TERM OF LOAN.
  80. 2580 REM
  81. 2600 REM MORTGAGE AMORTIZATION TABLE USING PAYMENT AMOUNT, TERM OF PAYMENT
  82. 2620 REM NUMBER OF PAYMENTS PER YEAR, PRINCIPAL AMOUNT AND INTEREST RATE.
  83. 2640 REM
  84. 2660 REM ****************************************************************
  85. 2680 REM BEGINNING OF PROGRAM
  86. 2700 REM ***************************************************************
  87. 2720 REM FIRST COMES THE STARTUP MENU
  88. 2740 REM
  89. 2760 PRINT CLS$
  90. 2780 REM
  91. 2800 REM
  92. 2820 PRINT:PRINT" *************** MAIN MENU ***************"
  93. 2840 PRINT " This is a program for LOAN CALCULATIONS. Please select the "
  94. 2860 PRINT " module you would like to run below."
  95. 2880 PRINT
  96. 2900 PRINT " (Press the corresponding letter from the menu.)"
  97. 2920 PRINT
  98. 2940 PRINT " (A) LOAN PRINCIPAL AMOUNT"
  99. 2960 PRINT " (B) REGULAR LOAN PAYMENT AMOUNT"
  100. 2980 PRINT " (C) LAST PAYMENT ON A LOAN"
  101. 3000 PRINT " (D) REMAINING BALANCE ON A LOAN"
  102. 3020 PRINT " (E) TERM OF A LOAN"
  103. 3040 PRINT " (F) ANNUAL INTEREST RATE ON A LOAN"
  104. 3060 PRINT " (G) LOAN AMORTIZATION TABLE"
  105. 3080 PRINT
  106. 3100 PRINT " (H)ELP-- Choose this for an explanation of the modules above."
  107. 3120 PRINT
  108. 3140 PRINT " (X) EXIT BACK TO THE OPERATING SYSTEM"
  109. 3160 REM
  110. 3180 MENULIST$="ABCDEFGHXL"
  111. 3200 GOSUB 1540
  112. 3220 ON MENUNUM% GOTO 3240,4380,4960,5660,6600,7440,8180,13240,15580,15880
  113. 3240 REM *******************MENU CHOICE A*****************************
  114. 3260 PRINT CLS$;
  115. 3280 PRINT " PRINCIPAL ON A LOAN "
  116. 3300 PRINT " Calculates an initial amount borrowed."
  117. 3320 GOSUB 1920
  118. 3340 PRINT " (A) ";:GOSUB 3360:GOTO 3400
  119. 3360 PRINT "Amount of Regular Payment: ";
  120. 3380 PRINT USING "$$#########.##";DPAYMENT:RETURN
  121. 3400 PRINT " (B) ";:GOSUB 3420:GOTO 3480
  122. 3420 PRINT "Annual Interest rate: ";
  123. 3440 PRINT USING " ###.##";SINTEREST;
  124. 3460 PRINT "%":RETURN
  125. 3480 PRINT " (C) ";:GOSUB 3500:GOTO 3540
  126. 3500 PRINT "Payments per Year: ";
  127. 3520 PRINT USING " ###";IPAYMENTNUM:RETURN
  128. 3540 PRINT " (D) ";:GOSUB 3560:GOTO 3600
  129. 3560 PRINT "Number of Years: ";
  130. 3580 PRINT USING " ###.#";SYEARS:RETURN
  131. 3600 PRINT:PRINT
  132. 3620 IF (DPAYMENT*SINTEREST*IPAYMENTNUM*SYEARS)<>0 THEN GOSUB 4180 ELSE LET DPRINCIPAL=0
  133. 3640 IF DPRINCIPAL=0 THEN GOTO 3720
  134. 3660 PRINT " The calculated PRINCIPAL amount is: ";
  135. 3680 PRINT USING "$$###########.##";DPRINCIPAL
  136. 3700 GOSUB 1840:GOTO 3740
  137. 3720 GOSUB 1880
  138. 3740 GOSUB 1960
  139. 3760 MENULIST$="MABCDH"
  140. 3780 GOSUB 1540
  141. 3800 IF MENUNUM%=1 THEN GOTO 2660 ELSE LET MENUNUM%=MENUNUM%-1
  142. 3820 ON MENUNUM% GOSUB 3860,3940,4020,4100,13360
  143. 3840 GOTO 3240
  144. 3860 REM ************************** ROUTINE TO GET DPAYMENT ***
  145. 3880 INPUT " Please enter the amount of regular payment.... ",DPAYMENT
  146. 3900 IF DPAYMENT<0 THEN GOSUB 2020:GOTO 3880
  147. 3920 RETURN
  148. 3940 REM ************************** ROUTINE TO GET SINTEREST ***
  149. 3960 INPUT " Please enter the annual interest rate.... ",SINTEREST
  150. 3980 IF SINTEREST<0 THEN GOSUB 2020:GOTO 3960
  151. 4000 RETURN
  152. 4020 REM ************************** ROUTINE TO GET IPAYMENTNUM ***
  153. 4040 INPUT " Please enter the number of payments per year.... ",IPAYMENTNUM
  154. 4060 IF IPAYMENTNUM<0 THEN GOSUB 2020:GOTO 4040
  155. 4080 RETURN
  156. 4100 REM ************************** ROUTINE TO GET SYEARS ***
  157. 4120 INPUT " Please enter the term of the loan in years.... ",SYEARS
  158. 4140 IF SYEARS<0 THEN GOSUB 2020:GOTO 4120
  159. 4160 RETURN
  160. 4180 REM ************************** ROUTINE TO CALCULATE PRINCIPAL *******
  161. 4200 REM
  162. 4220 REM
  163. 4240 DTEMPSTORE=DPAYMENT*IPAYMENTNUM*(1-1/((SINTEREST/100)/IPAYMENTNUM+1)^(IPAYMENTNUM*SYEARS))/(SINTEREST/100)
  164. 4260 DPRINCIPAL=INT(DTEMPSTORE*100+.5)/100
  165. 4280 RETURN
  166. 4300 REM ************************** ROUTINE TO GET DPRINCIPAL ***
  167. 4320 INPUT " Please enter the loan principal.... ",DPRINCIPAL
  168. 4340 IF DPRINCIPAL<0 THEN GOSUB 2020:GOTO 4320
  169. 4360 RETURN
  170. 4380 REM *******************MENU CHOICE B*****************************
  171. 4400 PRINT CLS$;
  172. 4420 PRINT " REGULAR PAYMENT"
  173. 4440 PRINT " Calculates the amount of each payment."
  174. 4460 GOSUB 1920
  175. 4480 PRINT " (A) ";:GOSUB 3420
  176. 4500 PRINT " (B) ";:GOSUB 4520:GOTO 4560
  177. 4520 PRINT "Amount of Principal: ";
  178. 4540 PRINT USING "$$#########.##";DPRINCIPAL:RETURN
  179. 4560 PRINT " (C) ";:GOSUB 3500
  180. 4580 PRINT " (D) ";:GOSUB 3560
  181. 4600 PRINT:PRINT
  182. 4620 IF (SINTEREST*DPRINCIPAL*IPAYMENTNUM*SYEARS)<>0 THEN GOSUB 4860 ELSE LET DPAYMENT=0
  183. 4640 IF DPAYMENT=0 THEN GOTO 4720
  184. 4660 PRINT " The calculated PAYMENT amount is: ";
  185. 4680 PRINT USING "$$############.##";DPAYMENT
  186. 4700 GOSUB 1840:GOTO 4740
  187. 4720 GOSUB 1880
  188. 4740 GOSUB 1960
  189. 4760 MENULIST$="MABCDH"
  190. 4780 GOSUB 1540
  191. 4800 IF MENUNUM%=1 THEN GOTO 2660 ELSE LET MENUNUM%=MENUNUM%-1
  192. 4820 ON MENUNUM% GOSUB 3940,4300,4020,4100,13760
  193. 4840 GOTO 4380
  194. 4860 REM ************************** ROUTINE TO CALCULATE DPAYMENT ***
  195. 4880 DTEMPSTORE=((SINTEREST/100)*DPRINCIPAL/IPAYMENTNUM)/(1-1/((SINTEREST/100)/IPAYMENTNUM+1)^(IPAYMENTNUM*SYEARS))
  196. 4900 DPAYMENT=INT(DTEMPSTORE*100+.5)/100
  197. 4920 RETURN
  198. 4940 STOP
  199. 4960 REM *******************MENU CHOICE C*****************************
  200. 4980 PRINT CLS$;
  201. 5000 PRINT " LAST PAYMENT ON A LOAN"
  202. 5020 PRINT " Finds the final payment at the end of the term."
  203. 5040 GOSUB 1920
  204. 5060 PRINT " (A) ";:GOSUB 3360
  205. 5080 PRINT " (B) ";:GOSUB 4520
  206. 5100 PRINT " (C) ";:GOSUB 3560
  207. 5120 PRINT " (D) ";:GOSUB 3420
  208. 5140 PRINT " (E) ";:GOSUB 3500
  209. 5160 PRINT:PRINT
  210. 5180 IF (DPAYMENT*DPRINCIPAL*SYEARS*SINTEREST*IPAYMENTNUM)<>0 THEN GOSUB 5400 ELSE LET DLASTPAYMENT=0
  211. 5200 IF DLASTPAYMENT=0 THEN GOTO 5280
  212. 5220 PRINT " The calculated LAST PAYMENT amount is: ";
  213. 5240 PRINT USING "$$#############.##";DLASTPAYMENT
  214. 5260 GOSUB 1840:GOSUB 1960:GOTO 5300
  215. 5280 GOSUB 1880:GOSUB 1960
  216. 5300 MENULIST$="MABCDEH"
  217. 5320 GOSUB 1540
  218. 5340 IF MENUNUM%=1 THEN GOTO 2660 ELSE LET MENUNUM%=MENUNUM%-1
  219. 5360 ON MENUNUM% GOSUB 3860,4300,4100,3940,4020,13980
  220. 5380 GOTO 4960
  221. 5400 REM ************************* CALCULATION OF DLASTPAYMENT ***
  222. 5420 PRINT " Please wait. This calculation can take quite a while to run.";
  223. 5440 DBO=DPRINCIPAL
  224. 5460 SI=((SINTEREST/100)/IPAYMENTNUM)*100
  225. 5480 IJ2=IPAYMENTNUM*SYEARS
  226. 5500 FOR IJ1=1 TO IJ2
  227. 5520 IF DBO<0 THEN PRINT CHR$(13);SPC(75);CHR$(13);" The payment entered is too large. Press any key to RECALCULATE. ";:ANS$=INPUT$(1):GOSUB 4860:GOTO 4960
  228. 5540 DBO=DBO-DPAYMENT+INT(DBO*SI+.5)*.01
  229. 5560 NEXT IJ1
  230. 5580 TEMPSTORE=INT((DPAYMENT+DBO)*100+.5)/100
  231. 5600 DLASTPAYMENT=TEMPSTORE
  232. 5620 PRINT CHR$(13);SPC(70);CHR$(13);
  233. 5640 RETURN
  234. 5660 REM *******************MENU CHOICE D*****************************
  235. 5680 PRINT CLS$;
  236. 5700 PRINT " REMAINING BALANCE ON A LOAN"
  237. 5720 PRINT " Finds the balance after a specified number of payments."
  238. 5740 GOSUB 1920
  239. 5760 PRINT " (A) ";:GOSUB 3360
  240. 5780 PRINT " (B) ";:GOSUB 4520
  241. 5800 PRINT " (C) ";:GOSUB 3500
  242. 5820 PRINT " (D) ";:GOSUB 3420
  243. 5840 PRINT " (E) ";:GOSUB 5900
  244. 5860 PRINT " --- ";:GOSUB 3560
  245. 5880 GOTO 5980
  246. 5900 PRINT "Last Payment made (#,year):";
  247. 5920 PRINT USING " ###";SLSTPAYMENT;
  248. 5940 PRINT ",";SLSTPAYMENTYEAR
  249. 5960 RETURN
  250. 5980 PRINT:PRINT
  251. 6000 IF (DPAYMENT*DPRINCIPAL*IPAYMENTNUM*SINTEREST*SLSTPAYMENT*SLSTPAYMENTYEAR)<>0 THEN GOSUB 6360 ELSE LET DREMAINING=0:GOTO 6080
  252. 6020 PRINT " The calculated REMAINING BALANCE amount is: ";
  253. 6040 PRINT USING "$$#############.##";DREMAINING
  254. 6060 GOSUB 1840:GOSUB 1960:GOTO 6100
  255. 6080 GOSUB 1880:GOSUB 1960
  256. 6100 MENULIST$="MABCDEH"
  257. 6120 GOSUB 1540
  258. 6140 IF MENUNUM%=1 THEN GOTO 2660 ELSE LET MENUNUM%=MENUNUM%-1
  259. 6160 ON MENUNUM% GOSUB 3860,4300,4020,3940,6200,14260
  260. 6180 GOTO 5660
  261. 6200 REM ********************** ROUTINE TO GET SLSTPAYMENT & SLSTPAYMENTYEAR ***
  262. 6220 INPUT " Enter the number of the last payment made for this year.... ",SLSTPAYMENT
  263. 6240 IF SLSTPAYMENT<0 THEN GOSUB 2020:GOTO 6220
  264. 6260 IF SLSTPAYMENT>IPAYMENTNUM THEN PRINT CHR$(7);:PRINT " This value cannot be greater than the number of payments per year. ":GOTO 6220
  265. 6280 INPUT " Now enter the year number to calculate remaining balance.... ",SLSTPAYMENTYEAR
  266. 6300 IF SLSTPAYMENTYEAR<0 THEN GOSUB 2020:GOTO 6280
  267. 6320 IF SLSTPAYMENTYEAR>SYEARS THEN PRINT CHR$(7);:PRINT " This value cannot be greater than the loan term. ":GOTO 6280
  268. 6340 RETURN
  269. 6360 REM ******************* ROUTINE TO CALCULATE DREMAINING ***
  270. 6380 PRINT " Please wait. This calculation can take quite a while to run.";
  271. 6400 DBO=DPRINCIPAL
  272. 6420 SI=SINTEREST/100
  273. 6440 SJ2=IPAYMENTNUM*(SLSTPAYMENTYEAR-1)+SLSTPAYMENT
  274. 6460 SI2=(SI/IPAYMENTNUM)*100
  275. 6480 FOR SJ1=1 TO SJ2
  276. 6500 DBO=DBO-DPAYMENT+INT(DBO*SI2+.5)*.01
  277. 6520 NEXT SJ1
  278. 6540 DREMAINING=INT(DBO*100+.5)/100
  279. 6560 PRINT CHR$(13);SPC(75);CHR$(13);
  280. 6580 RETURN
  281. 6600 REM *******************MENU CHOICE E*****************************
  282. 6620 PRINT CLS$;
  283. 6640 PRINT " TERM OF A LOAN"
  284. 6660 PRINT " Finds the period of time needed to repay."
  285. 6680 GOSUB 1920
  286. 6700 PRINT " (A) ";:GOSUB 3360
  287. 6720 PRINT " (B) ";:GOSUB 4520
  288. 6740 PRINT " (C) ";:GOSUB 3420
  289. 6760 PRINT " (D) ";:GOSUB 3500
  290. 6780 PRINT:PRINT
  291. 6800 IF (DPAYMENT*DPRINCIPAL*SINTEREST*IPAYMENTNUM)<>0 THEN GOSUB 7040 ELSE LET SYEARS=0:GOTO 6900
  292. 6820 PRINT " The calculated TERM OF LOAN is: ";
  293. 6840 PRINT USING "####.#";SYEARS;
  294. 6860 PRINT " years"
  295. 6880 GOSUB 1840:GOSUB 1960:GOTO 6920
  296. 6900 GOSUB 1880:GOSUB 1960
  297. 6920 MENULIST$="MABCDH"
  298. 6940 GOSUB 1540
  299. 6960 IF MENUNUM%=1 THEN GOTO 2660 ELSE LET MENUNUM%=MENUNUM%-1
  300. 6980 ON MENUNUM% GOSUB 3860,4300,3940,4020,14520
  301. 7000 GOTO 6600
  302. 7020 STOP
  303. 7040 REM ********************** ROUTINE TO CALCULATE SYEARS ***
  304. 7060 DTEMPSTORE=DPAYMENT-(DPRINCIPAL*((SINTEREST*.01)/IPAYMENTNUM))
  305. 7080 IF DTEMPSTORE<0 THEN 7160
  306. 7100 SYEAR1=-(LOG(1-(DPRINCIPAL*(SINTEREST/100))/(IPAYMENTNUM*DPAYMENT))/(LOG(1+SINTEREST/100/IPAYMENTNUM)*IPAYMENTNUM))
  307. 7120 SYEARS=INT(SYEAR1*10+.5)/10
  308. 7140 RETURN
  309. 7160 REM --- COMPLAIN IF PAYMENT WILL NOT AMORTIZE LOAN
  310. 7180 PRINT CLS$:PRINT:PRINT:PRINT:PRINT
  311. 7200 DPAYMENT=(INT((DPRINCIPAL*((SINTEREST*.01)/IPAYMENTNUM))*100+.5)*.01)+.01
  312. 7220 PRINT " WARNING"
  313. 7240 PRINT " THE PAYMENT ENTERED IS NOT SUFFICIENT TO AMORTIZE THIS LOAN."
  314. 7260 PRINT " THE MINIMUM PAYMENT NEEDED HAS BEEN CALCULATED AND ENTERED"
  315. 7280 PRINT " FOR YOU. IT IS: ";
  316. 7300 PRINT USING "$$###########.##";DPAYMENT
  317. 7320 PRINT
  318. 7340 PRINT " USE THE MAIN MENU IF YOU WANT TO CALCULATE A DIFFERENT AMOUNT."
  319. 7360 PRINT
  320. 7380 PRINT " PRESS ANY KEY TO CONTINUE....... ";
  321. 7400 ANS$=INPUT$(1)
  322. 7420 GOTO 6600
  323. 7440 REM *******************MENU CHOICE F*****************************
  324. 7460 PRINT CLS$
  325. 7480 PRINT " ANNUAL INTEREST RATE"
  326. 7500 PRINT " Finds the interest rate on a specific loan."
  327. 7520 GOSUB 1920
  328. 7540 PRINT " (A) ";:GOSUB 3360
  329. 7560 PRINT " (B) ";:GOSUB 3560
  330. 7580 PRINT " (C) ";:GOSUB 4520
  331. 7600 PRINT " (D) ";:GOSUB 3500
  332. 7620 PRINT:PRINT
  333. 7640 IF (DPAYMENT*SYEARS*DPRINCIPAL*IPAYMENTNUM)<>0 THEN GOSUB 7860 ELSE LET SINTEREST=0:GOTO 7740
  334. 7660 PRINT " The calculated INTEREST RATE is: ";
  335. 7680 PRINT USING " ###.##";SINTEREST;
  336. 7700 PRINT "%"
  337. 7720 GOSUB 1840:GOSUB 1960:GOTO 7760
  338. 7740 GOSUB 1880:GOSUB 1960
  339. 7760 MENULIST$="MABCDH"
  340. 7780 GOSUB 1540
  341. 7800 IF MENUNUM%=1 THEN GOTO 2660 ELSE LET MENUNUM%=MENUNUM%-1
  342. 7820 ON MENUNUM% GOSUB 3860,4100,4300,4020,14760
  343. 7840 GOTO 7440
  344. 7860 REM ******************* ROUTINE TO CALCULATE SINTEREST ***
  345. 7880 SINTEREST=13
  346. 7900 PRINT " Please wait. This calculation can take a while to run.";
  347. 7920 SI2=0
  348. 7940 DR1=(SINTEREST*.01*DPRINCIPAL/IPAYMENTNUM)/(1-1/((SINTEREST*.01/IPAYMENTNUM+1)^(IPAYMENTNUM*SYEARS)))
  349. 7960 DR1=INT(DR1*100+.5)/100
  350. 7980 DI3=ABS(SINTEREST-SI2)/2
  351. 8000 SI2=SINTEREST
  352. 8020 IF SINTEREST>=25.9 THEN PRINT CHR$(13);SPC(70);CHR$(13);:PRINT:PRINT:PRINT " The calculated INTEREST rate is in excess of 25%. This program cannot":PRINT " determine the exact rate. Press any key to return to the MAIN MENU. ";
  353. 8040 IF SINTEREST>=25.9 THEN ANS$=INPUT$(1):SINTEREST=25.5:GOTO 2720
  354. 8060 IF (DR1-DPAYMENT)<.02 AND (DR1-DPAYMENT)>-.02 THEN PRINT CHR$(13);SPC(70);CHR$(13);:RETURN
  355. 8080 IF DR1>DPAYMENT THEN 8140
  356. 8100 SINTEREST=SINTEREST+DI3
  357. 8120 GOTO 7940
  358. 8140 SINTEREST=SINTEREST-DI3
  359. 8160 GOTO 7940
  360. 8180 REM *******************MENU CHOICE G*****************************
  361. 8200 IF PRINTER=1 THEN LPRINT CHR$(12):PRINTER=0
  362. 8220 TEST=0:DINTTOTAL=0:DPRINTOTAL=0:DINTYEAR=0:DPRINYEAR=0
  363. 8240 PRINT CLS$
  364. 8260 PRINT " LOAN AMORTIZATION TABLE"
  365. 8280 PRINT " Provides complete loan progress chart."
  366. 8300 GOSUB 1920
  367. 8320 PRINT " (A) ";:GOSUB 3360
  368. 8340 PRINT " (B) ";:GOSUB 3560
  369. 8360 PRINT " (C) ";:GOSUB 4520
  370. 8380 PRINT " (D) ";:GOSUB 3420
  371. 8400 PRINT " --- ";:GOSUB 3500
  372. 8420 REM
  373. 8440 PRINT:PRINT
  374. 8460 IF TEST=1 THEN GOTO 8500
  375. 8480 IF (DPAYMENT*SYEARS*DPRINCIPAL*SINTEREST*IPAYMENTNUM)<>0 THEN GOTO 8640 ELSE LET TEST=0
  376. 8500 PRINT " Choose from the above menu the item that you would like to change.":GOSUB 1960
  377. 8520 MENULIST$="MABCDH"
  378. 8540 GOSUB 1540
  379. 8560 IF MENUNUM%=6 THEN GOSUB 15000:GOTO 8180
  380. 8580 IF MENUNUM%=1 THEN GOTO 2660 ELSE LET MENUNUM%=MENUNUM%-1
  381. 8600 ON MENUNUM% GOTO 4380,6600,3240,7440
  382. 8620 LET TEST=0:GOTO 8180
  383. 8640 REM
  384. 8660 PRINT " THE VARIABLES MUST BE PRECISELY CALCULATED FOR THE TABLE TO BE CORRECT."
  385. 8680 PRINT : PRINT " Do you want to change any of the above VARIABLES?"
  386. 8700 PRINT " ENTER (Y)ES or (N)O or ..."; : PRINT
  387. 8720 MENULIST$="MYNH"
  388. 8740 GOSUB 1960
  389. 8760 GOSUB 1540
  390. 8780 IF MENUNUM%=4 THEN GOSUB 15000:GOTO 8180
  391. 8800 IF MENUNUM%=1 THEN GOTO 2660 ELSE LET MENUNUM%=MENUNUM%-1
  392. 8820 ON MENUNUM% GOTO 8840,8900
  393. 8840 LET TEST=1:GOTO 8240
  394. 8860 REM
  395. 8880 REM
  396. 8900 REM ********************BEGINNING OF AMORTIZATION ROUTINE *****
  397. 8920 PRINT CLS$
  398. 8940 SCOUNTER=0
  399. 8960 LET TEST=0
  400. 8980 PRINT " Do you want this run to go to the printer? (Enter Y or N) ";
  401. 9000 GOSUB 1740
  402. 9020 ON MENUNUM% GOTO 9040,9080
  403. 9040 LET PRINTER=1:REM-- SET PRINTER FLAG TO ON
  404. 9060 GOTO 9100
  405. 9080 LET PRINTER=0:REM-- SET PRINTER FLAG OFF
  406. 9100 PRINT:PRINT:PRINT " Do you want to display annual totals only? (Enter Y or N) ";:GOSUB 1740:ON MENUNUM% GOTO 9120,9160
  407. 9120 LET IDISPLAY=1
  408. 9140 GOTO 9180
  409. 9160 LET IDISPLAY=0
  410. 9180 REM - INITIALIZE VARIABLES
  411. 9200 GOSUB 13100
  412. 9220 SI=(SINTEREST*.01)/IPAYMENTNUM:REM CONVERT INTEREST TO DECIMAL
  413. 9240 IPAGE=0
  414. 9260 GOSUB 10020
  415. 9280 DBO=DPRINCIPAL
  416. 9300 DPAY=(INT(DPAYMENT*100+.5))*.01
  417. 9320 SJ2=IPAYMENTNUM*SYEARS
  418. 9340 SI2=(SINTEREST/IPAYMENTNUM)
  419. 9360 SCURRENTYEAR=1
  420. 9380 MENUNUM%=0
  421. 9400 REM ************************** HERE'S THE LOOP *********
  422. 9420 FOR SJ1=1 TO SJ2
  423. 9440 DI3=(INT(DBO*SI2+.5))*.01
  424. 9460 IF DBO<DPAYMENT THEN DPAY=DBO+DI3
  425. 9480 DBO=DBO-DPAY+DI3
  426. 9500 DBI=DPAY-DI3
  427. 9520 IF MENUNUM%=3 THEN GOTO 9580
  428. 9540 IF SCOUNTER>=21 THEN GOSUB 10740:ON MENUNUM% GOTO 9620,8180,9580
  429. 9560 GOTO 9620
  430. 9580 IF SCOUNTER>=21 THEN GOSUB 12100
  431. 9600 IF MENUNUM%=2 GOTO 8180
  432. 9620 DINTYEAR=DINTYEAR+DI3:DPRINYEAR=DPRINYEAR+DBI
  433. 9640 GOSUB 10400
  434. 9660 IF SJ1=SCURRENTYEAR*IPAYMENTNUM THEN DINTTOTAL=DINTTOTAL+DINTYEAR:DPRINTOTAL=DPRINTOTAL+DPRINYEAR:GOSUB 11780:SCURRENTYEAR=SCURRENTYEAR+1
  435. 9680 IF PRINTER=1 AND SLCOUNTER>=60 THEN GOSUB 12940:GOSUB 12460
  436. 9700 NEXT SJ1:REM ***************** END OF LOOP ************************
  437. 9720 IF SJ1<>SCURRENTYEAR*IPAYMENTNUM THEN DINTTOTAL=DINTTOTAL+DINTYEAR:DPRINTOTAL=DPRINTOTAL+DPRINYEAR
  438. 9740 IF SCOUNTER>=21 THEN GOSUB 10740:ON MENUNUM% GOTO 9760,8180,9760 ESLE GOSUB 12100
  439. 9760 PRINT:PRINT "*TOTALS: ";
  440. 9780 IF PRINTER=0 THEN GOTO 9840
  441. 9800 IF SLCOUNTER>=60 THEN GOSUB 12940:GOSUB 12460
  442. 9820 LPRINT "*TOTALS: ";
  443. 9840 PRINT USING "$$###########.##";DINTTOTAL;
  444. 9860 IF PRINTER=0 THEN GOTO 9900
  445. 9880 LPRINT USING "$$###########.##";DINTTOTAL;
  446. 9900 SCOUNTER=SCOUNTER+2
  447. 9920 PRINT USING " $$###########.##";DPRINTOTAL
  448. 9940 IF PRINTER=0 THEN GOTO 10000
  449. 9960 LPRINT USING " $$###########.##";DPRINTOTAL
  450. 9980 SLCOUNTER=SLCOUNTER+2
  451. 10000 GOTO 11480
  452. 10020 REM - ROUTINE TO SET UP SCREEN DISPLAY
  453. 10040 IF PRINTER=1 THEN GOSUB 10960
  454. 10060 PRINT CLS$;
  455. 10080 PRINT " ********************* LOAN AMORTIZATION TABLE ***********************"
  456. 10100 SCOUNTER=SCOUNTER+4
  457. 10120 PRINT " PRINCIPAL AMOUNT: ";
  458. 10140 PRINT USING "$$###########.##";DPRINCIPAL;
  459. 10160 PRINT " PAYMENT AMOUNT: ";
  460. 10180 PRINT USING "$$#########.##";DPAYMENT
  461. 10200 PRINT " TERM IN YEARS: ";
  462. 10220 PRINT USING " ###.# ";SYEARS;
  463. 10240 PRINT " INTEREST RATE: ";
  464. 10260 PRINT USING " ###.##";SINTEREST;:PRINT "%"
  465. 10280 PRINT " ***********************************************************************"
  466. 10300 REM - HEADER FOR SCREEN DISPLAY PAGE
  467. 10320 PRINT " PAYMENT # INTEREST PRINCIPAL BALANCE AFTER PAYMENT"
  468. 10340 PRINT " -----------------------------------------------------------------------"
  469. 10360 LET SCOUNTER=SCOUNTER+2
  470. 10380 RETURN
  471. 10400 REM - SCREEN DISPLAY FOR EACH PAYMENT
  472. 10420 IF IDISPLAY=1 OR SCURRENTYEAR<ISTART THEN RETURN
  473. 10440 PRINT USING " #### ";SJ1;
  474. 10460 IF PRINTER=0 THEN GOTO 10500
  475. 10480 LPRINT USING " #### ";SJ1;
  476. 10500 PRINT USING "$$###########.##";DI3;
  477. 10520 IF PRINTER=0 THEN GOTO 10560
  478. 10540 LPRINT USING "$$###########.##";DI3;
  479. 10560 PRINT USING "$$#############.##";DBI;
  480. 10580 IF PRINTER=0 THEN GOTO 10620
  481. 10600 LPRINT USING "$$#############.##";DBI;
  482. 10620 PRINT USING " $$#############.##";DBO
  483. 10640 IF PRINTER=0 THEN GOTO 10700
  484. 10660 LPRINT USING " $$#############.##";DBO
  485. 10680 LET SLCOUNTER=SLCOUNTER+1
  486. 10700 SCOUNTER=SCOUNTER+1
  487. 10720 RETURN
  488. 10740 REM --- ******************** SCREEN DISPLAY PAUSE ROUTINE
  489. 10760 ITEMPSTORE=22-SCOUNTER
  490. 10780 FOR ICOUNT=1 TO ITEMPSTORE
  491. 10800 PRINT
  492. 10820 NEXT ICOUNT
  493. 10840 PRINT "DISPLAY HAS BEEN PAUSED. SELECT: (D)ISABLE PAUSE, (C)ONTINUE, OR (A)BORT."
  494. 10860 SCOUNTER=0
  495. 10880 MENULIST$="CAD"
  496. 10900 GOSUB 1540
  497. 10920 IF MENUNUM%<>2 THEN GOSUB 10060
  498. 10940 RETURN
  499. 10960 REM - SUBROUTINE TO SET UP PRINTER AND CHECK TO SEE IF IT'S READY
  500. 10980 PRINT
  501. 11000 PRINT " NOW CHECKING TO SEE IF THE PRINTER IS READY TO ACCEPT PRINTOUT."
  502. 11020 PRINT
  503. 11040 PRINT "PRINTER IS NOT READY.... PLEASE CHECK IT. PROCESSING CANNOT CONTINUE.";:LPRINT CHR$(13);
  504. 11060 PRINT CHR$(13);SPC(70);
  505. 11080 PRINT:PRINT " THE PRINTER IS NOW READY..... HERE WE GO!"
  506. 11100 FOR HI=1 TO 300
  507. 11120 NEXT HI
  508. 11140 PRINT CLS$:PRINT:PRINT
  509. 11160 PRINT "WHEN ENTERING THE ITEMS BELOW, DO NOT USE COMMAS. PRESS RETURN WHEN DONE.":PRINT
  510. 11180 PRINT " PRESS THE RETURN TO LEAVE AN ENTRY WITHOUT CHANGING IT.":PRINT:PRINT
  511. 11200 PRINT " (These entries are for the title block on the printout only.":PRINT " You may enter anything you like, but there must be something entered.)":PRINT
  512. 11220 PRINT " Enter a title for this report..... ";:PRINT LABEL$;:PRINT CHR$(13);:PRINT " Enter a title for this report..... ";:INPUT "",LABEL1$
  513. 11240 IF LABEL1$="" THEN GOTO 11260 ELSE LABEL$=LABEL1$
  514. 11260 PRINT:PRINT " Enter today's date..... ";:PRINT DATE$;:PRINT CHR$(13);:PRINT " Enter today's date..... ";:INPUT "",DATE1$
  515. 11280 IF DATE1$="" THEN GOTO 11300 ELSE DATE$=DATE1$
  516. 11300 PRINT:PRINT " Enter the name of the recipient of this report... ";:PRINT PERSON$;:PRINT CHR$(13);:PRINT " Enter the name of the recipient of this report... ";:INPUT "",PERSON1$
  517. 11320 IF PERSON1$="" THEN GOTO 11340 ELSE PERSON$=PERSON1$
  518. 11340 PRINT:PRINT " Are the above entries correct? (Y or N) ";:GOSUB 1740:ON MENUNUM% GOTO 11360,11140
  519. 11360 REM
  520. 11380 LPRINT:PRINT CLS$:PRINT:PRINT:PRINT " NOW SENDING TITLE BLOCK TO PRINTER.... PLEASE STAND BY."
  521. 11400 LPRINT " ";LABEL$
  522. 11420 LPRINT:LPRINT " ";" prepared for: ";PERSON$;" on ";DATE$
  523. 11440 LPRINT:GOSUB 12460:SLCOUNTER=11
  524. 11460 RETURN
  525. 11480 REM
  526. 11500 ITEMPSTORE=22-SCOUNTER
  527. 11520 FOR ICOUNT=1 TO ITEMPSTORE
  528. 11540 PRINT
  529. 11560 NEXT ICOUNT
  530. 11580 IF PRINTER=1 THEN GOSUB 12940
  531. 11600 PRINT " PRESS (Y) TO RETURN TO MENU."
  532. 11620 MENULIST$="Y"
  533. 11640 GOSUB 1540
  534. 11660 REM
  535. 11680 GOTO 8180
  536. 11700 STOP
  537. 11720 REM
  538. 11740 REM
  539. 11760 REM
  540. 11780 REM - SUBROUTINE FOR PRINTING YEARLY TOTALS
  541. 11800 IF SCURRENTYEAR<ISTART THEN GOTO 12060
  542. 11820 IF SCOUNTER>=21 AND MENUNUM%<>3 THEN GOSUB 10740
  543. 11840 IF PRINTER=1 THEN GOSUB 12760
  544. 11860 IF SCOUNTER>=21 AND MENUNUM%=3 THEN GOSUB 12100
  545. 11880 IF IDISPLAY<>1 THEN PRINT:SCOUNTER=SCOUNTER+1
  546. 11900 PRINT "*YEAR:";
  547. 11920 PRINT USING "###";SCURRENTYEAR;
  548. 11940 PRINT USING "$$###########.##";DINTYEAR;
  549. 11960 PRINT USING " $$###########.##";DPRINYEAR;
  550. 11980 PRINT USING " $$#############.##";DBO
  551. 12000 SCOUNTER=SCOUNTER+1
  552. 12020 IF SCOUNTER<21 AND IDISPLAY<>1 THEN PRINT:SCOUNTER=SCOUNTER+1
  553. 12040 IF SJ1<>SJ2 AND SCOUNTER<21 THEN PRINT:SCOUNTER=SCOUNTER+1
  554. 12060 DINTYEAR=0:DPRINYEAR=0
  555. 12080 RETURN
  556. 12100 REM ******************** ROUTINE TO DISABLE SCREEN PAUSE ***********
  557. 12120 TEST$=INKEY$
  558. 12140 IF TEST$=CHR$(13) THEN GOTO 12300
  559. 12160 PRINT CHR$(13);SPC(75);CHR$(13);
  560. 12180 SCOUNTER=0
  561. 12200 PRINT " ******** SCREEN PAUSE DISABLED. PRESS RETURN TO ENABLE. *******";
  562. 12220 FOR ILOOP=1 TO 800
  563. 12240 NEXT ILOOP
  564. 12260 TEST$=INKEY$
  565. 12280 IF TEST$<>CHR$(13) THEN GOSUB 10060:RETURN
  566. 12300 SCOUNTER=0
  567. 12320 PRINT CHR$(13);SPC(75);CHR$(13);
  568. 12340 PRINT " SELECT (C)ONTINUE OR (A)BORT "
  569. 12360 MENULIST$="CA"
  570. 12380 GOSUB 1540
  571. 12400 IF MENUNUM%=1 THEN GOSUB 10060:MENUNUM%=0:RETURN
  572. 12420 IF MENUNUM%=2 THEN RETURN
  573. 12440 STOP
  574. 12460 REM ----------------ROUTINE FOR PRINTER PAGE HEADER-----------------
  575. 12480 LPRINT " ********************* LOAN AMORTIZATION TABLE ***********************"
  576. 12500 LPRINT " PRINCIPAL AMOUNT: ";
  577. 12520 LPRINT USING "$$###########.##";DPRINCIPAL;
  578. 12540 LPRINT " PAYMENT AMOUNT: ";
  579. 12560 LPRINT USING "$$#########.##";DPAYMENT
  580. 12580 LPRINT " TERM IN YEARS: ";
  581. 12600 LPRINT USING " ###.# ";SYEARS;
  582. 12620 LPRINT " INTEREST RATE: ";
  583. 12640 LPRINT USING " ###.##";SINTEREST;:LPRINT "%"
  584. 12660 LPRINT " ***********************************************************************"
  585. 12680 LPRINT " PAYMENT # INTEREST PRINCIPAL BALANCE AFTER PAYMENT"
  586. 12700 LPRINT " -----------------------------------------------------------------------"
  587. 12720 LET SLCOUNTER=6
  588. 12740 RETURN
  589. 12760 REM --------------------------- ROUTINE TO LPRINT YEARLY TOTALS -----
  590. 12780 IF IDISPLAY=1 THEN LPRINT:SLCOUNTER=SLCOUNTER+1
  591. 12800 LPRINT "*YEAR:";
  592. 12820 LPRINT USING "###";SCURRENTYEAR;
  593. 12840 LPRINT USING "$$###########.##";DINTYEAR;
  594. 12860 LPRINT USING " $$###########.##";DPRINYEAR;
  595. 12880 LPRINT USING " $$#############.##";DBO
  596. 12900 LPRINT:SLCOUNTER=SLCOUNTER+2
  597. 12920 RETURN
  598. 12940 REM ---------- ROUTINE TO PUT PAGE NUMBERS ON PRINTOUT
  599. 12960 REM
  600. 12980 IPAGE=IPAGE+1
  601. 13000 FOR PAGECOUNT=1 TO (62-SLCOUNTER)
  602. 13020 LPRINT:NEXT PAGECOUNT
  603. 13040 LPRINT " ";IPAGE
  604. 13060 LPRINT CHR$(12)
  605. 13080 RETURN
  606. 13100 REM SUBROUTINE FOR SETTING FLAG FOR FIRST YEAR OF PRINTOUT
  607. 13120 PRINT:PRINT:PRINT " Do you want to start with a year other than 1? (Y or N) ";
  608. 13140 GOSUB 1740
  609. 13160 IF MENUNUM%=2 THEN ISTART=0:RETURN
  610. 13180 INPUT " Please enter the year you want to start with..... ",ISTART
  611. 13200 IF ISTART>SYEARS THEN LET ISTART=SYEARS
  612. 13220 RETURN
  613. 13240 REM *******************MENU CHOICE H*****************************
  614. 13260 PRINT " From the above menu, please select the item you need help with."
  615. 13280 MENULIST$="ABCDEFGX"
  616. 13300 GOSUB 1540
  617. 13320 ON MENUNUM% GOSUB 13360,13760,13980,14260,14520,14760,15000,15500
  618. 13340 GOTO 1320
  619. 13360 REM ---- MENU SELECTION A
  620. 13380 PRINT CLS$
  621. 13400 PRINT
  622. 13420 PRINT " *** LOAN PRINCIPAL AMOUNT ***"
  623. 13440 PRINT
  624. 13460 PRINT " This module will calculate the amount of money initially borrowed."
  625. 13480 PRINT " You must enter the amount of the payments, the interest rate, the"
  626. 13500 PRINT " number of payments within a year and the number of years over which"
  627. 13520 PRINT " the loan is going to be amortized."
  628. 13540 PRINT:GOSUB 13560:RETURN
  629. 13560 PRINT " Using the menu, select each item that needs to be entered. As soon"
  630. 13580 PRINT " as you've entered the needed variables, the program will perform the"
  631. 13600 PRINT " calculation and display the results. To try a different variable,"
  632. 13620 PRINT " use the menu to select which one you want to change. Enter the new"
  633. 13640 PRINT " value and the calculation will be redone automatically for you."
  634. 13660 PRINT
  635. 13680 PRINT " You cannot enter a negative number for any variable in this program."
  636. 13700 PRINT " Do not use any commas when entering variables. Press the return"
  637. 13720 PRINT " after entering each variable."
  638. 13740 GOSUB 15540:RETURN
  639. 13760 REM HELP FOR MENU CHOICE B
  640. 13780 PRINT CLS$;
  641. 13800 PRINT
  642. 13820 PRINT " ** REGULAR PAYMENT **"
  643. 13840 PRINT
  644. 13860 PRINT " This module will calculate the amount of the regular payment needed to"
  645. 13880 PRINT " pay off a loan over a given time. You must enter the amount borrowed,"
  646. 13900 PRINT " the interest rate, the number of payments per year and the number of years"
  647. 13920 PRINT " or term of the loan."
  648. 13940 PRINT
  649. 13960 GOSUB 13560:RETURN
  650. 13980 REM HELP FOR ITEM C
  651. 14000 PRINT CLS$;
  652. 14020 PRINT
  653. 14040 PRINT " ** LAST PAYMENT ON A LOAN **"
  654. 14060 PRINT
  655. 14080 PRINT " Because of rounding errors, the last payment on a loan is usually slightly"
  656. 14100 PRINT " different than the regular payment. This module actually does a com-"
  657. 14120 PRINT " plete loan amortization table in memory and calculates the exact amount"
  658. 14140 PRINT " of the final payment. You must enter the regular payment, the principal,"
  659. 14160 PRINT " the term (in years) the interest rate and the number of payments per"
  660. 14180 PRINT " year. If any of these variables need to be calculated, use the other"
  661. 14200 PRINT " modules first and then select this module from the MAIN MENU."
  662. 14220 PRINT
  663. 14240 GOSUB 13560:RETURN
  664. 14260 REM HELP FOR MENU ITEM D
  665. 14280 PRINT CLS$
  666. 14300 PRINT
  667. 14320 PRINT " ** REMAINING BALANCE ON A LOAN **"
  668. 14340 PRINT
  669. 14360 PRINT " This module will calculate the amount remaining on the principal of a"
  670. 14380 PRINT " loan after a specific number of payments have been made. Typically,"
  671. 14400 PRINT " this would be needed in the event that it was desired to pay off a loan"
  672. 14420 PRINT " early. The module actually does a loan amortization table in memory"
  673. 14440 PRINT " and stops at the payment you have specified. The balance of the
  674. 14460 PRINT " PRINCIPAL is then displayed.
  675. 14480 PRINT
  676. 14500 GOSUB 13560:RETURN
  677. 14520 REM HELP FOR MENU ITEM E
  678. 14540 PRINT CLS$
  679. 14560 PRINT
  680. 14580 PRINT " ** TERM OF A LOAN **
  681. 14600 PRINT
  682. 14620 PRINT " This module will determine the time (in years) needed to repay a loan"
  683. 14640 PRINT " for a given set of variables. For example, this could be used to see
  684. 14660 PRINT " what effect changing the payment or the interest would have on the
  685. 14680 PRINT " period required to repay the loan. The program will not allow an entry
  686. 14700 PRINT " that would result in the loan being under-amortized such as would happen
  687. 14720 PRINT " in the event that the payment was too small to ever repay the loan.
  688. 14740 PRINT:GOSUB 13560:RETURN
  689. 14760 REM HELP FOR MENU ITEM F
  690. 14780 PRINT CLS$
  691. 14800 PRINT
  692. 14820 PRINT " ** ANNUAL INTEREST RATE ON A LOAN **
  693. 14840 PRINT
  694. 14860 PRINT " This module will calculate the interest rate on a loan given a specific
  695. 14880 PRINT " set of variables. This is useful if the interest rate is unknown or if
  696. 14900 PRINT " it is desired to determine the impact on interest of changes in other
  697. 14920 PRINT " variables. The program cannot calculate interest rates that are greater
  698. 14940 PRINT " than 25%.
  699. 14960 PRINT
  700. 14980 GOSUB 13560:RETURN
  701. 15000 REM HELP FOR ITEM G
  702. 15020 PRINT CLS$;
  703. 15040 PRINT " ** LOAN AMORTIZATION TABLE **
  704. 15060 PRINT
  705. 15080 PRINT " This module will show the amount of interest and principal paid for
  706. 15100 PRINT " each payment on a loan. This listing can be displayed on the console
  707. 15120 PRINT " screen only or it can be listed to a printer simultaneously. Since
  708. 15140 PRINT " the table can only be accurate if the variables are precisely calculated,
  709. 15160 PRINT " you have to use other modules to make changes to the variables before
  710. 15180 PRINT " you can run the amortization table module. Selecting an item from
  711. 15200 PRINT " the menu to be changed will automatically chain you into the appropriate
  712. 15220 PRINT " module.
  713. 15240 PRINT
  714. 15260 PRINT " If the printer is selected, you will be asked for information to go
  715. 15280 PRINT " on the title block on the printer. This information will be saved
  716. 15300 PRINT " and does not have to be reentered if you go to another module and then
  717. 15320 PRINT " return to the amortization module.
  718. 15340 PRINT
  719. 15360 PRINT " You should check the printer to be sure it is ready prior to trying
  720. 15380 PRINT " to send a listing to the printer. If the printer is not ready, the
  721. 15400 PRINT " program will display a message and the program will stop. If the"
  722. 15420 PRINT " printer cannot be made ready, you will have to abort the program using"
  723. 15440 PRINT " the ^C key."
  724. 15460 PRINT
  725. 15480 GOSUB 15540:RETURN
  726. 15500 REM
  727. 15520 REM
  728. 15540 PRINT:PRINT " PRESS ANY KEY TO RETURN TO THE MENU. ";:ANS$=INPUT$(1):RETURN
  729. 15560 REM
  730. 15580 REM *******************MENU CHOICE X*****************************
  731. 15600 PRINT CLS$
  732. 15620 PRINT
  733. 15640 PRINT
  734. 15660 PRINT " RETURN TO OPERATING SYSTEM? (Y OR N)"
  735. 15680 MENULIST$="YN"
  736. 15700 GOSUB 1540
  737. 15720 ON MENUNUM% GOTO 15760,2660
  738. 15740 REM
  739. 15760 PRINT
  740. 15780 PRINT
  741. 15800 PRINT
  742. 15820 PRINT " Now returning control to the operating system."
  743. 15840 PRINT
  744. 15860 SYSTEM
  745. 15880 REM "L" TEST LOAD OPTION
  746. 15900 DPRINCIPAL=15000
  747. 15920 SINTEREST=8
  748. 15940 DPAYMENT=263
  749. 15960 SYEARS=6
  750. 15980 IPAYMENTNUM=12
  751. 16000 PRINT " ******** NOW LOADING TEST VALUES INTO VARIABLES *******";
  752. 16020 FOR G=1 TO 200
  753. 16040 NEXT G
  754. 16060 PRINT CHR$(13);SPC(70);CHR$(13);
  755. 16080 MENULIST$="ABCDEFGHX"
  756. 16100 GOSUB 1580
  757. 16120 GOTO 3220