Try   HackMD

In an 8085 microprocessor(what is microprocessor), flags are part of the flag register (also called status register). Flags are automatically updated after arithmetic or logical instructions, and you can check them using conditional jump or branch instructions.

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Common 8085 Flags

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

How to Check a Flag (in Assembly)
You don’t access the flags directly; instead, use conditional instructions like:

Conditional Jump Instructions

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Example: Check Zero Flag

assembly

MVI A, 00H    ; Load 0 into A
MOV B, A      ; Copy A to B
CMP B         ; Compare A with B → Z flag will be set (A - B = 0)
JZ LABEL      ; Jump to LABEL if Zero flag is set

Example: Check Carry Flag After Addition

assembly

MVI A, 0FFH   ; A = 255
ADI 01H       ; A = A + 1 = 256 → Carry generated
JC CARRY_LABEL ; Jump if CY flag is set

How to View Flags on 8085 Trainer Kit
If you're using a physical 8085 microprocessor trainer kit (like from Microprocessor Labs):

  1. Perform an operation (e.g., ADD, SUB, CMP).
  2. Use conditional jump instructions to test specific flags.
  3. Some kits have LEDs or LCDs showing the flag register bits.
  4. You can also write a small program to store the flag value (using status-checking logic or indirect testing).

Debug Tip
You can’t directly “read” a flag into a register in 8085 — instead, test the condition and set a value in memory to infer it:

assembly

MVI A, 0FFH
ADI 01H         ; A = A + 1 → Carry
JC SET_FLAG     ; If carry, go set memory location
MVI A, 00H
STA 8000H       ; Flag not set
JMP END
SET_FLAG:
MVI A, 01H
STA 8000H       ; Flag was set
END: HLT

Then inspect memory location 8000H on the kit to see if the flag was set.