Signed vs unsigned
1 char c = -1; 2 00A81962 mov byte ptr [c],0FFh 3 unsigned char uc = -1; 4 00A81966 mov byte ptr [uc],0FFh 5 6 if (uc == c) 7 00A8196A movzx eax,byte ptr [uc] 8 00A8196E movsx ecx,byte ptr [c] 9 00A81972 cmp eax,ecx 10 00A81974 jne main+53h (0A81983h) 11 printf("1\n"); 12 00A81976 push offset string "1\n" (0A87B7Ch) 13 00A8197B call _printf (0A8104Bh) 14 00A81980 add esp,4 15 16 if ((char)uc == c) 17 00A81983 movsx eax,byte ptr [uc] 18 00A81987 movsx ecx,byte ptr [c] 19 00A8198B cmp eax,ecx 20 00A8198D jne main+6Ch (0A8199Ch) 21 printf("1\n"); 22 00A8198F push offset string "1\n" (0A87B7Ch) 23 00A81994 call _printf (0A8104Bh) 24 00A81999 add esp,4
Multi-level Pointer
1 printf("Value of var using level-4"
2 00E2198B mov eax,dword ptr [ptr4]
3 00E2198E mov ecx,dword ptr [eax]
4 00E21990 mov edx,dword ptr [ecx]
5 00E21992 mov eax,dword ptr [edx]
6 00E21994 cvtss2sd xmm0,dword ptr [eax]
7 00E21998 sub esp,8
8 00E2199B movsd mmword ptr [esp],xmm0
9 00E219A0 push offset string "Value of var using level-4 poin@"... (0E27BE4h)
10 00E219A5 call _printf (0E2104Bh)
11 00E219AA add esp,0Ch
12 " pointer = %f\n", ****ptr4);