Jump to content
Tot_zeu

[asm]Structuri in high level si echivalentul acestora in ASM

Recommended Posts

Posted

Ce ar putea fi mai util?

do while

C

Code: Select all

do

{

x++;

} while(x != 10);

ASm

Code: Select all

mov eax, $x

:beginning

inc eax

cmp eax, 0x0A ;0x0A = 10

jne beginning

mov $x, eax

while

C

Code: Select all

while(x <= 10)

{

x++;

}

asm

Code: Select all

mov eax, $x

cmp x, 0x0A

jg end

beginning:

inc eax

cmp eax, 0x0A

jle beginning

end:

bucla infinta

C

Code: Select all

while(1)

{

//blabla

}

asm

Code: Select all

beginning:

;loop body

jmp beginning

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...