"Assembly" bubble sort ...

Source: Internet
Author: User

Recently in the study of the Assembly, also found that they have not written a blog for a long time, to update a yesterday with a sink to write the bubble sort it

last Friday began to learn the compilation, write less, hope forgive me

Code has bugs also look forward to discuss together

Data segmentbuf db 10,-4,-6,55,30,90,78,88,69n = $-bufdata endscode segmentassume cs:code,ds:datastart:mov ax, Datamov DS , Axmov CX, 0outter:cmp CX, nje finalinc CX mov dx, 0lea di, Bufmov si, 0inner:    mov di, si cmp dx, n-1je Outte  Rinc DX mov si, di inc Simov Al, [di]cmp al, [Si]jge Inner mov bl, [Si]mov [si], Almov [di], bljmp Innerfinal:mov AH , 4ch int 21hcode endsend start



"Assembly" bubble sort ...

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.