Assembly for x86
This presentation is the property of its rightful owner.
Sponsored Links
1 / 9

Assembly For X86 PowerPoint PPT Presentation


  • 70 Views
  • Uploaded on
  • Presentation posted in: General

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

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Assembly for x86

Assembly For X86

Chapter 4

תנאים ולולאות


Assembly for x86

תנאים

if (AX==BX)

{

****

}

cmp ax,bx

jne skip1

****

skip1:


Assembly for x86

cmp ax,bx

jne else1

*****

jmp endif1

else1:

#######

endif1:

if (AX==BX)

{

*****

}

else

{

######

}


Assembly for x86

if ((AX==BX) && (CX==DX))

{

****

}

cmp AX,BX

jne skip1

cmp CX,DX

jne skip1

******

Skip1:


Assembly for x86

if ((AX==BX) || (CX==DX))

{

****

}

cmp AX,BX

je body1

cmp CX,DX

je body1

jmp skip1

body1:

******

Skip1:


Assembly for x86

לולאות

while(AX==BX)

{

***

}

body1:

cmp AX,BX

jne fin1

****

jmp body1

fin1:


Assembly for x86

לולאת DO

body1:

****

cmp AX,BX

je body1

do{

****

}while(AX==BX);


Assembly for x86

for(DX=0;DX<N;DX++)

{

***

}

mov DX,0

jmp check1

body1:

*****

inc DX

check1:

cmp DX,N

jl body1


Assembly for x86

הפקודה LOOP

  • אוגר CX משמש כמונה

  • ניתן לכתוב:

  • dec cx

  • jnz label

  • הפקודה הבאה שקולה

  • loop label


  • Login