delphi中if与else
program Project2;
{$APPTYPE CONSOLE}
uses
SysUtils,windows;
var
i,j:integer; //i,j全局变量。
begin
i:=123;
j:=323;
if i<j then
Writeln(i)
else
writeln(j);
readln;
end.
00408316 . BB 7B000000 mov ebx,7B ; i=123
0040831B . BE 43010000 mov esi,143 ; j=234
00408320 . 3BF3 cmp esi,ebx ; ⽐较i j
00408322 . 7E 18 jle short Project2.0040833C ; 如果i<=j 则跳到 40833C
00408324 . A1 04934000 mov eax,dword ptr ds:[409304]
00408329 . 8BD3 mov edx,ebx
0040832B . E8 88AAFFFF call Project2.00402DB8
00408330 . E8 B3AAFFFF call Project2.00402DE8
00408335 . E8 F2A2FFFF call Project2.0040262C ; 这三⾏实现了writeln
0040833A . EB 16 jmp short Project2.00408352 ;执⾏完上⾯的语句就要跳过下⾯的⼀些语句。直接到下⾯加粗的与语句中去。
0040833C > A1 04934000 mov eax,dword ptr ds:[409304]
delphi app00408341 . 8BD6 mov edx,esi
00408343 . E8 70AAFFFF call Project2.00402DB8
00408348 . E8 9BAAFFFF call Project2.00402DE8
0040834D . E8 DAA2FFFF call Project2.0040262C
00408352 > A1 70934000 mov eax,dword ptr ds:[409370]
程序⽤esi 和ebx存储i和j。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论