Hi im currently writing a game in c++.

Does anyone know a good tutorial that teaches how to use inline asm, and the debugger in vc.net ?
I wanna see what vc.net does of my c++ code.. and maybe replace and optimice some in asm.
Posted on 2003-11-01 11:24:15 by TechnoCore
you can load the debug exe in ollydbg and see what vc has generated from your c++, use Softice (you will need to buy it!)..etc
to use inline asm in ur c/c++ progs you use this directive:

_asm{ // multi line

_asm ... // 1 asm line at a time
_asm ....
_asm ....

you can set a breakpoint (F9) inside this branches / or before and debug normally with vc debugger.
and step (F10), or Step into (call / function..) with (F11).
be sure your project setting is on 'debug' and not 'release'.
after you put breakpoint, use F5 to start the debugging process, once its there,
you can use the debugger's windows: stack/memory/watch/variables/registers/disassembly (select them from the menu).
any more questions..just ask
Posted on 2003-11-01 15:58:57 by wizzra
Generally speaking, using inline assembly hurts the C++ optimizer. It is normally a better idea to put the ASM in seperate functions and call them.

If you want to see the ASM the C++ compiler generates, from the project menu select Properties, click on the C++ folder, click on Output Files, choose an option from the Assembler Output drop down box.

Also, remember that if your project is set up for debugging, the ASM generated is not optimized, so you should look at the ASM generated by a release build with optimizations enabled.
Posted on 2003-11-01 19:44:31 by Mecurius
Thanks alot, Mecurius and Wizzra !

Why does the inline code hurt the optimizer ? Is there some special things i should worry extra about ?

If I make an external asm-program, what is syntax the syntax used from c++ vc.net to incorporate it?

(I couldn't reply, this site sometimes just wont let me reply.
It says im logged in, but when i send the message, it says it couldnt send any.
Is there some kind of frequent bug?)

Posted on 2003-11-07 14:31:30 by TechnoCore