Solved

Problem with BASIC...Not Visual Basic

Posted on 2000-03-09
13
227 Views
Last Modified: 2013-11-25
Yes...some folks are still using this vintage 1987 applet.  I know the question is a little "off topic" but I figured I might find the right experts here anyway.

I have this customer who has a couple of BASIC scripts that do some engineering calculations for him.  It works great on his Pentium 166 MHZ.  When you double click on BASIC.EXE, it opens up the archaic little interface.

Well....we just gave him a Celeron 500 MHZ, and when he double clicks on BASIC.EXE, he gets the message "You can not shell to BASIC."

My "GUESS" is that the machine is now too fast for the antique BASIC applet.

Any suggestions on how I can slow this down (just for this application) or is there another way around this?

v/r
Chip
0
Comment
Question by:larouche
  • 3
  • 2
  • 2
  • +5
13 Comments
 
LVL 7

Expert Comment

by:Joe_Griffith
ID: 2601079
I don't think it is too fast.  BASIC.EXE is probably not on the new computer at all.  It doesn't come with WIN98 (I don't think).  You will probably have to copy the basic interpreter from the old computer to the new one.  Look at the properties of the icon he was using on the old computer to find out the location and file name for the old basic interpreter and copy it to the new computer.
0
 
LVL 4

Expert Comment

by:wesleystewart
ID: 2601479
. . Or get him to do his math in Excel.  It has some great math functions, and the spreadsheet format give you all kinds of ways to display tabular data.

Wes
0
 
LVL 6

Expert Comment

by:andyclap
ID: 2602021
can you run basic.exe from a within a command prompt window?
Can you run it under pure DOS?
What OS are you on?
Which version of basic is this?
Could be something as simple as creating a pif for the program.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 4

Expert Comment

by:PBuck
ID: 2602343
Just want to add one last statment, if you decide to copy the Basic.exe over to the new machine - don't forget to provide the path to it within the autoexec.bat

This way, wherever you are in MS-DOS mode the basic.exe will be found and can be executed.

Example:
Lets say you copy it to C:\WINDOWS\TEMP\BASIC.EXE

Add this after the last PATH statement.
SET PATH=%PATH%;C:\WINDOWS\TEMP;
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2603716
Running 16bit Basic.exe? In a DOS shell from a Win/9x platform?.. Windows 98 should be applauded for its Motherly concern for you. I wouldn't touch running that kinda schtuff on any of my machines.. <sheesh>. Ok.. so I'm a scaredy cat.. <lol>.

As wesleystewart proposed.. probably the best solution is to buy him a backpack and a lunch box and send him off to EXCEL school.. its rich with empirical functions.. graphing capabilities.. and with what it can put out.. it is a workhorse. Keep in mind.. the Macro language under the hood of Excel is Basic based. If the school he attends teachs advanced schtuff, he can be right back programming again.. <smile>.

The other option you have is to get him a copy of VB. If you give him a BAS module with a sub main project start, then teach him the fairly simple Debug.Print command, this guide could be in business in no time.

Or better yet.. just get him a dart board... and send that 500mhz screamer to me.. <wink>.
0
 
LVL 4

Expert Comment

by:wesleystewart
ID: 2604299
Grrr.  Pardon me if someone has touched on one of my pet peeves . . .

The "macro language" under Excel2000 is undeed the very same VBA you will find driving VB6.  Probably the same version of VBA332.dll . . .

Excel hasn't had a "macro language" since that hack job Microsoft put into Excel 4.0.

I agree with wsh2, however.  It is time to put away the old basic.exe.  If you can get it to run this time that's fine, but good luck when your user upgrades again.

Wes
0
 

Author Comment

by:larouche
ID: 2604766
Here's some extra info after reading your comments so far:

The OS is WIN95.  The Basic.exe applet is on a shared network drive.  Double clicking it from the 166mhz machine opens it, double clicking it from the 500 mhz machine gets you the message that it can't shell out to basic.  The same thing happens if you start the applet from inside a DOS box.

Yes, I understand that converting this to Excel is a better solution....but I'm still trying to discover if there's a solution to the "speed limit" problem I seem to be seeing.

v/r
Chip
0
 
LVL 14

Accepted Solution

by:
wsh2 earned 200 total points
ID: 2605389
The best way to slow his programs down.. is to add a timing loop INSIDE of his programs. As you have the source code, this should be doable.

Windows does have a Processing Priority setting.. which in effect tells Windows how aggressively to allocate processing cycles to a job when it multitasks. To access this capability, you need to use the CreateProcess (dwCreationFlags parameter).. or if you already know the process handle, the SetPriorityClass Windows APIs to achieve this. As I have never played with these before, I will proffer no code.. but that should be enough to get you started.. <smile>
0
 

Expert Comment

by:sjehanzeb
ID: 2608289
use qbasic in dos directory
0
 
LVL 6

Expert Comment

by:andyclap
ID: 2608603
I have a feeling that the problem's not with speed but with some sort of networking/OS settings you have.
Have you tried contacting the supplier of the basic.exe program to see if they still exist/have any known issues?
Have you tried copying the file locally?
What exactly is the error you receive - can't sell out to basic sounds peculiar.
0
 

Expert Comment

by:ssotton
ID: 2625753
I suspect it won't run becuase you don't have the Basic ROM that came in
the original PC's and XT's.  You'll need to move to one of the compiled
basics like QBasic that came with DOS or PowerBasic, which is still being
produced and updated.  They're at:

http://www.powerbasic.com

0
 

Author Comment

by:larouche
ID: 2630654
The basic.exe and the .bas files that go with it are on a network and work with a number of unrelated Pentium 133 and 166MHZ machines that only have WIN95 on them.  They don't work with the new Pentium 500MHZ machines (ALSO with WIN95 on them).

I think the answer is related to the comment that wsh2 made about timing loops.  Still want to listen to any other comments for a little longer.
0
 

Author Comment

by:larouche
ID: 2640547
It would appear that wsh2's answer is the best.  Thanks for your help!
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question