
























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Prof. Abhay Aggrawal delivered this lecture at Birla Institute of Technology and Science for lab of Assembly Language Programming. It includes: CMP, JCXZ, LOOP, Signs, Zeros, Caryy, Parity, Overflow, Multiplication, Doubleword, Flag, Initializers
Typology: Slides
1 / 32
This page cannot be seen from the preview
Don't miss anything!

























JLE Z=1 or S<>0 Jump is less than or equal
JNC C=0 Jump if no carry
JNE or JNZ Z=0 Jump if not equal, jump if not zero
JNO O=0 Jump if no overflow
JNS S=0 Jump if no sign
JNP or JPO P=0 Jump if no parity, jump if parity odd
JO O=1 Jump if overflow set
JP or JPE P=1 Jump if parity set, jump if parity even
JS S=1 Jump is sign is set
JECXZ ECX = 0 Jump if ECX is zero
JCXZ CX=0 Jump if CX is zero
Singed and unsigned
comparisons
When signed numbers are compared
use the JG, JL, JGE, JLE, JE, JNE
The terms greater than or less than refer
to singed numbers
When unsigned numbers are compared
use JA, JB, JAE, JBE, JE, JNE
The terms below and above refer to
unsigned numbers
80×86 architecture has two multiplication instruction mnemonics imul instruction treats its operands as signed numbers; the sign of the product is determined by the usual rules for multiplying signed numbers mul instruction treats its operands as unsigned binary numbers; the product is also unsigned If only non-negative numbers are to be multiplied, mul should usually be chosen instead of imul since it is a little faster
byte in AL; the product is 16 bits long, with a destination of the AX register
word in AX; the product is 32 bits long, with its low order 16 bits going to the AX register and its high order 16 bits going to the DX register
doubleword in EAX; the product is 64 bits long, with its low order 32 bits in the EAX register and its high order 32 bits in the EDX register
AX:00:
Byte at factor FF
Mul factor
AX: 04:FB
CF, OF 1