In the last three chapters, the reader was introduced to a few MCS-51 instructions like data moving and loading, arithmetic operations and program branching. In this chapter, we will discuss applications of these instructions through a few example cases of programming. After completion of the chapter, the reader should be able to understand how these instructions may be properly utilized to

  • Manipulate data in different ways using pointers.
  • Use counters for iterations.
  • Plan any program flow and necessary branching.
  • Perform some basic arithmetic operations.

7.1 | Introduction

So far, we have made ourselves familiar with some, though not all, instructions of MCS-51 in the previous three chapters. Using ...

Get 8051 Microcontrollers, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.