943,936 Members | Top Members by Rank

Ad:
  • Assembly Discussion Thread
  • Unsolved
  • Views: 2713
  • Assembly RSS
Mar 26th, 2006
0

Control Intructions

Expand Post »
Here are the control transfer instruction inerruot the sequential execution of instruction in memory and transfer control to some other point in memory either unconditionally or after testing the result of "CMP: instruction..

The Control Intructions are:

1-ja dest-----> Jump if above
2-jae dest -----> jump if above or equal
3-jb dest -----> jumo if below
4-jbe dest -----> jump if below or equal
5- je dest -----> jump if equal
6- jne dest -----> jump if not equal
7-jmp dest -----> Unconditional jump
8-irest -----> Return from an interrupt


Cheers
Dabdob
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
Dabdob is offline Offline
26 posts
since Dec 2005
Mar 26th, 2006
0

Re: Control Intructions

>either unconditionally or after testing the result of "CMP: instruction..
Or any instruction that modifies the appropriate flags. For example, I could say:
Assembly Syntax (Toggle Plain Text)
  1. dec ecx
  2. jz foo
To jump to foo when ecx reaches 0. Sometimes it's more efficient to avoid cmp in favor of a more implicit test.

>The Control Intructions are:
You're missing quite a few, but that's not as important as the distinction between the signed and unsigned representations. If you're doing something like this:
Assembly Syntax (Toggle Plain Text)
  1. ; Print [0,10) in reverse
  2. mov eax,9
  3. again:
  4. call print_num
  5. dec eax
  6. cmp eax,0
  7. jae again
jae is an unsigned condition, but it's used like the signed equivalent jge, and will result in an infinite loop because jae doesn't recognize negative values. When eax goes to -1, jae will see it as a large unsigned value.

>8-irest -----> Return from an interrupt
You should check your spelling when typing technical information. To my knowledge, there's no "irest" instruction in the x86 architecture.

I like your helpful attitude though, keep it up.
Administrator
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Narue is offline Offline
11,807 posts
since Sep 2004
Mar 26th, 2006
0

Re: Control Intructions

[QUOTE=Narue>8-irest -----> Return from an interrupt
You should check your spelling when typing technical information. To my knowledge, there's no "ire[B]s[/B]t" instruction in the x86 architecture.

QUOTE]

Yes, it's "iret" sorry for my mistake :cry:
Reputation Points: 10
Solved Threads: 0
Light Poster
Dabdob is offline Offline
26 posts
since Dec 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Assembly Forum Timeline: in TASM program, how to get the page number?
Next Thread in Assembly Forum Timeline: is this code Right and why





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC