Download presentation
Presentation is loading. Please wait.
Published byBertram Clark Modified over 9 years ago
1
Princess Sumaya Univ. Computer Engineering Dept. Chapter 6:
2
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 1 / 11 Boolean Instructions AND ●ANDreg, reg ●AND reg, mem ●AND reg, imm ●AND mem, reg ●AND mem, imm Sign, Zero Flags OR XOR NOT
3
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 2 / 11 Boolean Instructions Example:ASCII Case: A = 0100 0001 a = 0110 0001 Sentence = “I aM A sTudeNT”
4
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 3 / 11 Boolean Instructions TEST (Similar to AND) ●TESTreg, reg ●TEST reg, mem ●TEST reg, imm ●TEST mem, reg ●TEST mem, imm Sign, Zero Flags
5
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 4 / 11 Compare Instruction CMP (Similar to SUB) ●CMPreg, reg ●CMP reg, mem ●CMP reg, imm ●CMP mem, reg ●CMP mem, imm Carry, Overflow, Sign, Zero Flags
6
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 5 / 11 Jump on Condition Instructions Jcondition Label ●Zero ●Carry ●Overflow ●Sign ●CX = 0
7
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 6 / 11 Jump on Compare Result Unsigned Comparison (CMP X, Y) ●X > Y ●X ≥ Y ●X = Y ●X < Y ●X ≤ Y
8
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 7 / 11 Jump on Compare Result Signed Comparison (CMP X, Y) ●X > Y ●X ≥ Y ●X = Y ●X < Y ●X ≤ Y
9
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 8 / 11 Jump on Compare Result Example: Z = MAX ( X, Y )
10
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 9 / 11 Jump on Compare Result Example: D = MIN ( A, B, C )
11
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 10 / 11 Jump on Compare Result Example: Find the first nonzero element in an array
12
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. 11 / 11 LOOP on Condition (Repeat While) LOOPZ (LOOPE) ●Decrement the Counter ●If Counter > 0 and ZF = 1 jump to label LOOPNZ (LOOPNE)
13
Princess Sumaya University 22342 – Computer Org. & Assembly Lang. Computer Engineering Dept. Chapter 6
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.