home *** CD-ROM | disk | FTP | other *** search
- 300 rem *******************************
- 400 rem * *
- 500 rem * written by m.d. smith *
- 600 rem * 1000 monte sano blvd.,s.e. *
- 700 rem * huntsville, al 35801 *
- 800 rem * version 8.802 2/14/88 *
- 900 rem * (205) 533-3131 *
- 1000 rem*******************************
- 1100 poke53280,15:poke 53265,11:poke53281,15:rem screen
- 1150 print"[147]"
- 1200 date$="06-01-88"
- 1400 print"[147]"spc(9)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
- 1500 for x=1to10
- 1600 printspc(9)"[221]"spc(20)"[221]"
- 1700 next
- 1800 printspc(9)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
- 1900 print"[145][145][145][145][145][145][145][145][145]"spc(14)" [213]p[212]ime ":print
- 2000 printspc(16)"[208]resents":print
- 2100 printspc(11)"[149][195]alorie [195]alculator":print
- 2200 printspc(13)"[144]by [205]. [196]. [211]mith"
- 2300 print:print:print
- 2400 for y=1to5
- 2500 printspc(7);
- 2600 for x=2to15
- 2700 poke 646,x
- 2800 print" ";
- 2900 next x:print
- 3000 next y
- 3100 printspc(8)"[145][145][145][145][144] [203]eep [195]ount of [195]alories "
- 3200 printspc(8)"[144] [204]oading [196]ata "
- 3300 printspc(8)"[144] [207]ne moment, please "
- 3400 print:print" [208]ublished by [211]oftdisk [208]ublishing, [201]nc."
- 3410 dimct$(50),ft$(50),ct(500),un(99)
- 3420 dimfo$(200),cal$(200),cal(200)
- 3430 dimf$(200),u(200),mi(99),ml$(99)
- 3440 me2$="breakfast":ml=1:poke53280,6:poke 53265,27
- 3500 gosub 9400:printtab(13)"[145][145][145][145][145] "
- 3550 printtab(11)" [146]"
- 3600 gosub 28700:poke 53280,0:poke 53281,0:poke 646,7
- 3700 rem ======================== main menu screen ========================
- 3800 rem print chr$(14)
- 3900 print"[147][176][192][192][192][192][192][192][192][192][192] [195]alorie [195]alculator [192][192][192][192][192][192][192][192][192][174]";
- 4000 for p=1 to 22
- 4100 print "[221][157][157][221]";
- 4200 next p
- 4300 print "[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]";
- 4400 print "[158]":rem cursor ups
- 4500 rem ======================== printer hardcopy =======================
- 4600 poke 53280,0:poke 53281,0:poke 646,7
- 4700 rem
- 4800 rem
- 4900 cd=1:rem set counter for meal incrementer
- 5300 me2$="breakfast":ml=1
- 5500 rem ********** version of feb. 14, 1988 *********
- 5600 rem 3 inst. screens
- 5700 print tab(4)"[196]o you want [201]nstructions ([217]/[206])"
- 5900 getis$:ifis$=""then5900
- 6000 ifis$="[206]" oris$="n"then10400
- 6100 if is$<>"y" and is$<>"[217]" then 5900
- 6400 print"[147][212]his program will allow you to input a"
- 6500 print"days foods and calculate the total "
- 6600 print"calories consumed. [217]ou can do it for"
- 6700 print"any number of meals."
- 6800 print"[212]he screen that you will see will
- 6900 [153]"ask you to input the date and which"
- 7000 [153]"meal or snack you want this called."
- 7100 [153]"(NULL)hen prompted for date and meal,"
- 7200 [153]"pressing <(NULL)val(NULL)(NULL)(NULL)(NULL)> alone, will print"
- 7300 [153]"program date and ";[199](34);"breakfast.";[199](34)""
- 7400 [141]28700
- 7500 [153]"load(NULL)ou will need to type the name of the"
- 7600 [153]"food (spelled correctly)...and wait for"
- 7700 [153]"the program to find it in memory. right$f it"
- 7800 [153]"does, it will then ask you to input the"
- 7900 [153]"amount you have eaten, in units (liquid"
- 8000 [153]"or weight). right$f the food is not found,"
- 8100 [153]"or it is misspelled, you should enter "
- 8200 [153]"";[199](34);"s";[199](34);" to search the food database"
- 8300 [153]"to get the correct spelling or listing."
- 8400 [141]28700
- 8500 [153]"load(NULL)ou must burn 3500 calories more than"
- 8600 [153]"you eat to lose a pound. (NULL)he average"
- 8700 [153]"person will be stable on about 2100-"
- 8800 [153]"2300 calories a day. right$f you eat 1200 "
- 8900 [153]"calories a day, you should lose about"
- 9000 [153]"two pounds a week. ascor shopping, print"
- 9100 [153]"out the entire list of foods as a"
- 9200 [153]"guide to take with you."
- 9300 [141]28700
- 9350 [137] 10400
- 9400 [143] ==== load file of data ====
- 9410 x[178]1:[159] 15,8,15,"i0"
- 9420 [141] 9500:[139] fl[178]1 [167] 9400
- 9440 [159] 2,8,2,"0:calcalc.dta"
- 9450 [141] 9500:[139] fl[178]1 [167] 9400
- 9460 [132]2,fo$(x),cal$(x),cal(x)
- 9470 x[178]x[170]1
- 9480 [139](st [175] 64)[178]0[167]9460
- 9490 [160]2:[160] 15:et[178]x:[142]
- 9500 [161]#15,a$:[139] a$[178]"0" [167] fl[178]0:[142]
- 9505 fl[178]1:[151] 53281,0
- 9510 fl[178]1:[153]"loaddef str$isk valrror: sys"a$;
- 9520 [161]#15,a$:[153]a$;
- 9530 [139] a$[179][177][199](13) [167] 9520
- 9535 [160] 2:[160] 15
- 9540 [153][163]6)"def(open(NULL)def)etry or (open(NULL)def)uit to (NULL)p(NULL)ime?stop"
- 9550 [161] a$:[139] a$[178]"r" [167] [153]"load";:[142]
- 9560 [139] a$[178]"q" [167] 9600
- 9570 [137] 9550
- 9600 [151]204,1:[158] 8[172]4096[170]4
- 10400 [153]"load=======================================sys"
- 10410 [153]"======== lenallenalc right$nput (NULL)creen =========sys"
- 10412 [153]"=======================================sys"
- 10500 [153] [166]2);"(NULL)hat date do you want to use"
- 10600 [153] [166]2);"for your entry ((NULL)(NULL)-str$str$-(NULL)(NULL)) ";
- 10650 rx[178]1:mx[178]8:[141] 32000
- 10700 dl$[178]o1$
- 10710 [153]
- 10800 [139]dl$[178]""[167]dl$[178]date$:[137]10900
- 10900 [153]:[153]" (NULL)he date for this"
- 11000 [153]" entry is....";dl$;"sys"
- 11100 s2[178]0
- 11200 [153]:[153]
- 11300 [153]"(NULL)hat meal is this (or snack)"
- 11400 [153]"(default is breakfast) ";
- 11450 rx[178]2:mx[178]16:[141] 32000
- 11455 me$[178]o1$
- 11500 [139]me$[178]""[167] me$[178]"breakfast"
- 11550 [153]
- 11600 [153]:[153]"(NULL)k, this entry is for ";me$;"sys"
- 11700 [153]:[153]
- 11800 [141]28700
- 11900 [153][199](147);
- 12000 [139]ic[178]0[167]ic[178]1:[143] for first time,set incremental counter to 1
- 12100 [143] cursor 3,10:
- 12200 [153]"printreturn ***** mealplan and calorie *****"
- 12300 [153]" ***** chart for ";dl$;" *****for"
- 12400 [153]" enter food name or 'tfor' to total meal,"
- 12500 [153]" 'sfor' to search food list or 'efor' to end"
- 12600 f[178]1
- 12700 z[178]1
- 12800 [153]"sysname of food: cmd";
- 12810 rx[178]3:mx[178]22:[141] 32000
- 12815 [139] o1$[178]"" [167] [153]"onon";:[137] 12800
- 12820 f$(f)[178]o1$
- 12821 [153]
- 12900 [129] zz[178]1 [164] 15:[153]" ":[130]
- 12950 [153]" ";
- 12975 [153]" ";
- 13000 [153]"ononononononononononononononon":[143] 12 cursor ups arrow keys,and ^,*, to search for
- 13100 [139]f$(f)[178]"(NULL)"[176]f$(f)[178]"t"[167]15300
- 13200 [139]f$(f)[178]"val"[176]f$(f)[178]"e"[167]29200
- 13300 [139]f$(f)[178]"(NULL)"[176]f$(f)[178]"s"[167][141]21600
- 13400 [129]z[178]1[164]et[170]1
- 13500 [139]f$(f)[178]fo$(z)[167]13900
- 13600 [139]fo$(z)[178]"end"[167][141]20200:[137]11900:[143] can't find a match
- 13700 [139]z[177]et[167][141]20200:[137]11900
- 13800 [130]z
- 13900 [153]:[153]:[153]fo$(z),cal$(z)
- 14000 [153]:[153]"how many units of this food: ";:mx[178]3:[141]32000:u(f)[178][197](o1$)
- 14100 [153]:[153]"for for";f$(f);"sys you have ";(u(f)[172]cal(z));" cals."
- 14200 t2[178](u(f)[172]cal(z))
- 14300 s2[178]s2o[170]t2
- 14400 c2[178]c2[170]t2
- 14500 [153]:[153]"total for ";me$;" is";s2;"cals."
- 14600 [153]:[153]"total for the day is";c2;"cals."
- 14700 [141]28700
- 14800 ft$(ic)[178]f$(f):[143] this is name of food for this icrement
- 14900 un(ic)[178]u(f):[143] this is units of the food selected for this inc.
- 15000 ct(ic)[178]t2:[143] this is the total cal for this food
- 15100 ic[178]ic[170]1
- 15200 [137]11900
- 15300 [153][199](147)
- 15400 [143] cursor 10,10
- 15500 [153]"you asked for a total for ";me$;"."
- 15600 [143]
- 15700 [153]"you have ";s2;" cals. for this meal."
- 15800 [143]
- 15900 [153]"you have ";c2;" cals. for the day."
- 16000 [143]
- 16100 [153]"want to continue to addsys foods to this same meal (y/n) [n] "
- 16150 [151] 198,0
- 16200 [161]ad$:[139]ad$[178]""[167]16200
- 16400 [139]ad$[178]"(NULL)"[176]ad$[178]"y"[167]11900
- 16450 [139] ad$[179][177]"n" [175] ad$[179][177]"(NULL)" [175] ad$[179][177][199](13) [167] 16200
- 16500 ml$(ml)[178]me$
- 16600 mi(ml)[178]ic
- 16700 ml[178]ml[170]1
- 16800 [143] cursor 17,10
- 16900 [153]"want to start anothersys meal or snack for"
- 16920 [153]"the samesys date (y/n) [n] ":[151] 198,0
- 17000 [161] an$:[139] an$[178]""[167]17000
- 17200 [139]ano$[178]"(NULL)"[176]ano$[178]"y"[167][153]"load":[137]10900
- 17210 [139] an$[179][177]"(NULL)" [175] an$[179][177]"n" [175] an$[179][177][199](13) [167] 17000
- 17300 cd[178]1:[143] ***** should not be 0 at start
- 17400 [153]:[153]
- 17500 [153]"loaddef foods and calories for ";dl$;"sys"
- 17600 [129]mt[178]1[164]ml[171]1
- 17700 [153]:[153]" *** ";ml$(mt);" ***"
- 17800 [129]it[178]cd[164]mi(mt)[171]1
- 17900 [153]ft$(it);[163]18);un(it);[163]23)" =";
- 18000 [153][163]26);ct(it);[163]32);"cals."
- 18100 [130]it
- 18200 cd[178]mi(mt)
- 18300 [130]mt
- 18400 [153]
- 18500 [153]"====== total calories ===== ";c2
- 18600 [153]:[153]
- 18700 [141]28700
- 18900 [143] cursor 6,10
- 19000 [153]"load(NULL)ould you like a copy of these meals on the printer ((NULL)/(NULL)) [(NULL)] "
- 19050 [151] 198,0
- 19100 [161]al$:[139]al$[178]""[167]19100
- 19200 [139]al$[178]"(NULL)"[176]al$[178]"y"[167]26300
- 19300 [139] al$[179][177]"(NULL)" [175] al$[179][177]"n" [175] al$[179][177][199](13) [167] 19100
- 19400 [143] cursor 8,10
- 19500 [153]"(NULL)ould you like a listing of all the"
- 19600 [153]"foods & calories ((NULL)/(NULL)) [(NULL)]":[151] 198,0
- 19700 [161] al$:[139] al$[178]""[167]19700
- 19800 [139] al$[178]"y"[176]all$[178]"(NULL)"[167][141]20500:[137] 19910
- 19900 [139] al$[179][177]"n" [175] al$[179][177]"(NULL)" [175] al$[179][177][199](13) [167] 19700
- 19910 [153]"(NULL)ould you like to start over? ((NULL)/(NULL))"
- 19920 [161] a$:[139] a$[179][177]"y" [175] a$[179][177]"n" [167] 19920
- 19930 [139] a$[178]"y" [167] 3600
- 20000 [153][163]8)"(NULL)ress (NULL)val(NULL)(NULL)(NULL)(NULL) for (NULL)p(NULL)ime":[151] 198,0
- 20010 [161] a$:[139] a$[179][177][199](13) [167] 20010
- 20100 [137]9600
- 20200 [153]:[153][163]8)"can't find a food match."
- 20210 [153][163]12)"check spelling."
- 20300 [141]28700
- 20400 [142]
- 20500 [153]"(NULL)n the screen or printer ((NULL)/(NULL)) <(NULL)> ";
- 20600 [161] p2$:[139] p2$[178]"" [167]20600
- 20700 [153] p2$
- 20800 [139] p2$[178]"p" [167]21000
- 20900 [137]21100
- 21000 [159]4,4:[157]4
- 21100 [129]al[178]1[164]et
- 21200 [153]fo$(al);[166]24[171][195](fo$(al)));cal$(al)
- 21300 [130]
- 21400 [139] p2$[178]"p" [167] [152]4:[160]4
- 21500 [142]
- 21600 [141]25100
- 21700 l[178]0
- 21800 tx[178]0:[153]""
- 21900 [129] zz[178]1 [164] 11
- 22000 [153]" on"
- 22100 [141]24400
- 22200 [130]
- 22300 [143] do not reprint command line
- 22400 [143] color 14
- 22500 [137]22700:[143]-- sub to get input of arrow keys or esc to stop search
- 22600 [142]
- 22700 [161]i$:[139]i$[178]""[167]22700
- 22800 il[178][195](i$)
- 22900 ll[178][198](i$)
- 23000 [143] ll=asc(right$(i$,1))
- 23100 [139]ll[178]94[167]l[178]0:[143] ^homekey
- 23200 [139]ll[178]145[167]l[178]l[171]1:[143] upcrsrkey
- 23300 [139]ll[178]157[167]l[178]l[171]10:[143] leftcrsr
- 23400 [139]ll[178]42[175]l[177]et[167]24000
- 23500 [139]ll[178]42[167]l[178]et[170]1:[143] *endkey
- 23600 [139]ll[178]17[167]l[178]l[170]1:[143] downcrsrkey
- 23700 [139]ll[178]29[175]l[177]et[167]24000
- 23800 [139]ll[178]29[167]l[178]l[170]10:[143] pagedownkey
- 23900 [139]ll[178]95[167] [153]"";:[137]12000
- 24000 [143] end of list---go on
- 24100 l[178]l[171]11:[137]21800
- 24200 [143] ifll=92then print"load";:goto11000
- 24300 l[178]l[171]11:[137]21800
- 24400 [143] --start printing foods--look for end or beginning of list---
- 24450 [139] tx[178]1 [167] [153]" ":[142]
- 24500 [139]l[178]et[170]1 [167] [153]"end of listsys":tx[178]1:[142]
- 24700 [139]l[179]0[167]l[178]0:[153]"head of listsys":[142]
- 24800 [153] ""fo$(l)
- 24900 l[178]l[170]1
- 25000 [142]
- 25100 [143] cursor 10,55
- 25200 [153] "":[143] blue box
- 25300 [153]"ortantantantantantanfood listtantantantantantantan^"
- 25400 [129] zz[178]1 [164] 11
- 25500 [153]"(NULL) (NULL)"
- 25600 [130]
- 25700 [153]"/tantantantantantantantantantantantantantantantantantantantantantanexp"
- 25800 [143]
- 25900 [153] "";:[143] white letters
- 26000 [153]"use cursor keys, and ^,*, to search for foods.";
- 26100 [153]" --- _ to quit searchsys";
- 26200 [142]
- 26300 cd[178]1:[143] hardcopy of days foods cd must be reset to 1 ****
- 26400 [159]4,4,1:[160] 4:[139] st[179][177]0 [167] 28500
- 26410 [159] 4,4:[157]4
- 26500 [153]"---------------------------------------";
- 26600 [153]"---------------------------------------"
- 26700 [153]:[153]" ******** printout of the foods and calories for ";
- 26800 [153]dl$;" ********"
- 26900 [153]:[153]
- 27000 [129]mt[178]1[164]ml[171]1
- 27100 [153]:[153]" *** ";ml$(mt);" ***"
- 27200 [129]it[178]cd[164]mi(mt)[171]1
- 27300 [153]ft$(it);[166]20[171][195](ft$(it)));un(it);[166]4[171][195]([196](un(it))));
- 27400 [153]"unit(s) =";
- 27500 [153][163]1);ct(it);[166]5[171][195]([196](ct(it))));"calories"
- 27600 [130]it
- 27700 cd[178]mi(mt)
- 27800 [130]mt
- 27900 [153]
- 28000 [153]"======== total calories ========= ";c2;" ====="
- 28100 [153]"----------------------------------------";
- 28200 [153]"--------------------------------------"
- 28300 [153]:[153]
- 28400 [152]4
- 28500 [160]4
- 28600 [137]19500
- 28700 [151] 198,0
- 28900 [139]([194](53272)[175]2)[178]2[167]28950
- 28925 [153]" < press return to continue >";:[137] 29000
- 28950 [153]" < (NULL)ress (NULL)val(NULL)(NULL)(NULL)(NULL) to lenontinue >";
- 29000 [161]a$:[139]a$[179][177][199](13)[167]29000
- 29050 [153]"load"
- 29100 [153]"sys":[142]
- 29200 [153]"do you really want to quit now (y/n) [n]"
- 29300 [161]qe$:[139]qe$[178]""[167]29300
- 29500 [139]qe$[178]"(NULL)"[176]qe$[178]"y"[167]9600:[143] end of program
- 29550 [139] qe$[179][177]"n" [175] qe$[179][177]"(NULL)" [175] qe$[179][177][199](13) [167] 29300
- 29600 [137]11900
- 29900 [128]
- 32000 [143]================================get input routine for questions ====
- 32005 oo$[178]"":o1$[178]""
- 32010 [151] 204,0
- 32020 [161] oo$:[151] 207,0:[139] oo$[178]"" [167]32010: [143] pokes make cursor
- 32030 [139] oo$[178][199](13) [167] [151] 204,1:[153]" ":[142]
- 32035 [139] oo$[178]"restore" [167] 9600
- 32040 [139] oo$[178][199](20)[167][141] 35000:[137] 32010
- 32045 [139] [195](o1$)[178]mx [167] 32020
- 32050 [139] oo$[179]" " [176] oo$[177]"z" [167] 32010
- 32055 [151]204,1:[153] oo$;:o1$[178]o1$[170]oo$
- 33000 [137] 32010
- 33999 [143]========= error/delete key===wipe input clean=======
- 35000 [139] o1$[178]"" [167] [142]
- 35010 o1$[178][200](o1$,[195](o1$)[171]1)
- 35020 [153]oo$;
- 35030 [151] 204,1
- 35040 [142]
-