Click here to Skip to main content
15,921,179 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: viewing my program's assembly code Pin
BlackDice2-Dec-04 4:49
BlackDice2-Dec-04 4:49 
GeneralRe: viewing my program's assembly code Pin
David Crow2-Dec-04 5:27
David Crow2-Dec-04 5:27 
GeneralRe: viewing my program's assembly code Pin
BlackDice2-Dec-04 5:39
BlackDice2-Dec-04 5:39 
GeneralRe: viewing my program's assembly code Pin
David Crow2-Dec-04 5:56
David Crow2-Dec-04 5:56 
QuestionInline assembly - what good is it? Pin
BlackDice2-Dec-04 2:37
BlackDice2-Dec-04 2:37 
AnswerRe: Inline assembly - what good is it? Pin
geo_m2-Dec-04 4:29
geo_m2-Dec-04 4:29 
GeneralRe: Inline assembly - what good is it? Pin
BlackDice2-Dec-04 4:51
BlackDice2-Dec-04 4:51 
AnswerRe: Inline assembly - what good is it? Pin
John R. Shaw2-Dec-04 4:52
John R. Shaw2-Dec-04 4:52 
Optimized assembly code can make it faster, but now days the ability of modern complires to optimize the code makes it difficult to improve upon.

Writing your C/C++ code with optimization in mind, is the simplest aproach. Because it makes it easeir for the compiler to optimize the code for you.

-------------------------------------------------
I'll answer you 2nd question here as well.
-------------------------------------------------

You can look at the disassembled code at run-time: View->Debug Windows->Disassembly

If your program is compiled for debugging, that will bring up a mixed assembly and C/C++ source code view. You should place a break point at the point in your code where you want to look at the assembly code. This is mainly used for debugging, in the case where you think the compiler may have messed up (I have not seen this happen in years).

You can also look at the dissembled code for a program compiled for realese by running it as if it where a debug version from VC6, but I am not sure if you can see the whole program.

-------------------------------------------------
-------------------------------------------------

Although with modern compileres (with multiple optimization options) it is not as important, but having some idea of what assembly code your compiler produces for a given piece of C/C++ code, helps you make better decisions on how to write that code (with optimization in mind).

FYI: Airliners have 3 redundant computer systems. Each one is running the same program and each program was compiled using a different compiler. Why? Because each compiler produces code in its own way. That is if one compiler introduce a flaw in the final program, then that same problem will not be on either of the other systems (in theory).

-------------------------------------------------
Learning game programing
-------------------------------------------------
1) Tons of sights and new groups.
2) Graphics Programming By Michael Abrash.
3) http://sourceforge.net/[^];)

:-DGood luck and have fun.

INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
GeneralRe: Inline assembly - what good is it? Pin
BlackDice2-Dec-04 4:57
BlackDice2-Dec-04 4:57 
AnswerRe: Inline assembly - what good is it? Pin
Henry miller2-Dec-04 9:07
Henry miller2-Dec-04 9:07 
GeneralRe: Inline assembly - what good is it? Pin
BlackDice2-Dec-04 10:46
BlackDice2-Dec-04 10:46 
AnswerRe: Inline assembly - what good is it? Pin
Harold Bamford3-Dec-04 6:06
Harold Bamford3-Dec-04 6:06 
AnswerRe: Inline assembly - what good is it? Pin
Harold Bamford3-Dec-04 6:20
Harold Bamford3-Dec-04 6:20 
GeneralAPI constants value Pin
wk_vigorous2-Dec-04 2:18
wk_vigorous2-Dec-04 2:18 
GeneralRe: API constants value Pin
BlackDice2-Dec-04 2:33
BlackDice2-Dec-04 2:33 
Questionhide one property page?? Pin
includeh102-Dec-04 2:11
includeh102-Dec-04 2:11 
AnswerRe: hide one property page?? Pin
JoramW2-Dec-04 2:49
JoramW2-Dec-04 2:49 
GeneralRe: hide one property page?? Pin
includeh102-Dec-04 5:02
includeh102-Dec-04 5:02 
GeneralRe: hide one property page?? Pin
JoramW2-Dec-04 22:52
JoramW2-Dec-04 22:52 
Questionhow to know Service pack of MSVC6.0 Pin
Abhi Lahare2-Dec-04 1:58
Abhi Lahare2-Dec-04 1:58 
AnswerRe: how to know Service pack of MSVC6.0 Pin
David Crow2-Dec-04 4:05
David Crow2-Dec-04 4:05 
GeneralRe: how to know Service pack of MSVC6.0 Pin
david_gilmour2-Dec-04 22:22
david_gilmour2-Dec-04 22:22 
GeneralRe: how to know Service pack of MSVC6.0 Pin
David Crow3-Dec-04 2:50
David Crow3-Dec-04 2:50 
QuestionAVIFile file size restriction? Pin
JoramW2-Dec-04 1:26
JoramW2-Dec-04 1:26 
GeneralHELP Immediately !! Very important!! Pin
angello62-Dec-04 1:21
angello62-Dec-04 1:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.