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
In how many groups can the signals of 8085 be classified?
Tell the addresses which are bit addressable?
Given a circuit, draw its exact timing response?
What is the RST for the TRAP?
What are the advantages of memory segmentation in 8086
Explain what is sim and rim instructions?
In 8085, power and frequency can be checked by connecting the wire with which pins?
What is a microprocessor?
What is internal structure of 8086?
Why the temporary registers w and z are named so I mean we start from a,b,c,d,e then h and l coz h stands for higher bit nd l for lower bit of the address pinted by memory pointer....but wats w and z for?
What is a linker?
Explain the characteristics of the cmp instructions?
Define edge or level sensitive interrupts?
Explain xthl, daa, rc instructions.
Explain the significance of signal?