Programming question

R

rfdjr1

Not necessarily a Windows 7 question but here goes. I have an old, about 12 year
old backgammon game that I enjoy playing every day. I've put it on every machine
I've had for the past twelve years. I'm assuming it was written in Visual Basic.
Is there a way to open it up and see the raw code it was written in? I'm just
curious after all these years. I went to school for programming way back when,
but it was Cobol, Basic, Pascal, the old stuff. And I used to tinker around with
Visual Basic almost 20 years ago. But I don't know how I'd look at the code from
this program, if it's even possible. Alternatively, does anyone know of a better
group to post this question? Thanks.
 
A

Auric__

rfdjr1 said:
Not necessarily a Windows 7 question but here goes. I have an old, about
12 year old backgammon game that I enjoy playing every day. I've put it
on every machine I've had for the past twelve years. I'm assuming it was
written in Visual Basic.
What makes you think that? Does it require a DLL called MSVBVM# or VBRUN#? (#
is anything from 1 to 6, depending.) Or does it require the .Net runtime? Or
none of the above?
Is there a way to open it up and see the raw code it was written in?
Not really. 16-bit VB compiled to P-code that could be decompiled to
something resembling the original VB, and VB.Net apps can too (for different
reasons), but while 32-bit VB *could* compile to P-code, it defaulted to
machine code, which can only be disassembled (and believe me, assembler looks
*nothing* like VB).
I'm just curious after all these years. I went to school for programming
way back when, but it was Cobol, Basic, Pascal, the old stuff. And I
used to tinker around with Visual Basic almost 20 years ago. But I don't
know how I'd look at the code from this program, if it's even possible.
Depending on the program, your best bet might be to learn assembler.
Alternatively, does anyone know of a better group to post this question?
comp.os.ms-windows.programmer.win32
 
P

Paul

Not necessarily a Windows 7 question but here goes. I have an old, about 12 year
old backgammon game that I enjoy playing every day. I've put it on every machine
I've had for the past twelve years. I'm assuming it was written in Visual Basic.
Is there a way to open it up and see the raw code it was written in? I'm just
curious after all these years. I went to school for programming way back when,
but it was Cobol, Basic, Pascal, the old stuff. And I used to tinker around with
Visual Basic almost 20 years ago. But I don't know how I'd look at the code from
this program, if it's even possible. Alternatively, does anyone know of a better
group to post this question? Thanks.
Why not start with an open source BackGammon ?

At least some of the logic is going to be similar.

http://gnubg.org/

There are windows binaries, and even an installer.

I like the screenshots over on the right.

Paul
 
B

Big Steel

Not necessarily a Windows 7 question but here goes. I have an old, about 12 year
old backgammon game that I enjoy playing every day. I've put it on every machine
I've had for the past twelve years. I'm assuming it was written in Visual Basic.
Is there a way to open it up and see the raw code it was written in? I'm just
curious after all these years. I went to school for programming way back when,
but it was Cobol, Basic, Pascal, the old stuff. And I used to tinker around with
Visual Basic almost 20 years ago. But I don't know how I'd look at the code from
this program, if it's even possible. Alternatively, does anyone know of a better
group to post this question? Thanks.
The answer would be no, if you are talking about looking at machine
code/the executable.
 
S

Stan Brown

Not necessarily a Windows 7 question but here goes. I have an old, about 12 year
old backgammon game that I enjoy playing every day. I've put it on every machine
I've had for the past twelve years. I'm assuming it was written in Visual Basic.
Is there a way to open it up and see the raw code it was written in?
Probably not.

The following is oversimplified, but should be enough to give you the
idea.

Programming languages are designed to be somewhat readable by humans.
But what a CPU actually executes is "machine code". When a
programmer writes a program, she uses something called a "compiler"
to translate it into machine code. One line of Visual Basic or C or
C++ or any "source code" typically translates to several or even many
instructions in machine code. Files of type EXE ("Application") and
DLL ("Application extension") are machine-code files.

There is an intermediate stage between programing languages and
machine code called assembler or assembly code. It is not used much
today, but the idea is that one line of assembly code typically
corresponds to one machine-code instruction. Assembly code is (was)
used when it was important to squeeze every possible bit of
performance out of a program, or for programs like device drivers
where the hardware must be accessed directly. A program called an
"assembler" translates assembly code to machine code.

There are programs called unassemblers or de-assemblers that
translate machine code back to assembler. There are also debug-type
programs that display the assembly-code instruction corresponding to
a given machine-code instruction.

So you could probably get your game translated to assembly code. But
then what would you have? Many thousands of assembly-code
instructions accessing various registers and various numbered memory
locations, with no indication of the meaning of any particular step
and no connection to anything you expect in source code like defined
variables.
 
T

TheGunslinger

Not necessarily a Windows 7 question but here goes. I have an old, about 12 year
old backgammon game that I enjoy playing every day. I've put it on every machine
I've had for the past twelve years. I'm assuming it was written in Visual Basic.
Is there a way to open it up and see the raw code it was written in? I'm just
curious after all these years. I went to school for programming way back when,
but it was Cobol, Basic, Pascal, the old stuff. And I used to tinker around with
Visual Basic almost 20 years ago. But I don't know how I'd look at the code from
this program, if it's even possible. Alternatively, does anyone know of a better
group to post this question? Thanks.
As you do not have access to the source code, the best you can do is
examine the ML code.

IDA Pro Free will do that for you, and since most proprietary
executables include a text indicating what compiler was used, you
might be able to determine what language the program was coded in.

IMHO,

MJR
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Questions on installing an SSD drive 3
Question regarding system restore. 6
Defrag question 4
SOLVED Permissions question 4
Win XP Pro Question 10
Programming Languages? 6
Programming 6
C Programming software for Windows 7 1

Top