能力值:
( LV2,RANK:10 )
|
-
-
2 楼
Delphi源代码
procedure TForm1.Button1Click(Sender: TObject);
var
s1:string;
s2:string;
s3:string;
begin
s1:='1234';
s2:='5678';
s3:=s1+s2;
end;
反汇编代码
0044D944 /. 55 PUSH EBP ; =0012F76C
0044D945 |. 8BEC MOV EBP,ESP ; =0012F62C
; s1:string;
0044D947 |. 6A 00 PUSH 0 ; 变量S1
; s2:string;
0044D949 |. 6A 00 PUSH 0 ; 变量S2
; s3:string;
0044D94B |. 6A 00 PUSH 0 ; 变量S3
*************编译器加的代码***************************************************************
* 0044D94D |. 33C0 XOR EAX,EAX
* 0044D94F |. 55 PUSH EBP ; =0012F62C
* 0044D950 |. 68 9ED94400 PUSH Project1.0044D99E ; =44D99E
* 0044D955 |. 64:FF30 PUSH DWORD PTR FS:[EAX] ; =12F95C
* 0044D958 |. 64:8920 MOV DWORD PTR FS:[EAX],ESP
******************************************************************************************
0044D95B |. 8D45 FC LEA EAX,DWORD PTR SS:[EBP-4] ; 0012F628
0044D95E |. BA B4D94400 MOV EDX,Project1.0044D9B4 ; 0044D9B4=ASCII "1234"
;s1:='1234';
0044D963 |. E8 4065FBFF CALL Project1.00403EA8 ; [12F628]=44D9B4 字串指针
0044D968 |. 8D45 F8 LEA EAX,DWORD PTR SS:[EBP-8] ; 0012F624
;s2:='5678';
0044D96B |. BA C4D94400 MOV EDX,Project1.0044D9C4 ; ASCII "5678"
0044D970 |. E8 3365FBFF CALL Project1.00403EA8
;s3:=s1+s2;
0044D975 |. 8D45 F4 LEA EAX,DWORD PTR SS:[EBP-C]
0044D978 |. 8B4D F8 MOV ECX,DWORD PTR SS:[EBP-8]
0044D97B |. 8B55 FC MOV EDX,DWORD PTR SS:[EBP-4]
0044D97E |. E8 9967FBFF CALL Project1.0040411C ; S3=S1+S2
*************编译器加的代码***************************************************************
* 0044D983 |. 33C0 XOR EAX,EAX
* 0044D985 |. 5A POP EDX ; 0012F95C
* 0044D986 |. 59 POP ECX ; 44D99E
* 0044D987 |. 59 POP ECX ; 12F62C
* 0044D988 |. 64:8910 MOV DWORD PTR FS:[EAX],EDX ; 0012F95C
* 0044D98B |. 68 A5D94400 PUSH Project1.0044D9A5 ; 44D9A5
* 0044D990 |> 8D45 F4 LEA EAX,DWORD PTR SS:[EBP-C] ; 0012F620
* 0044D993 |. BA 03000000 MOV EDX,3
* 0044D998 |. E8 9764FBFF CALL Project1.00403E34 ; 堆栈S1,S2,S2清0
* 0044D99D \. C3 RETN
* 0044D99E .^ E9 715EFBFF JMP Project1.00403814
* 0044D9A3 .^ EB EB JMP SHORT Project1.0044D990
******************************************************************************************
0044D9A5 . 8BE5 MOV ESP,EBP
0044D9A7 . 5D POP EBP ; =0012F76C
0044D9A8 . C3 RETN
|
能力值:
( LV2,RANK:10 )
|
-
-
3 楼
网上找到了答案
但还是没搞清原理
|
|
|