What are Flag registers?

A:-Divided into 2 parts:-Condition code or status flags and machine control flags.
S-Sign Flag:-Is to set when the result of any computation is negative.
Z-Zero Flag:-Is to set if the result of the computation or comparison performed by the previous instruction is zero.
C-Carry Flag:-Is set when there is carry out of MSB in case of addition or a borrow in case of subtraction.
T-Trap Flag:-Is set,the processor enters the single step execution mode.
I-Interrupt Flag:-Is set,the maskable interrupts are recognized by the CPU.
D-Direction Flag:-Is set for autoincrementing or autodecrementing mode in string manipulation instructions.
AC-Auxiliary Carry Flag:-Is set if there is a carry from the lowest nibble during addition or borrow for the lowest nibble.
O-Overflow Flag:-Is setif the result of a signed operation is large enough to be accommodated in a destination register.

Leave a Reply

Your email address will not be published. Required fields are marked *