Because of the nature of the 2 languages, I seriously do not believe it is possible...
ASSEMBLY (ASM) is a low level language... It is the closest language to machine language (opCodes) that a *Normal* person can read and understand (with out a Super Photographic Memory)... these 2 sets of code are directly related to each other...
ASM contains REGISTERS, SEGMENTS, Indexes, Pointers, flags, and very few other limited data storage elements.
C/C++ is a High level language, the next step up from ASM...
C contains variables, procedures calls, constants, types, objects, definitions, etc... which are all lost when compiled...
for example...
Y = 2
Z = 4
...
X = (Y + Z) / 2
... means nothing to a computer, where, in assembly, it might read...
PUSH CX
PUSH BX
...
POP BX
MOV AX, BX
POP BX
ADD AX, BX
MOV CX, 02h
DIV AX, DX
...which has exactly 1 set of opCodes that complement it.
the point is, the term assembler and compiler have 2 totally different yet still similar meanings...
Assembler takes mnemoic code and directly converts it to opcodes, straight accross, there is no optimizing, parsing, or any thing like all the steps a compiler goes through...
just translation from assembly to opCodes...
Compilers on the otherhand (such as C/C++) convert all of the variables into memory addresses, converts your code into assembly code, optimizes your code, and many other steps... to produce opCodes...
in conclusion, going from C/C++ to (true) assembly code will remove all of the variables, and many other luxuries from your high level language that can NOT be reversed...
for example...
int X, Y, Z
char a, b, c
in C/C++ might be converted to
ds:[si+0]
ds:[si+2]
ds:[si+4]
ds:[si+6]
ds:[si+7]
ds:[si+8]
in assembly...
BUT if int F is used in 1 function and char G is used in anothter...
they might both be located at
ds:[si+9]
so going the other way...
A program written to reverse the process of compiling would have no Idea what ds:[si+9] was in the first place...
The best you might get would be a C/C++ program that looks just like an ASM program... which would be more or less pointless...
A compiler is specially designed to break down high level code into lower levels, step by step...
there is virtually NO WAY to rebuild the lower level code into a higher level, based on the "inteligent" information lost during compilation.
now for assemblers such as masm and tasm... these are MACRO assemblers... which is like a cross between a high level language and an assembler... these upper level assemblers alow you to use variables, arrays, etc... that are translated the same way as the compiler variables are... but are still translated to machine code straight across...
yet when uncompiled back to assembly code the variables will seem as though they never existed...
you MIGHT be able to make a program convert a macro asm program into a c/c++ program with a little bit of use... but still...
due to the fact that assemblers DO NOT optimize code...
and Compilers do...
you can take a risk either way you go, on having slower code...
after all, the main reason for using asm in the first place is for speed...
where depending on your skills in both asm and c/c++, converting the asm to c/c++ could either slow the program down buy alowing the compiler to add unessisary steps or alow the compiler to optimize the code and remove unneeded steps...
I am getting tired of typing now... ;-)... so...
for more in depth info...
try a google search on "Compiler Theory" or "Compiler Design"
Most of them will explain the difference between a compiler and an assembler and the reasons why the process is irreversable...
Good Luck
Have Fun, Be Young... Code BASIC
-Josh Stribling