Lecture No.14
Lecture No.14
7th Edition
Kip R. Irvine
(c) Pearson Education, 2014. All rights reserved. You may modify and copy this slide show for your personal use, or for
use in the classroom, as long as this copyright statement, the author's name, and the title are not changed.
Chapter Overview
00111011
AND 0 0 0 0 1 1 1 1
00111011
OR 0 0 0 0 1 1 1 1
00111011
XOR 0 0 0 0 1 1 1 1
NOT 00111011
11000100 inverted
mov ax,wordVal
and ax,1 ; low bit set?
jz EvenValue ; jump if Zero flag set
or al,al
jnz IsNotZero ; jump if not zero
ORing any number with itself does not change its value.
test al,00000011b
jnz ValueFound
mov al,5
cmp al,5 ; Zero flag set
mov al,4
cmp al,5 ; Carry flag set
mov al,6
cmp al,5 ; ZF = 0, CF = 0