6.4.4 Illustrative Program: Testing of The Carry Flag: Flowchart and
6.4.4 Illustrative Program: Testing of The Carry Flag: Flowchart and
All the Jump instructions are listed here for an overview. The Zero and Carry flags
and related Jump instructions are used frequently. They are illustrated in the following ex-
amples.
YES NO
5. Display.
6. End.
FLOWCHART AND ASSEMBLY LANGUAGE PROGRAM
The six steps listed above can be converted into a flowchart and assembly language pro-
gram as shown in Figure 6.10.
Step 3 is a decision-making block. In a flowchart, the decision-making process is
represented by a diamond shape. It is important to understand how this block is translated
into the assembly language program. By examining the block carefully you will notice
the following:
1. The question is: Is there a Carry?
2. If the answer is no, change the sequence of the program. In the assembly language this
is equivalent to Jump On No Carry—JNC.