Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Old Basic program compiled?

Status
Not open for further replies.

bretthydra

Mechanical
Mar 22, 2010
13
0
0
GB
Please forgive my ignorance in advance, I am not a software engineer
so here goes.
We have a version of an old basic program written in the 1980's.
We believe it is compiled.
We are looking to have it re-written.
Is this possible?
 
Replies continue below

Recommended for you

Generally BASIC programs from the 80s were not compiled, but interpreted. Can you read the code in English? If so, then you're 90% of the way there.

Your last question confuses me. Any code can be re-written; it's just a matter of time and money.

Again, if you actually have the source code, and the fact that you know it's BASIC suggests so, it can probably be ported verbatim into Visual Studio BASIC or even Excel's Visual BASIC for Applications.

BASIC programs tend to steer away from dinking with the computer hardware, particularly for any kind of engineering analysis program. That should make it relatively simple to port.

TTFN

FAQ731-376
Chinese prisoner wins Nobel Peace Prize
 
Once again, apologies for my lack of programming knowledge.
We cannot get to the source code, we just run the file as an application.
What does this suggest?
 
The early GWBasic used a tokenised interpreter and with the proper switch set, it could output the text form of the source. I don't think I even have DOS or Basic manuals for this. I don't recall how it was done, now, about 20 or more years ago... I'm nor sure I even used Basic on my Win3 machine... Have written some large programs in Basic... source over 1M... for some. Frame analysis, FEM, Stormwater management, etc... started with GW, then QB1... to QB4.5, PDS7.1, then visual basic... almost the complete basic chain... and switched to Delphi... I'll check with my programmer buddy to see if he can offer any advice.

Dik
 
If there is only an application, it's possible that it was fully compiled. There was a couple of BASIC compilers floating around in the 80s. If so, you're pretty much out of luck, I think. You can potentially decompile executables, but you'd most likely get assembly language. which would be that useful. Nonetheless, there are BASIC-specific decompilers that might get you further:
TTFN

FAQ731-376
Chinese prisoner wins Nobel Peace Prize
 
@dik: In the interpreter, appending ',A' when saving works. ie
Code:
SAVE "FILENAME.TXT",A
will save in ASCII format. There were also a few stand-alone programs to convert tokenized to ASCII without going through the interpreter IIRC.

@bretthydra: If the program can't be converted to human-readable (source code) format, your only options are to either have it re-written from scratch using the program specifications, or keep using it in a virtual machine (ie DosBox, VirtualBox, VMWare, etc).

I can't think of many engineering programs of that vintage that couldn't be vastly improved by using modern HW and algorithms.
 
heh- In 1982, when I started at US Amada, our AMACOM CNC programming software was written in MS Basic, and compiled.
Yes, MS did sell a compiler for their language.
Some years later, as things developed, our products were developed in other languages.

FWIW, the product that preceeded our CP/M-based AMACOM was a Tektronics graphics terminal, running its own Basic- interpreted.
From what I could find out, it was a 12-bit system, using 3 4-bit processors.

cheers
Jay

Jay Maechtlen
 
Status
Not open for further replies.
Back
Top