10 : 20 : 30 : 40 : 50 : 60 : 70 REM" Program by RUSHDEN ROY a 'L PLATE' programmer for 8-Bit Software 80 REM" On a Master 128 Feb.94 (Thanks to Mr D Pritchard-Jones 3PM for help with the regular savings formula) 90 ON ERROR GOTO 2270 100 MODE7 110 PROCcurseroff 120 PROCROY 130 PROCfirstpage 140 PROCmenu 150 @%=&2020A 160 END 170 DEF PROCfirstpage 180 PROCdh(6,9,1,"A collection of") 190 PROCdh(6,11,1,"income and investment") 200 PROCdh(6,13,1,"programs and a life") 210 PROCdh(6,15,1," expectation table.") 220 PROCspacemenu2 230 G$=GET$ 240 ENDPROC 250 DEF PROCinterestonly 260 PROCcurseron 270 CLS 280 FOR c =1 TO 4 290 PRINTCHR$(132)CHR$(157) 300 NEXT 310 PROCdh(3,0,1,"LUMP SUM INVESTMENT REQUIRED") 320 PROCdh(3,2,1,"FOR A MONTHLY INCOME") 330 PROCdh(6,5,1,"Interest paid only ") 340 INPUT'" Income required (monthly) ` "inc 350 INPUT TAB(0,11)" Interest rate (% per ann) % "int 360 IF int <1 PRINT TAB(0,11);STRING$(38," ") 370 IF int <1 GOTO 350 380 int=int/100 390 inv=inc*12/int 400 PRINT'CHR$(148);STRING$(38,",") 410 PROCcurseroff 420 PRINT'" An investment of ` ";inv 430 PRINT'" will provide a " 440 PRINT'" monthly income of` ";inc 450 PROCspacemenu 460 *FX21 470 IF GET$<>" "CLS:PROCmenu:ELSE PROCinterestonly 480 ENDPROC 490 DEF PROCspacemenu 500 PRINTTAB(0,22)CHR$(132)CHR$(157) 510 PRINTTAB(0,23)CHR$(132)CHR$(157) 520 PROCdh(3,22,0,"Press SPACE to use this again") 530 PROCdh(3,23,0,"or any other key for the menu") 540 ENDPROC 550 DEF PROCspacemenu2 560 PRINTTAB(0,23)CHR$(132)CHR$(157) 570 PROCdh(3,23,0,"Press any key for the menu") 580 ENDPROC 590 DEF PROCdh(C%,L%,D%,A$) 600 IF D% A$=CHR$(141)+A$ 610 X%=(40-LENA$)DIV 2-1 620 FORY%=L%TOL%+D%:PRINTTAB(X%,Y%);CHR$(128+C%);A$:NEXT 630 ENDPROC 640 DEFPROCdhr(c,x,y,r%):FOR J=0TO1:PRINTTAB(x,y+J);CHR$(141);CHR$(128+c);r%:NEXT:ENDPROC 650 DEF PROCinfothers 660 CLS 670 FOR c =1 TO 2 680 PRINTCHR$(132)CHR$(157) 690 NEXT 700 PROCdh(3,0,1,"INFORMATION ABOUT OTHER PROGRAMS.") 710 PROCdh(3,3,1,"Mortgage Calculator.") 720 PROCdh(6,6,0,"This is a very detailed and") 730 PROCdh(6,7,0,"interesting program about") 740 PROCdh(6,8,0,"mortgage payments.") 750 PROCdh(6,9,0,"The program by Mr D Pritchard-Jones") 760 PROCdh(6,10,0,"is on the 8-BIT disc Issue 26 April 93") 770 PRINT'CHR$(148);STRING$(38,",") 780 PROCdh(3,14,1,"Financial Futures. ") 790 PROCdh(6,17,0,"This program considers saving for") 800 PROCdh(6,18,0,"retirement. By Mr Ian Crawford.") 810 PROCdh(6,19,0,"Interesting, entertaining, frightening!") 820 PROCdh(6,20,0,"Published in BEEBUG Vol.12 No.6 Nov.93") 830 PROCspacemenu2 840 *FX21 850 G$=GET$:PROCmenu 860 ENDPROC 870 DEF PROCcaplusint 880 CLS 890 PROCcurseron 900 FOR c =1 TO 4 910 PRINTCHR$(132)CHR$(157) 920 NEXT 930 PROCdh(3,0,1,"LUMP SUM INVESTMENT REQUIRED") 940 PROCdh(3,2,1,"FOR A MONTHLY INCOME") 950 PROCdh(6,5,1,"Interest and capital paid") 960 PRINT'" How many years do you" 970 INPUT" require an income for ? "years 980 INPUT'" Income required (monthly)` "inca 990 INPUT TAB(0,13)" Interest rate (% per ann)% "inta 1000 IF inta <1 PRINT TAB(0,13);STRING$(38," ") 1010 IF inta <1 GOTO 990 1020 PRINT'CHR$(148);STRING$(38,",") 1030 PROCcurseroff 1040 @%=&2020A 1050 inta=inta/100 1060 inta=inta/12 1070 temp=(1+inta)^(12*years) 1080 inva=inca*(temp-1)/inta/temp 1090 PRINT'" An investment of` ";inva"will" 1100 PRINT'" provide a monthly income of` ";inca'" for "STR$(years)" years." 1110 PROCspacemenu 1120 *FX21 1130 IF GET$<>" "CLS:PROCmenu:ELSE PROCcaplusint 1140 ENDPROC 1150 DEF PROCregsave 1160 CLS 1170 PROCcurseron 1180 FOR c =1 TO 4 1190 PRINTCHR$(132)CHR$(157) 1200 NEXT 1210 PROCdh(3,0,1,"PLANNED REGULAR SAVINGS") 1220 PROCdh(3,2,1,"OVER A SET NUMBER OF YEARS") 1230 INPUT'" Amount to be saved annually ` "save 1240 INPUT TAB(0,7)" Interest rate (% per ann) % "intb 1250 IF intb <1 PRINT TAB(0,7);STRING$(38," ") 1260 IF intb <1 GOTO 1240 1270 INPUT'" Over how many years ? "yearsb 1280 @%=&2020A 1290 intb=intb/100 1300 total=save*((1+intb)^(yearsb+1)-(1+intb))/intb 1310 PRINT'CHR$(148);STRING$(38,",") 1320 PROCcurseroff 1330 PRINT'" ` ";save"a year saved " 1340 @%=&90A 1350 PRINT'" with interest at";intb*100;"%" 1360 PRINT'" over";yearsb;"years" 1370 @%=&20209 1380 PRINT'" =`";total 1390 PROCspacemenu 1400 *FX21 1410 IF GET$<>" "CLS:PROCmenu:ELSE PROCregsave 1420 ENDPROC 1430 DEF PROClifexp 1440 CLS 1450 FOR c =1 TO 2 1460 PRINTCHR$(132)CHR$(157) 1470 NEXT 1480 PROCdh(3,0,1,"LIFE EXPECTATION TABLE") 1490 PRINTCHR$(134);" Expected life years after shown age." 1500 PRINTCHR$(134);" Ma=Male Fe=Female (Scorce Ass. Co.)" 1510 PRINT"Age Ma. Fe.:Age Ma. Fe.:Age Ma. Fe." 1520 PRINT" 17 57 64 : 35 40 46 : 53 24 30" 1530 PRINT" 18 56 63 : 36 39 45 : 54 23 29" 1540 PRINT" 19 56 62 : 37 38 43 : 55 22 28" 1550 PRINT" 20 55 61 : 38 37 43 : 56 21 27" 1560 PRINT" 21 54 60 : 39 36 42 : 57 20 26" 1570 PRINT" 22 53 59 : 40 35 41 : 58 20 25" 1580 PRINT" 23 53 58 : 41 34 40 : 59 19 24" 1590 PRINT" 24 51 57 : 42 33 39 : 60 18 23" 1600 PRINT" 25 50 56 : 43 32 38 : 61 17 22" 1610 PRINT" 26 49 55 : 44 32 38 : 62 17 22" 1620 PRINT" 27 48 54 : 45 31 37 : 63 16 21" 1630 PRINT" 28 47 53 : 46 30 36 : 64 15 20" 1640 PRINT" 29 46 52 : 47 29 35 : 65 15 19" 1650 PRINT" 30 45 51 : 48 28 34 : 66 14 18" 1660 PRINT" 31 44 50 : 49 27 33 : 67 13 17" 1670 PRINT" 32 43 49 : 50 26 32 : 68 13 16" 1680 PRINT" 33 42 48 : 51 25 31 : 69 12 15" 1690 PRINT" 34 41 47 : 52 24 30 : 70 12 15" 1700 PROCspacemenu2 1710 *FX21 1720 G$=GET$:PROCmenu 1730 ENDPROC 1740 DEF PROCmenu 1750 PROCcurseroff 1760 *FX11,0 1770 CLS 1780 PRINTCHR$(132)CHR$(157) 1790 PRINTCHR$(132)CHR$(157) 1800 PROCdh(3,0,1,"MENU") 1810 PRINT'''CHR$(129)" A,";CHR$(134);"Investment with a monthly income." 1820 PRINTCHR$(134)" (Interest only)" 1830 PRINT'CHR$(129)" B,"CHR$(134);"Investment with a monthly income." 1840 PRINTCHR$(134)" (Interest and capital)" 1850 PRINT'CHR$(129)" C,"CHR$(134);"Regular savings." 1860 PRINTCHR$(134)" (With int. after a term of years)" 1870 PRINT'CHR$(129)" D,"CHR$(134);"Life expectation tables." 1880 PRINTCHR$(134)" (Not for the faint-hearted!)" 1890 PRINT'CHR$(129)" E,"CHR$(134);"Info. about two other interesting" 1900 PRINTCHR$(134)" money progs.to note.(8-BIT/BEEBUG)" 1910 PRINT'CHR$(129)" Q,"CHR$(134);"Quit the program." 1920 PRINTTAB(0,23)CHR$(132)CHR$(157) 1930 PROCdh(3,23,0,"Press A, B, C, D, E, or Q") 1940 REPEAT 1950 choice$=GET$ 1960 *FX21 1970 IF choice$="A"OR choice$="a" PROCinterestonly 1980 IF choice$="B"OR choice$="b" PROCcaplusint 1990 IF choice$="C"OR choice$="c" PROCregsave 2000 IF choice$="D"OR choice$="d" PROClifexp 2010 IF choice$="E"OR choice$="e" PROCinfothers 2020 IF choice$="Q"OR choice$="q" PROCquit 2030 UNTIL FALSE 2040 ENDPROC 2050 DEF PROCquit 2060 CLS:PRINTTAB(13,10)"BYE FROM ROY." 2070 VDU23,1,1;0;0;0; 2080 @%=&90A 2090 *FX12,0 2100 END 2110 ENDPROC 2120 DEF PROCcurseroff 2130 VDU23,1,0;0;0;0; 2140 ENDPROC 2150 DEF PROCcurseron 2160 VDU23,1,1;0;0;0; 2170 ENDPROC 2180 DEFPROCROY 2190 PRINT"7`+47``57k`5 ````` PROGRAM BY ````````" 2200 PRINT"5b(55( 5m h%7`+4757`k 7k`57`k 7e757`k" 2210 PRINT"uzp5upp5jpz 5( 5555js05 n15bs550!5u0`5" 2220 PRINT"ppppppppppp upp5u5upp5uzp5upp5u7t5upp5" 2230 PRINT 2240 PRINT" FOR 8-BIT SOFTWARE" 2250 PRINT""' 2260 ENDPROC 2270 IF ERR=17 THEN PROCmenu ELSE MODE 7:REPORT:PRINT" at line ";ERL:PRINT"PLEASE RUN THE PROG. AGAIN"