The STC instruction

The STC (Set Carry) instruction is used to set the carry flag to 1. The carry flag is an important status flag in the 8085 microprocessor, which is used to indicate various conditions during arithmetic and logical operations. With the STC instruction, the programmer can explicitly set the carry flag to 1, which can be useful in scenarios such as multi-byte arithmetic or conditional jumps based on the state of the carry flag.

The STC instruction format

InstructionDescription
STC Set the carry flag CY.

Usage example

; Author: Evgeny Sergeevich Dovgopolov

main:
    stc  ; Set the carry flag to 1

    hlt  ; Stop program execution

Example taken from the textbook "HANDYFAR - MASM (Evgeny Sergeevich Dovgopolov)".

Processor status flags

S
No
Z
No
AC
No
P
No
CY
Yes