Click here to Skip to main content
16,010,488 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: First Win32 Program Pin
Ryan Binns9-Feb-05 17:44
Ryan Binns9-Feb-05 17:44 
GeneralRe: First Win32 Program Pin
Blake Miller10-Feb-05 4:07
Blake Miller10-Feb-05 4:07 
GeneralRe: First Win32 Program Pin
Ryan Binns10-Feb-05 12:42
Ryan Binns10-Feb-05 12:42 
GeneralRe: First Win32 Program Pin
Blake Miller11-Feb-05 4:02
Blake Miller11-Feb-05 4:02 
GeneralRe: First Win32 Program Pin
Ryan Binns11-Feb-05 13:22
Ryan Binns11-Feb-05 13:22 
GeneralRe: First Win32 Program Pin
David Crow10-Feb-05 9:32
David Crow10-Feb-05 9:32 
GeneralThe 'Call' instruction Pin
Rajas P9-Feb-05 4:28
Rajas P9-Feb-05 4:28 
GeneralRe: The 'Call' instruction Pin
Antony M Kancidrowski9-Feb-05 5:29
Antony M Kancidrowski9-Feb-05 5:29 
The first function called
r = calc1(10,20,5);
becomes
0000001D: 6A 05 push 5                             - Parameter 5
0000001F: 6A 14 push 14h                           - Parameter 20
00000021: 6A 0A push 0Ah                           - Parameter 10
00000023: E8 00 00 00 00 call 00000028
00000028: 83 C4 0C add esp,0Ch                     - Alter the next execution
0000002B: 89 45 FC mov dword ptr [ebp-4],eax       - Get the result

The second function called
r = calc2(10,20);
becomes
0000002E: 6A 14 push 14h                           - Parameter 20
00000030: 6A 0A push 0Ah                           - Parameter 10
00000032: E8 00 00 00 00 call 00000037
00000037: 83 C4 08 add esp,8                       - Alter the next execution
0000003A: 89 45 FC mov dword ptr [ebp-4],eax       - Get the result


When the function is called epb holds the return address. You will notice that this needs to be preserved pushed and popped at start and end of function respectively.

Ant.

I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)

GeneralRe: The 'Call' instruction Pin
Ryan Binns9-Feb-05 17:52
Ryan Binns9-Feb-05 17:52 
GeneralSNTP server Pin
Anonymous9-Feb-05 4:10
Anonymous9-Feb-05 4:10 
GeneralRe: SNTP server Pin
markkuk9-Feb-05 12:22
markkuk9-Feb-05 12:22 
GeneralCDatabase OpenEx Error Connecting Pin
KatyLee9-Feb-05 4:04
sussKatyLee9-Feb-05 4:04 
GeneralRe: CDatabase OpenEx Error Connecting Pin
David Crow9-Feb-05 4:07
David Crow9-Feb-05 4:07 
GeneralRe: CDatabase OpenEx Error Connecting Pin
KatyLee9-Feb-05 4:48
sussKatyLee9-Feb-05 4:48 
GeneralRe: CDatabase OpenEx Error Connecting Pin
David Crow9-Feb-05 5:05
David Crow9-Feb-05 5:05 
QuestionFindText() and FindText2() functions in CHtmlView class for searching on different pages. Is it possible? Pin
bilas9-Feb-05 3:46
bilas9-Feb-05 3:46 
Questiona question for ListCtrl ? Pin
wushli9-Feb-05 2:23
wushli9-Feb-05 2:23 
AnswerRe: a question for ListCtrl ? Pin
David Crow9-Feb-05 2:26
David Crow9-Feb-05 2:26 
AnswerRe: a question for ListCtrl ? Pin
RChin9-Feb-05 5:53
RChin9-Feb-05 5:53 
AnswerRe: a question for ListCtrl ? Pin
Shog99-Feb-05 9:12
sitebuilderShog99-Feb-05 9:12 
GeneralSimplifying fractions in cpp Pin
Member 19169269-Feb-05 2:06
Member 19169269-Feb-05 2:06 
GeneralRe: Simplifying fractions in cpp Pin
Maximilien9-Feb-05 3:02
Maximilien9-Feb-05 3:02 
GeneralRe: Simplifying fractions in cpp Pin
Member 19169269-Feb-05 3:10
Member 19169269-Feb-05 3:10 
GeneralRe: Simplifying fractions in cpp Pin
David Crow9-Feb-05 4:05
David Crow9-Feb-05 4:05 
GeneralRe: Simplifying fractions in cpp Pin
namaskaaram9-Feb-05 17:11
namaskaaram9-Feb-05 17:11 

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.