Рет қаралды 4,701
To better understand the use of the CPU flags, it might help to see some examples of their use. In this episode, learn how the flags are set after a simple integer addition and how the zero and sign flags support conditional execution of our code.
Take aways: At the completion of this lesson, each student should be able to:
• determine the settings of the zero, the sign, the overflow, the carry, the half carry, and the parity flags based on the results of an integer addition and
• show how the zero flag and the sign flag can be used to control program flow.
Episodes referenced:
Ep 007: Packed Binary Coded Decimal (BCD) ( • Ep 007: Packed Binary ... )
Ep 012: Addition and Subtraction in Binary ( • Ep 012: Addition and S... )
Ep 013: Basics of Complement Notation ( • Ep 013: Basics of Comp... )
Ep 015: Overflow in Binary Integer Addition ( • Ep 015: Overflow in Bi... )
Ep 050: Using Parity for Simple Error Detection ( • Ep 050: Using Parity f... )
#cpu #flags #regsiter