9618 Ch-7.3 Lesson Notes
9618 Ch-7.3 Lesson Notes
Another part of the monitoring and control program would then be checking whether any of the four flags were
set. The machine code for running such a program could use individual bits to represent each flag. The way
that flags could be set and read are illustrated by the following assembly language code fragments.
1. The following illustrates the setting of all bits to zero which might be used when the system is switched on.
2. The following illustrates the toggling of the value for one bit. This changes the value of the flag it represents.
It might be needed because a problem has been encountered or alternatively because a problem has been
solved.
3. The following illustrates the setting of a bit to have value 1 irrespective of its existing value. This would be a
simple way of just reporting a condition repetitively.