Maybe its a newbie question, but i dont know how to interface .asm files with MS Visual C++, i have been using the inline asm keyword "__asm". But sometimes i see when im debuggin that when there is a function call it loads the simbols in a .asm file.
Maybe there is a tutorial, maybe its a little explaind in MSDN, but i dont know where to start.
Thanks
Maybe there is a tutorial, maybe its a little explaind in MSDN, but i dont know where to start.
Thanks
Maybe its a newbie question, but i dont know how to interface .asm files with MS Visual C++, i have been using the inline asm keyword "__asm". But sometimes i see when im debuggin that when there is a function call it loads the simbols in a .asm file.
Maybe there is a tutorial, maybe its a little explaind in MSDN, but i dont know where to start.
Thanks
You can write static and dynamic libraries in both languages and link them.
For example:
unload PROC
;code here
;please
ret
unload ENDP
ml /c /Cp /coff unload.asm
lib unload.obj
That should create unload.lib
extern "C" void __stdcall unload();
void main()
{
unload();
}
cl -c call_unload.cpp
link call_unload.cpp unload.lib
I hope it works.
:alright: :alright:
Maybe its a newbie question, but i dont know how to interface .asm files with MS Visual C++, i have been using the inline asm keyword "__asm". But sometimes i see when im debuggin that when there is a function call it loads the simbols in a .asm file.
Maybe there is a tutorial, maybe its a little explaind in MSDN, but i dont know where to start.
Thanks
Maestro no habia leido el 'Location' aguante Argentina, preguntame en castellano por privado si queres, saludos, Mariano.
:alright:
This has been asked a whole lot of times on this board, so the search function should most definitely come up with something. Or the FAQ section... I only found a sample of linking a C proc with an ASM app there, though.
This has been asked a whole lot of times on this board, so the search function should most definitely come up with something. Or the FAQ section... I only found a sample of linking a C proc with an ASM app there, though.
I told him the opposite way :grin: :cool:
:alright:
Asi que fanatico de Black S...
yo me traduje en espa?ol entero el disco en donde mencionas esa canci?n
las letras est?n impresionantes, l?stima perdi el archivo de word :(
Saludos
yo me traduje en espa?ol entero el disco en donde mencionas esa canci?n
las letras est?n impresionantes, l?stima perdi el archivo de word :(
Saludos
Asi que fanatico de Black S...
yo me traduje en espa?ol entero el disco en donde mencionas esa canci?n
las letras est?n impresionantes, l?stima perdi el archivo de word :(
Saludos
Totalmente, Computer God y Time Machine estan en Dehumanizer, tremendo disco de estudio con Ronnie James Dio. El otro tema que tengo en la firma (The Sign of the Southern Cross) tambien es con Dio, en el disco Mob Rules.
Me encantan las letras de Sabbath, escuchaste Heaven and Hell o Headless Cross? Tremendos.
Por cierto, pudiste hacer algo con lo que te di? Cualquier cosa mandame un privado y te explico mejor (EN CASTELLANO) je.
:alright:
Saludos,
Mariano.
Ateneo,
Its not difficult to do. Write an assembler module in MASM built with the /coff switch. Write a prototype in C/C++ using the EXTERN C syntax for the particular C compiler and make sure you specify the calling convention. MASM handles STDCALL and C fine.
Easiest way is to make a library out of the asm module so you can just include it along with any others.
Its not difficult to do. Write an assembler module in MASM built with the /coff switch. Write a prototype in C/C++ using the EXTERN C syntax for the particular C compiler and make sure you specify the calling convention. MASM handles STDCALL and C fine.
Easiest way is to make a library out of the asm module so you can just include it along with any others.
Thanks hutch--
Te adjunto un archivo con un directorio zippeado que trae:
asm_called.asm : codigo fuente en ensamblador de una funcion (SayLong) que muestra un numero en un MessageBox
asm_called.obj : el codigo ensamblado de asm_called.asm
asm_called.lib : la libreria estatica creada apartir de asm_called.obj que tiene la funcion SayLong dentro
calling_asm.cpp : codigo fuente en C con el prototipo de la funcion SayLong y un main muy simple que la llama con el parametro 50
calling_asm.obj : el codigo compilado de calling_asm.cpp
calling_asm.exe : un programita misero que muestra el numero 50
makeasm.bat : un makefile para crear los 3 primeros archivos
makecpp.bat : un makefile para crear los 3 ultimos archivos
asm_called.asm : codigo fuente en ensamblador de una funcion (SayLong) que muestra un numero en un MessageBox
asm_called.obj : el codigo ensamblado de asm_called.asm
asm_called.lib : la libreria estatica creada apartir de asm_called.obj que tiene la funcion SayLong dentro
calling_asm.cpp : codigo fuente en C con el prototipo de la funcion SayLong y un main muy simple que la llama con el parametro 50
calling_asm.obj : el codigo compilado de calling_asm.cpp
calling_asm.exe : un programita misero que muestra el numero 50
makeasm.bat : un makefile para crear los 3 primeros archivos
makecpp.bat : un makefile para crear los 3 ultimos archivos