Assembly for x86
Download
1 / 9

Assembly For X86 - PowerPoint PPT Presentation


  • 91 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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha

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

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

cmp CX,DX

jne skip1

******

Skip1:


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

{

****

}

cmp AX,BX

je body1

cmp CX,DX

je body1

jmp skip1

body1:

******

Skip1:


לולאות

while(AX==BX)

{

***

}

body1:

cmp AX,BX

jne fin1

****

jmp body1

fin1:


לולאת DO

body1:

****

cmp AX,BX

je body1

do{

****

}while(AX==BX);


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

{

***

}

mov DX,0

jmp check1

body1:

*****

inc DX

check1:

cmp DX,N

jl body1


הפקודה LOOP

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

  • ניתן לכתוב:

  • dec cx

  • jnz label

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

  • loop label


ad
  • Login