Hardware Reference
In-Depth Information
The flowchart symbols used in this topic are shown in Figure 2.1. The terminal symbol is
used at the beginning and the end of each program. When it is used at the beginning of a pro-
gram, the word Start is written inside it. When it is used at the end of a program, it contains the
word Stop .
The process box indicates what must be done at this point in the program execution. The
operation specified by the process box could be shifting the contents of one general-purpose reg-
ister to a peripheral register, decrementing a loop count, and so on.
The input/output box is used to represent data that are either read or displayed by the
computer.
The decision box contains a question that can be answered either yes or no. A decision box
has two exits, also marked yes or no. The computer will take one action if the answer is yes and
will take a different action if the answer is no.
The on-page connector indicates that the flowchart continues elsewhere on the same page.
The place where it is continued will have the same label as the on-page connector.
The off-page connector indicates that the flowchart continues on another page. To deter-
mine where the flowchart continues, one needs to look at the following pages of the flowchart
to find the matching off-page connector.
Normal flow on a flowchart is from top to bottom and from left to right. Any line that
does not follow this normal flow should have an arrowhead on it. When the program gets com-
plicated, the flowchart that documents the logic flow of the program also becomes difficult to
follow. This is the limitation of the flowchart. In this topic, we will mix both the flowchart and
the algorithm procedure to describe the solution to a problem.
After the programmer is satisfied with the algorithm or the flowchart, it is converted to
source code in one of the assembly or high-level languages. Each statement in the algorithm
(or each block of the flowchart) will be converted into one or multiple assembly instructions
A
Terminal
Process
Subroutine
Input or
output
B
Off-page connector
Yes
Decision
A
On-page connector
No
Figure 2.1 Flowchart symbols used in this topic
 
Search WWH ::




Custom Search