What are the different flags in 8085?
Answer Posted / dsdsdsdsdsds
FLAG REGISTER
The Status Flags of the 8080 and 8085 are single bits which
indicate the logical conditions that existed as a result of
the execution of the instruction just completed. This
allows instructions following to act accordingly, such as a
branch as a result of two values comparing equal. The flags
are:
ZERO FLAG: This flag is set to a 1 by the instruction just
ending if the A Register contains a result of all 0’s.
Besides the obvious mathematical applications, this is
useful in determining equality in a compare operation (a
value subtracted from a second value with an answer of 0),
or in logical AND or OR operations where the result left
the A Register with no bit set to a 1 (the AND was not
satisfied). If any bits were left set to a 1 in the A
Register, the flag will be reset to a 0 condition.
SIGN FLAG: This flag is set to a 1 by the instruction just
ending if the leftmost, or highest order, bit of the A
Register is set to a 1. The leftmost bit of a byte in
signed arithmetic is the sign bit, and will be 0 if the
value in the lower seven bits is positive, and 1 if the
value is negative.
PARITY FLAG: This flag is set to a 1 by the instruction
just ending if the A Register is left with an even number
of bits set on, i.e., in even parity. If the number of bits
in the A Register is odd, the bit is left off. This may be
useful in I/O operations with serial devices, or anyplace
that error checking is to be done.
CARRY FLAG: This flag is set to a 1 by the instruction just
ending if a carry out of the leftmost bit occurred during
the execution of the instruction. An example would be the
addition of two 8-bit numbers whose sum was 9 bits long.
The 9th bit would be lost, yielding an erroneous answer if
the carry bit was not captured and held by this flag. This
flag is also set if a borrow occurred during a subtraction
or a compare operation.
AUXILIARY CARRY FLAG: This flag is set to a 1 by the
instruction just ending if a carry occurred from bit 3 to
bit 4 of the A Register during the instruction’s execution.
Because of the relationships of decimal in pure BCD to
hexadecimal coding, it is possible to bring BCD values
directly into the A Register and perform mathematical
operations on them. The result, however, will be as if two
hex characters are being processed. If the result must be
returned to the program as BCD rather than as hex, the
Decimal Adjust Accumulator (DAA) instruction can make that
translation; the Auxiliary Carry Flag is provided to assist
in this operation.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
The answer to the above question is breaking the combinational circuit and pipelining it. What will be affected if you do this?
What number of the times the instruction sequence below will loop before coming out of loop is MOV AL, 00hA1: INC AL JNZ A1
What happens when reset in(low) signal goes low?
What is lookup table microcontroller?
What is lst file?
Differentiate between hardware and software interrupts and state examples for both?
Mention any one 32 bit microcontroller and explain the same.
Define byte?
What the sp register does in a program?
What are the functions of general purpose registers?
The PCI bus is the important bus found in all the new Pentium systems because
Mention interrupts pins of 8085?
What are the software instructions related to stack operations?
How many bit microprocessor is the 8086 microprocessor?
Define the process of an interrupt operation in the 8086?