|
发表于 2013-1-5 17:47:06
|
显示全部楼层
本帖最后由 メ㊣逆ご帅☆ 于 2013-1-5 18:19 编辑
.while eax >1
mov esi,1
.continue
mov esi,2
.endw
.repeat
mov esi,1
.break .if !ebx
.continue
mov esi,2
.until eax > 1
.repeat
mov esi,1
.break
.untilcxz
我自己编译自己用IDA看了下反汇编代码
终于理清了
xt:00401000 jmp short loc_40100E;调至开头第一句
.text:00401000
.text:00401002 ; ---------------------------------------------------------------------------
.text:00401002
.text:00401002 loc_401002: ; CODE XREF: .text:00401011j
.text:00401002 mov esi, 1
.text:00401007 jmp short loc_40100E;.continue语句,跳出,略过这个循环,直接进行下一次循环
.text:00401007
.text:00401009 ; ---------------------------------------------------------------------------
.text:00401009 mov esi, 2;上面三句为while循环的内容
.text:00401009
.text:0040100E
.text:0040100E loc_40100E: ; CODE XREF: .text:startj
.text:0040100E ; .text:00401007j
.text:0040100E cmp eax, 1
.text:00401011 ja short loc_401002;上面两句判断eax是否大于1,则跳转至401002,对应.while eax>1
.text:00401011
.text:00401013
.text:00401013 loc_401013: ; CODE XREF: .text:00401026j
.text:00401013 mov esi, 1
.text:00401018 or ebx, ebx
.text:0040101A jz short loc_401028;.break .if !ebx代表如果EBX为0,则跳出,
;上面两句判断EBX是否为0,为0则直接跳出整个repeat循环
.text:0040101A
.text:0040101C jmp short loc_401023;执行.continue语句,跳过这次循环,转向until循环判断
.text:0040101C
.text:0040101E ; ---------------------------------------------------------------------------
.text:0040101E mov esi, 2
.text:0040101E
.text:00401023
.text:00401023 loc_401023: ; CODE XREF: .text:0040101Cj
.text:00401023 cmp eax, 1
.text:00401026 jbe short loc_401013;until循环判断
.text:00401026
.text:00401028
.text:00401028 loc_401028: ; CODE XREF: .text:0040101Aj
.text:00401028 mov esi, 1
.text:0040102D jmp short near ptr byte_401031;.break,程序直接结束
|
|