Читать книгу Microprocessor 4 - Philippe Darche - Страница 30

1.2.4.3. Bit addressing

Оглавление

The first GPPs (for General-Purpose Processor, cf. § V3-1.1) did not have specialized instructions to manipulate (set at one/zero or extraction) or to test individually the bits of an operand by conditional branching (cf. § 2.4.1). It is generally microcontrollers that possess them as they have to read or modify binary information in memory or at the input–output ports (cf. § 3.1 from Darche (2003)). Thus, the microcontroller 68HC12 from the MC6800 family from Motorola has the instructions bclr (bit clear) and bset (bit set) that initialize respectively at 0 or at 1 one position bit specified with the help of a binary mask (see exercise E2.4) in an address word A. These instructions use this mode associated with pre-studied conventional addressing modes. It should be noted that the addressing space is limited compared to other modes. The example in Figure 1.22 shows a reset at 0 for the MSb (Most Significant bit) of an I/O port in byte format implanted at the address 0F16.


Figure 1.22. Execution of an instruction in bit addressing

Microprocessor 4

Подняться наверх