Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Professional Assembly Language
This is the forum to discuss the Wrox book Professional Assembly Language by Richard Blum; ISBN: 9780764579011
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional Assembly Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 19th, 2012, 10:14 AM
Registered User
Points: 11, Level: 1
Points: 11, Level: 1 Points: 11, Level: 1 Points: 11, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default question about cmp - newbie

Hello,
I am new to assembly language programming and reading the book, I would like to ask about cmp instruction (at&t syntax):

cmpl %eax, %ecx
ja label
does it mean jump to label if eax is above ecx, or if ecx is above eax?
and which instruction would be right here ja or jg?
any help would be greatly appreciated.
thank you.
 
Old December 23rd, 2012, 08:39 PM
Registered User
Points: 16, Level: 1
Points: 16, Level: 1 Points: 16, Level: 1 Points: 16, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

cmpl %eax,%ecx
ja label

it jump to label when ecx is above eax.

i think using ja or jg both right here.
it uses ja when you treat them as unsigned-number and uses jg signed-number.




Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie (very newbie!) question about com.paad.* jkcashin BOOK: Professional Android 2 Application Development 3 June 5th, 2013 06:52 AM
C# Newbie Question jazzcatone ASP.NET 2.0 Basics 1 May 25th, 2006 10:18 PM
newbie question Warbird XML 0 May 11th, 2005 08:41 AM
Newbie question maccer88 Access 1 October 18th, 2003 05:53 PM
How to execute findByPrimaryKey with CMP 2.0? mtedone J2EE 1 June 13th, 2003 04:06 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.