Sep 23, 2003 #1 A ash Full Member level 3 Joined Dec 25, 2002 Messages 151 Helped 2 Reputation 4 Reaction score 1 Trophy points 1,298 Location Europe Activity points 1,051 Hi friends, How can i share data in c and assembly in one program like this //main.cpp int main(){ short int x; asm{ // there're asm codes increment x } printf(%d,x) return 0; } thanks in advance...
Hi friends, How can i share data in c and assembly in one program like this //main.cpp int main(){ short int x; asm{ // there're asm codes increment x } printf(%d,x) return 0; } thanks in advance...
Sep 23, 2003 #2 M mayyan Full Member level 2 Joined Aug 18, 2001 Messages 130 Helped 12 Reputation 24 Reaction score 5 Trophy points 1,298 Location israel Activity points 770 // the C code void main() { int B , A ; int examle( int* ); // function declaration . . . A = example ( & B); // addres of B to stack . . . } ----------------------------------------------------------------------------- // the assembler code .model small ; delare DOS memory model public _example ; public procedure example proc near ; example is a near procedure ; dont forget to save the BP in stack . . . _example endp end
// the C code void main() { int B , A ; int examle( int* ); // function declaration . . . A = example ( & B); // addres of B to stack . . . } ----------------------------------------------------------------------------- // the assembler code .model small ; delare DOS memory model public _example ; public procedure example proc near ; example is a near procedure ; dont forget to save the BP in stack . . . _example endp end