See C + + (exit process) with Assembly vision

Source: Internet
Author: User

Turn from: http://blog.csdn.net/feixiaoxing/article/details/6766366

Whether in the process of judgment or circulation, the corresponding module is usually exited when the appropriate conditions are met. There are many ways to jump out of the module, Break,continue,return can be. Below we will be able to introduce them separately.

(1) Continue can only be used for loops, and break loops and judgments are applied. What is the difference between the two?

View Plain 21:       for (int m = 10; m < 100 ;   m ++)    00401638   mov          dword ptr [ebp-4],0Ah   0040163f   jmp          process+2Ah  (0040164a)    00401641   mov          eax,dword ptr [ebp-4]   00401644    add         eax,1   00401647   mov          dword ptr [ebp-4],eax   0040164A    cmp         dword ptr [ebp-4],64h    0040164e   jge         process+55h   (00401675) &NBSP;&NBSp 22:       {   23:            if (m / 20 == 3)    00401650   mov          eax,dword ptr [ebp-4]   00401653    cdq   00401654&NBSP;&NBSP;&NBSP;MOV&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;&NBSP;ECX, 14h   00401659   idiv        eax,ecx    0040165b   cmp         eax,3   0040165e   jne         process+42h  (00401662)    24:           {   25:                break;   00401660    jmp         process+55h  (00401675)    26:            }   27:   28:            if (m / 10 == 0)    00401662    mov         eax,dword ptr [ebp-4]   00401665   cdq  

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.