1 / 9

Assembly For X86

Assembly For X86. Chapter 4 תנאים ולולאות. תנאים. if (AX==BX) { **** }. cmp ax,bx jne skip1 **** skip1:. cmp ax,bx jne else1 ***** jmp endif1 else1: ####### endif1:. if (AX==BX) { ***** } else { ###### }. if ((AX==BX) && (CX==DX)) { **** }. cmp AX,BX jne skip1

roden
Download Presentation

Assembly For X86

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Assembly For X86 Chapter 4 תנאים ולולאות

  2. תנאים if (AX==BX) { **** } cmp ax,bx jne skip1 **** skip1:

  3. cmp ax,bx jne else1 ***** jmp endif1 else1: ####### endif1: if (AX==BX) { ***** } else { ###### }

  4. if ((AX==BX) && (CX==DX)) { **** } cmp AX,BX jne skip1 cmp CX,DX jne skip1 ****** Skip1:

  5. if ((AX==BX) || (CX==DX)) { **** } cmp AX,BX je body1 cmp CX,DX je body1 jmp skip1 body1: ****** Skip1:

  6. לולאות while(AX==BX) { *** } body1: cmp AX,BX jne fin1 **** jmp body1 fin1:

  7. לולאת DO body1: **** cmp AX,BX je body1 do{ **** }while(AX==BX);

  8. for(DX=0;DX<N;DX++) { *** } mov DX,0 jmp check1 body1: ***** inc DX check1: cmp DX,N jl body1

  9. הפקודה LOOP • אוגר CX משמש כמונה • ניתן לכתוב: • dec cx • jnz label • הפקודה הבאה שקולה • loop label

More Related