Internally, the HC11
instruction set is
backward compatible with the
6800 and features the addition of a Y
index register. It has two
eight-bit accumulators, A and B, two
sixteen-bit index registers, X and Y, a condition code register, a 16-bit
stack pointer, and a
program counter. In addition, there is an 8 x 8-bit multiply (), with a full 16-bit result, and
fractional or integer 16-bit by 16-bit divide instructions. A range of 16-bit instructions treats the A and B registers as a combined 16-bit D register for comparison (X and Y registers may also be compared to 16-bit memory operands), addition, subtraction and shift operations, or can add the B accumulator to the X or Y index registers. Bit test operations have also been added, performing a
logical and function between operands, setting the correct condition codes, but not modifying the operands. Different versions of the HC11 have different numbers of external ports, labeled alphabetically. The most common version has five ports, A, B, C, D, and E, but some have as few as 3 ports (version D3). Each port is eight bits wide except for D, which is six bits (in some variations of the chip, D also has eight bits). It can be operated with an internal program and
RAM (1 to 768 bytes) or an external memory of up to 64
kilobytes. With external memory, B and C are used as
address and
data bus. In this mode, port C is
multiplexed to carry both the lower byte of the address and data. ==Implementations==