2011/12/7 T. L. Jong, Dept. of E.E., NTHU 1
System & Program
System & Program
Developments of 8051
Developments of 8051
Program Structure and Design
Introduction
Advantages and Disadvantages of Structured
Programming
The Three Structures: statements, loops, choice
Pseudo Code Syntax
Assembly Language Programming
Tools & Techniques for Program
Development
The Development Cycle
Integration and Verification
Command and Environments
2011/12/7 T. L. Jong, Dept. of E.E., NTHU 2
Introduction
Structured Programming:
Organizing and coding programs that reduces
complexity, improves clarity, and facilitates
debugging and modifying
All programs may be written using only three
structures: statements, loops, and choicetoo
good to be true.
Introduce Structure programming to
assembly language programming
Flowcharts
Pseudo code
Assembly language
2011/12/7 T. L. Jong, Dept. of E.E., NTHU 3
Flowcharts
Decision block
Process box
Input/Output block
Program terminator
Off-page connector
Predefined process
(subroutine)
Program flow arrow
2011/12/7 T. L. Jong, Dept. of E.E., NTHU 4
Pseudo Code
Strict adherence to structure in
combination with informal language
[get a character from the keyboard]
IF [condition is true]
THEN [do statement 1]
ELSE BEGIN
[do statement 2]
[do statement 3]
END
2011/12/7 T. L. Jong, Dept. of E.E., NTHU 5
Advantages & Disadvantages of
Structured Programming
Advantages:
Simple to trace, debug
Finite number of structures
Structures as building block
The set of structure is complete
Structures are self-documenting, easy
to read
Structures are easy to describe in
flowcharts, syntax diagrams, pseudo
code,..
Increased program productivity