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