New instructions used in this chapter:
Counting of course is a useful feature for any control circuit. We may wish to count the number of times a door has opened or closed, or count a number of pulses from a rotating disc. If we count cars into a car park we would increment a file count every time a car entered, using the instruction INCF COUNT. If we needed to know how many cars were in the car park we would have course have to reduce the count by one every time a car left. We would do this by DECF COUNT. To clear the user file COUNT to start we would CLRF COUNT. In this way the file count would store the number of cars in the car park. If you prefer COUNT could be called CARS. ...