1. .bas to ascii program ???
- Posted by jstory at freenet.edmonton.ab.ca Jul 17, 2001
- 380 views
Where can I gitta holduv a simple program that converts a .BAS file to readable ascii? All I could find was a .com file that didn't work (on winNT4). Jerry Story
2. Re: .bas to ascii program ???
- Posted by daryl_vdb at HOTMAIL.COM Jul 17, 2001
- 375 views
> > Where can I gitta holduv a simple program that converts a .BAS file to >readable ascii? AFAIK, .bas files are just ascii text. Have you tried opening it in notepad?
3. Re: .bas to ascii program ???
- Posted by Igor Kachan <kinz at peterlink.ru> Jul 18, 2001
- 398 views
> Where can I gitta holduv a simple program that > converts a .BAS file to eadable ascii? Just load this unreadable .BAS into QB and Save as ... Text (ascii), not as QB own inner format. There is the option when you save and you can choice. Regards, Igor Kachan kinz at peterlink.ru
4. Re: .bas to ascii program ???
- Posted by jstory at freenet.edmonton.ab.ca Jul 18, 2001
- 373 views
On Wed, 18 Jul 2001 daryl_vdb at HOTMAIL.COM wrote: > > Where can I gitta holduv a simple program that converts a .BAS file to > >readable ascii? > > AFAIK, .bas files are just ascii text. Have you tried opening it in > notepad? Yup. Got garbage. Jerry Story
5. Re: .bas to ascii program ???
- Posted by jstory at freenet.edmonton.ab.ca Jul 18, 2001
- 360 views
On Wed, 18 Jul 2001, Igor Kachan wrote: > > Where can I gitta holduv a simple program that > > converts a .BAS file to eadable ascii? > > Just load this unreadable .BAS into QB and > Save as ... Text (ascii), not as QB own inner format. > There is the option when you save and you > can choice. I used QBASIC.EXE and it got only garbage from lemonade.bas. I picked up lemonade.bas from some website. Maybe from a different computer world. To hell with it. Jerry Story
6. Re: .bas to ascii program ???
- Posted by euphoria at carlw.legend.uk.com Jul 18, 2001
- 379 views
Jerry wrote: > On Wed, 18 Jul 2001, Igor Kachan wrote: > > > > Where can I gitta holduv a simple program that > > > converts a .BAS file to eadable ascii? > > > > Just load this unreadable .BAS into QB and > > Save as ... Text (ascii), not as QB own inner format. > > There is the option when you save and you > > can choice. > > I used QBASIC.EXE and it got only garbage from lemonade.bas. I picked > up lemonade.bas from some website. Maybe from a different computer world. > To hell with it. Chances are it's been tokenised by some part of the language that created it. In the Euphoria world we call tokenising 'shrouding' and it comes as a part of the Registered Edition. It makes for smaller, more secure, files. Most likely what you have is a GW-Basic program (the PC BASIC before QBASIC came along). There are (I guess) methods of decrypting your 'garbage' back into a BASIC program, but that would probably be illegal... The programmer will have tokenised his code for a reason. Carl -- Carl R White - aka - Cyrek eMail: carlw at legend.co.uk cyrek at bigfoot.com URL: www.carlw.legend.yorks.com
7. Re: .bas to ascii program ???
- Posted by irvm at ellijay.com Jul 18, 2001
- 396 views
--Boundary_(ID_0Tn4c4So+1QGbltQ3e9pSw) On Wednesday 18 July 2001 08:29, jstory at freenet.edmonton.ab.ca wrote: > > I used QBASIC.EXE and it got only garbage from lemonade.bas. I picked > up lemonade.bas from some website. Maybe from a different computer world. > To hell with it. > You may have gotten the Atari, or Apple or ? version - they all used .bas. Here's a readable version (hope it's the right lemonade.bas) Good luck translating it into Euphoria :) Irv --Boundary_(ID_0Tn4c4So+1QGbltQ3e9pSw) Content-type: text/plain; charset=iso-8859-1; name=lemonade.bas Content-transfer-encoding: 7BIT Content-disposition: attachment; filename=lemonade.bas 10 REM ------------------------------ 20 REM LEMONADE STAND - AN ADAPTATION 30 REM BASED ON THE APPLE II VERSION. 40 REM THE ENTIRE APPLE II SOURCE WAS 50 REM CONSULTED TO MAKE THIS PROGRAM 60 REM ------------------------------ 70 REM PC PORT BY DOSIUS, 26 APR 2000 80 REM V3.00, DOSIUS at SDF.LONESTAR.ORG 90 REM ------------------------------ 100 GOSUB 1920: GOSUB 1940: GOTO 110 110 DIM A(30), L(30), H(30), B(30), S(30), P(30), G(30) 120 P9 = 10 130 S3 = .15 140 S2 = 30 150 A2 = 2 160 C9 = .5 170 C2 = 1 180 REM START OF GAME 190 GOSUB 1990: FOR I = 1 TO N: B(I) = 0: A(I) = A2: NEXT 200 IF A$ = "Y" OR A$ = "y" THEN GOSUB 2150: GOTO 220 210 GOSUB 2370 220 REM WEATHER REPORT 230 SC = RND(1) 240 IF SC < .4 THEN SC = 2: GOTO 270 250 IF SC < .7 THEN SC = 10: GOTO 270 260 SC = 7 270 REM IF D<3 THEN SC=2 280 GOSUB 2600 290 REM START OF NEW DAY 300 D = D + 1 310 PRINT "ON DAY "; D; ", THE COST OF LEMONADE IS "; 320 C = 2: IF D > 2 THEN C = 4 330 IF D > 6 THEN C = 5 340 C1 = C * .01 350 PRINT "$"; C1 360 R1 = 1 370 REM CURRENT EVENTS 380 IF D <> 3 THEN 400 390 PRINT "(YOUR MOTHER QUIT GIVING YOU FREE SUGAR)" 400 IF D <> 7 THEN 420 410 PRINT "(THE PRICE OF LEMONADE MIX JUST WENT UP)" 420 REM AFTER 2 DAYS THINGS CAN HAPPEN 430 IF D > 2 THEN 1370 440 REM INPUT VALUES 450 PRINT : POKE 34, PEEK(37) 460 FOR I = 1 TO N 470 A(I) = A(I) + .0000001 480 G(I) = 1: H(I) = 0 490 STI = A(I): GOSUB 1760: PRINT "LEMONADE STAND "; I; ": ASSETS "; STI$ 500 PRINT 510 IF B(I) = 0 THEN 560 520 PRINT "YOU ARE BANKRUPT, NO DECISIONS" 530 PRINT "FOR YOU TO MAKE." 540 IF N = 1 AND A(1) < C THEN END 550 GOTO 940 560 PRINT "HOW MANY GLASSES OF LEMONADE DO YOU" 570 PRINT "WISH TO MAKE "; 580 INPUT L(I) 590 IF L(I) < 0 OR L(I) > 1000 THEN 610 600 GOTO 640 610 PRINT "COME ON, LET'S BE REASONABLE NOW!!!" 620 PRINT "TRY AGAIN" 630 GOTO 560 640 IF L(I) <> INT(L(I)) THEN 610 650 IF L(I) * C1 <= A(I) THEN 700 660 PRINT "THINK AGAIN!!! YOU HAVE ONLY "; STI$ 670 PRINT "IN CASH AND TO MAKE "; L(I); " GLASSES OF" 680 PRINT "LEMONADE YOU NEED $"; L(I) * C1; " IN CASH." 690 GOTO 560 700 PRINT 710 PRINT "HOW MANY ADVERTISING SIGNS ("; S3 * 100; " CENTS" 720 PRINT "EACH) DO YOU WANT TO MAKE "; 730 INPUT S(I) 740 IF S(I) < 0 OR S(I) > 50 THEN 760 750 GOTO 780 760 PRINT "COME ON, BE REASONABLE!!! TRY AGAIN." 770 GOTO 700 780 IF S(I) <> INT(S(I)) THEN 760 790 IF S(I) * S3 <= A(I) - L(I) * C1 THEN 850 800 PRINT 810 STI = A(I) - L(I) * C1: GOSUB 1760 820 PRINT "THINK AGAIN, YOU HAVE ONLY "; STI$ 830 PRINT "IN CASH LEFT AFTER MAKING YOUR LEMONADE." 840 GOTO 700 850 PRINT : PRINT "WHAT PRICE (IN CENTS) DO YOU WISH TO" 860 PRINT "CHARGE FOR LEMONADE "; 870 INPUT P(I) 880 IF P(I) < 0 OR P(I) > 100 THEN 900 890 GOTO 920 900 PRINT "COME ON, BE REASONABLE!!! TRY AGAIN." 910 GOTO 850 920 IF P(I) <> INT(P(I)) THEN 900 930 IF C5 = 1 THEN 940 940 INPUT "WOULD YOU LIKE TO CHANGE ANYTHING?"; A$ 950 IF LEFT$(A$, 1) = "Y" OR LEFT$(A$, 1) = "y" THEN : C5 = 1: GOTO 460 960 NEXT I 970 C5 = 0: : 980 PRINT : IF SC = 10 AND RND(1) < .25 THEN 1610 990 PRINT "$$ LEMONSVILLE DAILY FINANCIAL REPORT $$" 1000 REM CALCULATE PROFITS 1010 IF R2 = 2 THEN 1580 1020 IF R3 = 3 THEN 1660 1030 FOR I = 1 TO N 1040 IF A(I) < 0 THEN A(I) = 0 1050 IF R2 = 2 THEN 1150 1060 IF P(I) >= P9 THEN 1090 1070 N1 = (P9 - P(I)) / P9 * .8 * S2 + S2 1080 GOTO 1100 1090 N1 = ((P9 ^ 2) * S2 / P(I) ^ 2) 1100 W = -S(I) * C9 1110 V = 1 - (EXP(W) * C2) 1120 N2 = R1 * (N1 + (N1 * V)) 1130 N2 = INT(N2 * G(I)) 1140 IF N2 <= L(I) THEN 1160 1150 N2 = L(I) 1160 M = N2 * P(I) * .01 1170 E = S(I) * S3 + L(I) * C1 1180 P1 = M - E 1190 A(I) = A(I) + P1 1200 IF H(I) = 1 THEN 1610 1210 PRINT 1220 IF B(I) <> 1 THEN 1250 1230 PRINT "STAND "; I; : PRINT " BANKRUPT": GOSUB 2680 1240 GOTO 1330 1250 GOSUB 1820 1260 IF A(I) > C / 100 THEN 1330 1270 PRINT "STAND "; I 1280 : PRINT " ...YOU DON'T HAVE ENOUGH MONEY LEFT" 1290 PRINT " TO STAY IN BUSINESS YOU'RE BANKRUPT!" 1300 B(I) = 1 1310 GOSUB 2680: 1320 IF N = 1 AND B(1) = 1 THEN END 1330 NEXT I 1340 R1 = 1 1350 R2 = 0 1360 GOTO 220 1370 REM RANDOM EVENTS 1380 IF SC = 10 THEN 1430 1390 IF SC = 7 THEN 1710 1400 IF RND(1) < .25 THEN 1500 1410 GOTO 450 1420 IF X1 = 1 THEN 450 1430 J = 30 + INT(RND(1) * 5) * 10 1440 PRINT "THERE IS A "; J; "% CHANCE OF LIGHT RAIN," 1450 PRINT "AND THE WEATHER IS COOLER TODAY." 1460 R1 = 1 - J / 100 1470 X1 = 1 1480 GOTO 450 1490 IF X2 = 1 THEN 450 1500 PRINT "THE STREET DEPARTMENT IS WORKING TODAY." 1510 PRINT "THERE WILL BE NO TRAFFIC ON YOUR STREET." 1520 IF RND(-1) < .5 THEN 1550 1530 R2 = 2 1540 GOTO 1560 1550 R1 = .1 1560 X2 = 1 1570 GOTO 450 1580 PRINT "THE STREET CREWS BOUGHT ALL YOUR" 1590 PRINT "LEMONADE AT LUNCHTIME!!" 1600 GOTO 1030 1610 REM THUNDERSTORM! 1620 X3 = 1: R3 = 0 1630 SC = 5: GOSUB 2600: : 1640 PRINT "WEATHER REPORT: A SEVERE THUNDERSTORM" 1650 PRINT "HIT LEMONSVILLE EARLIER TODAY, JUST AS" 1660 PRINT "THE LEMONADE STANDS WERE BEING SET UP." 1670 PRINT "UNFORTUNATELY, EVERYTHING WAS RUINED!!" 1680 FOR J = 1 TO N: G(J) = 0: NEXT 1690 GOTO 1030 1700 IF X4 = 1 THEN 450 1710 X4 = 1 1720 PRINT "A HEAT WAVE IS PREDICTED FOR TODAY!" 1730 R1 = 2 1740 GOTO 450 1750 END 1760 REM STI => DOLLARS.CENTS 1770 STI = INT(STI * 100 + .5) / 100 1780 STI$ = "$" + STR$(STI) 1790 IF STI = INT(STI) THEN STI$ = STI$ + ".0" 1800 IF STI = INT(STI * 10 + .5) / 10 THEN STI$ = STI$ + "0" 1810 RETURN 1820 PRINT "DAY"; D: PRINT "STAND "; I 1830 PRINT ""; N2; " GLASSES SOLD"; 1840 STI = P(I) / 100: GOSUB 1760: PRINT " AT "; STI$; " PER GLASS" 1850 STI = M: GOSUB 1760: PRINT "INCOME: "; STI$ 1860 PRINT : PRINT L(I); "GLASSES MADE" 1870 STI = E: GOSUB 1760: PRINT S(I); "SIGNS MADE": PRINT : PRINT "EXPENSES "; STI$ 1880 STI = P1: GOSUB 1760: PRINT "PROFIT "; STI$ 1890 STI = A(I): GOSUB 1760: PRINT "ASSETS "; STI$ 1900 GOSUB 2680 1910 RETURN 1920 REM INITIALIZE 1930 RETURN 1940 REM INTRODUCTION 1950 PRINT "LEMONADE STAND - PORTED BY DOSIUS." 1960 PRINT "COPYRIGHT 1979 APPLE COMPUTER INC." 1970 PRINT "COPYRIGHT 2000 DOSIUS SOFTWARE CO." 1980 RETURN 1990 REM TITLE PAGE 2000 PRINT CHR$(7); 2010 PRINT "HI! WELCOME TO LEMONSVILLE, CALIFORNIA!": PRINT 2020 PRINT "IN THIS SMALL TOWN, YOU ARE IN CHARGE OF" 2030 PRINT "RUNNING YOUR OWN LEMONADE STAND. YOU CAN" 2040 PRINT "COMPETE WITH AS MANY OTHER PEOPLE AS YOU" 2050 PRINT "WISH, BUT HOW MUCH PROFIT YOU MAKE IS UP" 2060 PRINT "TO YOU (THE OTHER STANDS' SALES WILL NOT" 2070 PRINT "AFFECT YOUR BUSINESS IN ANY WAY). IF YOU" 2080 PRINT "MAKE THE MOST MONEY, YOU'RE THE WINNER!!": PRINT 2090 PRINT "ARE YOU STARTING A NEW GAME? (YES OR NO)" 2100 INPUT "TYPE YOUR ANSWER AND HIT RETURN ==> ", A$ 2110 A$ = LEFT$(A$, 1): IF A$ <> "Y" AND A$ <> "N" AND A$ <> "y" AND A$ <> "n" THEN PRINT CHR$(7); : GOTO 2100 2120 INPUT "HOW MANY PEOPLE WILL BE PLAYING ==> ", N$ 2130 N = VAL(N$): IF N < 1 OR N > 30 THEN PRINT CHR$(7); : GOTO 2120 2140 RETURN 2150 REM NEW BUSINESS 2160 PRINT "TO MANAGE YOUR LEMONADE STAND, YOU WILL " 2170 PRINT "NEED TO MAKE THESE DECISIONS EVERY DAY: ": PRINT 2180 PRINT "1. HOW MANY GLASSES OF LEMONADE TO MAKE ": PRINT " (ONLY ONE BATCH IS MADE EACH MORNING)" 2190 PRINT "2. HOW MANY ADVERTISING SIGNS TO MAKE ": PRINT " (THE SIGNS COST FIFTEEN CENTS EACH) " 2200 PRINT "3. WHAT PRICE TO CHARGE FOR EACH GLASS ": PRINT 2210 PRINT "YOU WILL BEGIN WITH $2.00 CASH (ASSETS)." 2220 PRINT "BECAUSE YOUR MOTHER GAVE YOU SOME SUGAR," 2230 PRINT "YOUR COST TO MAKE LEMONADE IS TWO CENTS " 2240 PRINT "A GLASS (THIS MAY CHANGE IN THE FUTURE).": PRINT 2250 GOSUB 2680 2260 PRINT "YOUR EXPENSES ARE THE SUM OF THE COST OF" 2270 PRINT "THE LEMONADE AND THE COST OF THE SIGNS. ": PRINT 2280 PRINT "YOUR PROFITS ARE THE DIFFERENCE BETWEEN " 2290 PRINT "THE INCOME FROM SALES AND YOUR EXPENSES.": PRINT 2300 PRINT "THE NUMBER OF GLASSES YOU SELL EACH DAY " 2310 PRINT "DEPENDS ON THE PRICE YOU CHARGE, AND ON " 2320 PRINT "THE NUMBER OF ADVERTISING SIGNS YOU USE.": PRINT 2330 PRINT "KEEP TRACK OF YOUR ASSETS, BECAUSE YOU " 2340 PRINT "CAN'T SPEND MORE MONEY THAN YOU HAVE!" 2350 GOSUB 2680 2360 RETURN 2370 REM CONTINUE OLD GAME 2380 PRINT CHR$(7); : I = 0 2390 PRINT "HI AGAIN! WELCOME BACK TO LEMONSVILLE! ": PRINT 2400 PRINT "LET'S CONTINUE YOUR LAST GAME FROM WHERE" 2410 PRINT "YOU LEFT IT LAST TIME. DO YOU REMEMBER " 2420 PRINT "WHAT DAY NUMBER IT WAS? "; 2430 INPUT ""; A$: A = VAL(A$): PRINT : IF A <> 0 THEN 2470 2440 A$ = LEFT$(A$, 1): IF A$ = "Y" OR A$ = "y" THEN PRINT "GOOD! WHAT DAY WAS IT? "; : I = I + 1: GOTO 2430 2450 IF A$ = "N" OR A$ = "n" OR I > 0 THEN 2490 2460 PRINT CHR$(7); "YES OR NO? "; : I = I + 1: GOTO 2430 2470 IF A < 1 OR A > 99 OR A <> INT(A) THEN 2490 2480 D = A 2490 PRINT "OKAY - WE'LL START WITH DAY NO. "; D + 1: PRINT 2500 FOR I = 1 TO N: PRINT : PRINT 2510 PRINT "PLAYER NO. "; I; ", HOW MUCH MONEY (ASSETS)": PRINT 2520 PRINT "DID YOU HAVE? "; 2530 INPUT ""; A$: A = VAL(A$): PRINT 2540 IF A < 2 THEN PRINT "O.K. - WE'LL START YOU OUT WITH $2.00": A = 2: GOTO 2560 2550 IF A > 40 THEN PRINT "JUST TO BE FAIR, LET'S MAKE THAT $10.00": A = 10 2560 A(I) = INT(A * 100 + .5) / 100: NEXT 2570 PRINT : PRINT CHR$(7): INPUT "...READY TO BEGIN? "; A$ 2580 IF LEFT$(A$, 1) = "N" THEN 2150 2590 RETURN 2600 REM WEATHER DISPLAY 2610 IF SC = 2 OR SC = 7 THEN 2620 2620 PRINT "LEMONSVILLE WEATHER REPORT: "; 2630 IF SC = 2 THEN PRINT " SUNNY " 2640 IF SC = 7 THEN PRINT " HOT AND DRY " 2650 IF SC = 10 THEN PRINT " CLOUDY " 2660 IF SC = 5 THEN PRINT " THUNDERSTORMS! " 2670 RETURN 2680 PRINT : PRINT "PRESS SPACE TO CONTINUE, ESC TO END..." 2690 IN$ = INPUT$(1): IF IN$ <> " " AND ASC(IN$) <> 27 THEN 2690 2700 IF ASC(IN$) = 27 THEN END 2710 RETURN --Boundary_(ID_0Tn4c4So+1QGbltQ3e9pSw)--
8. Re: .bas to ascii program ???
- Posted by jstory at freenet.edmonton.ab.ca Jul 18, 2001
- 400 views
On Wed, 18 Jul 2001 irvm at ellijay.com wrote: > > I used QBASIC.EXE and it got only garbage from lemonade.bas. I picked > > up lemonade.bas from some website. Maybe from a different computer world. > > To hell with it. > > > You may have gotten the Atari, or Apple or ? version - they all used .bas. > Here's a readable version (hope it's the right lemonade.bas) > Good luck translating it into Euphoria :) > Irv Thanks. That seems to be the right one. Jerry Story