Viewing Compiled code ?

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
9,822
Office Version
  1. 2016
Platform
  1. Windows
Hi all,

I experimenting with a little VB6 project and I have created a simple exe file from it. The purpose of creating this VB6 exe is just to view what the machine code looks like .Is it possible to see the native code of the exe ? Does anybody know if there is a utility or something that I can use ?

Thanks.
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
If you selected the exe file and used the right mouse button can you select open with and then perhaps select NotePad.
 
Upvote 0
If you selected the exe file and used the right mouse button can you select open with and then perhaps select NotePad.

Hi Trevor,

That won't work for exe files I am afraid and even if it did it wouldn't show the actual compiled code. I asked this question on other internet forums and was told off as the question sounds suspicious. I know that there are decompilers out there that one can download but I was advised to start learning ASM if I was truly interested in viewing and understanding compiled code.

Thanks.
 
Upvote 0
Dunno if you can get there in VB6, Jaafar, but it's a great way to learn assembler if you can manage it. The Fortran compiler I used for an HP mini 100 years ago had the option of outputting a mixed listing -- a line of Fortran followed by the assembly code it generated. I learned HP assembler and how to write ferociously efficient Fortran.
 
Upvote 0
Jaafar

If you mean the assembler code, or P-code, or whatever-code you'll need a disassembler.

Here's a commercial product http://www.vb-decompiler.org/.

I'm sure you'll find freeware/shareware versions.

No idea how good any of them would be.
 
Upvote 0
@shg

It would be great if VB had that option as well. One would see how the VB code translates to machine code in an effortless fashion and would help and encourage learning ASM.

@Norie

I've just taken a look at that decompiler and I'll explorer it further. One word of caution is that the product is full of unsollicited adware !! so I downloaded it under deep freeze mode.

Thank you both.
 
Upvote 0
If what it shows you is p-code, it isn't going to be much help for learning assembler ...
 
Upvote 0
shg

Not sure if the aim is to learn assembler.

If it is possible to decompile to Native Code then I'm sure there'll be something out there.
 
Upvote 0
If what it shows you is p-code, it isn't going to be much help for learning assembler ...

I am still at the beginning of exploring all this pcode/native code stuff so I don't know much about the difference between pcode Vs native code Vs ASM but I know they are all related stuff.

I am taking things one step at a time and I'll see if I can learn a bit of ASM unless I get bored :eeek:
 
Upvote 0

Forum statistics

Threads
1,225,609
Messages
6,185,981
Members
453,333
Latest member
BioCoder84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top