Click here to Skip to main content
15,895,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: converting series of Bytes to DWORD Pin
kakan21-Dec-05 1:17
professionalkakan21-Dec-05 1:17 
GeneralRe: converting series of Bytes to DWORD Pin
vikas amin21-Dec-05 2:17
vikas amin21-Dec-05 2:17 
GeneralRe: converting series of Bytes to DWORD Pin
kakan21-Dec-05 2:29
professionalkakan21-Dec-05 2:29 
QuestionHelp without ATL or MFC Pin
neliocc20-Dec-05 18:22
neliocc20-Dec-05 18:22 
AnswerRe: Help without ATL or MFC Pin
vikas amin20-Dec-05 19:46
vikas amin20-Dec-05 19:46 
AnswerRe: Help without ATL or MFC Pin
ThatsAlok20-Dec-05 21:22
ThatsAlok20-Dec-05 21:22 
AnswerRe: Help without ATL or MFC Pin
TheGreatAndPowerfulOz21-Dec-05 9:46
TheGreatAndPowerfulOz21-Dec-05 9:46 
Questiondisassembly Pin
devvvy20-Dec-05 17:23
devvvy20-Dec-05 17:23 
I'm stepping through my disassembled code:

<br />
*buffer2 = *buffer1; QUESTION 1<br />
<br />
00411AED  cmp         byte ptr [ebp-119h],0 QUESTION 2<br />
00411AF4  jne         main+0D3h (411B03h) <br />
00411AF6  push        411B6Bh <br />
00411AFB  call        @ILT+555(__RTC_UninitUse) (411230h) <br />
00411B00  add         esp,4 <br />
00411B03  cmp         byte ptr [ebp-10Dh],0 <br />
00411B0A  jne         main+0E9h (411B19h) <br />
00411B0C  push        411B63h <br />
00411B11  call        @ILT+555(__RTC_UninitUse) (411230h) <br />
00411B16  add         esp,4 <br />
00411B19  mov         eax,dword ptr [buffer2] <br />
00411B1C  mov         ecx,dword ptr [buffer1] <br />
00411B1F  mov         dl,byte ptr [ecx] <br />
00411B21  mov         byte ptr [eax],dl <br />


QUESTION 1
*buffer2 = *buffer1;
How's this one line translated to this this big chuck of disassembly? (I'm assembly newbie, playing with WinDbg, going thru instruction sets and trying to see things in action)

And, the first line of disassembly is a CMP instruction??

QUESTION 2
00411AED cmp byte ptr [ebp-119h],0 QUESTION 2

okay, is "ptr" a keyword? References? Also, is "byte" a keyword?

I'm looking at WinDbg's manual, the reference is... less than ... For example:

MOV r1, r/m Move with zero extension.

It doesn't state if parameter 1 is source or destination! Any good reference source?

QUESTION 3
How come "main" does not start with address 00000000? #include "stdafx.h" #include <stdio.h> int _tmain(int argc, _TCHAR* argv[]) { 00411A30 push ebp 00411A31 mov ebp,esp 00411A33 sub esp,120h

When I run WinDbg,

ModLoad: 00400000 0042c000 C:\development\Samples\TestDebugger.02\Debug\TestDebugger.02.exe
ModLoad: 77f50000 77ff7000 C:\WINDOWS\System32\ntdll.dll
ModLoad: 77e60000 77f46000 C:\WINDOWS\system32\kernel32.dll


Where's 00000000 to 00400000? What's in it?

QUESTION 4
Where's the "stack", is there a memory address...? Is EBP register the "address" of stack location in process memory/address space? And ESP (stack pointer) pointing to top of stack - but is it just a relative/offset from EBP? I assume EBP is "absolute" address based 00000000 (ie. start of process address space), am I right or wrong?

QUESTION 5
These addresses I see on stack trace, for example, 00411AED, is it "Virtual"? Where's the "zero" point?

Thanks in advance.

Norman Fung
AnswerRe: disassembly Pin
The NULL Developer21-Dec-05 0:20
professionalThe NULL Developer21-Dec-05 0:20 
GeneralRe: disassembly Pin
devvvy21-Dec-05 16:02
devvvy21-Dec-05 16:02 
GeneralRe: disassembly Pin
devvvy21-Dec-05 16:27
devvvy21-Dec-05 16:27 
QuestionHooking Explorer.exe Pin
ragavan20-Dec-05 17:19
ragavan20-Dec-05 17:19 
QuestionCListCtrl display long text problem. Pin
Zyraph20-Dec-05 16:29
Zyraph20-Dec-05 16:29 
QuestionModeless Property Sheet (Win32) Pin
VeRtRX20-Dec-05 8:22
VeRtRX20-Dec-05 8:22 
Questionreceiving windows messages Pin
Roy K20-Dec-05 8:18
Roy K20-Dec-05 8:18 
GeneralRe: receiving windows messages Pin
Ward20-Dec-05 9:44
Ward20-Dec-05 9:44 
GeneralRe: receiving windows messages Pin
Roy K20-Dec-05 13:10
Roy K20-Dec-05 13:10 
AnswerRe: receiving windows messages Pin
Ward20-Dec-05 19:51
Ward20-Dec-05 19:51 
QuestionRe: receiving windows messages Pin
David Crow20-Dec-05 10:16
David Crow20-Dec-05 10:16 
QuestionCSliderCtrl - dotted focus rect Pin
AJ12320-Dec-05 7:32
AJ12320-Dec-05 7:32 
AnswerRe: CSliderCtrl - dotted focus rect Pin
0verflow14-Oct-12 20:21
0verflow14-Oct-12 20:21 
QuestionHome-grown tooltip window Pin
#realJSOP20-Dec-05 7:14
mve#realJSOP20-Dec-05 7:14 
AnswerRe: Home-grown tooltip window Pin
PJ Arends20-Dec-05 7:36
professionalPJ Arends20-Dec-05 7:36 
QuestionGetSysColor Weirdness Pin
#realJSOP20-Dec-05 6:59
mve#realJSOP20-Dec-05 6:59 
AnswerRe: GetSysColor Weirdness Pin
Jack Puppy20-Dec-05 7:20
Jack Puppy20-Dec-05 7:20 

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.