We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
SSWT [SUPERSTARWESTECHCOM]
CS401-ASSEMBLY LANGUAGE AND PROGRAMMING
S401 CHAPTER NO 3 [LECTURE 8-3)
PREPARED BY: HTTPS-//WWW SUPERSTARWEBTECHCOM/
Short Notes Chapter 3 (Lecture 8-9]
CMP:
The basic root instruction for all comparisons is CMP standing for compare. The operation of CMP is to
‘subtract the source operand from the destination operand, updating the flags without changing either the
source or the destination, CMP is meaningless without a conditional jump immediately folowing i.
Jumps for Signed and Unsigned numbers:
For signed numbers JG and JL will work properly and for unsigned JA and JB will work properly and not the
‘other way around,
The JA and JB instructions are related to unsigned numbers, That is our interpretation forthe destination
and source operands is unsigned. The ‘6th bit holds data and not the sign In the JL and JG instructions
standing for jump if lower and jump if greater respectively, the interpretation is signed. The 16th bit holds
the sign and not the data
The unsigned comparisons see the numbers as 0 being the smallest and 65535 being the largest with the
‘order that 0 < 1 <2... < 65535, The signed comparisons see the number -32768 which has the same
memory representation as 32768 as the smallest number and 32767 as the largest with the order -32768 <
“32767