hi,
i wrote an assembly code in my c code but i don't know how to use c declared var in my assembly,if someone could help me :) thx
marooh
0
Newbie Poster
Recommended Answers
Jump to PostThis functionality exists as a language extension so it depends on which compiler your using...So which compiler are you using?
Jump to PostIf you use VC++ 2010
void foo() { int x = 0; _asm { mov [x],1 } }
Jump to PostOh, then just declare an extern variable like so
extern int x;
and then include your asm code into the project. I never used code blocks so I don't know the specifics.
All 12 Replies
gerard4143
371
Nearly a Posting Maven
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
marooh
0
Newbie Poster
gerard4143
371
Nearly a Posting Maven
marooh
0
Newbie Poster
gerard4143
371
Nearly a Posting Maven
marooh
0
Newbie Poster
gerard4143
371
Nearly a Posting Maven
marooh
0
Newbie Poster
gerard4143
371
Nearly a Posting Maven
marooh
0
Newbie Poster
marooh
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.