X- and Y-Register

The X- and Y-Register both serve as general-purpose registers, but they have one additional feature compared to the A-Register: The “inc” and “dec” inputs.
With these inputs, the register’s values can be incremented or decremented in a single step and without ALU-operation, that’s why they are e.g. used for index variables in loops.

If “inc” or “dec” is active on the rising edge of the CLK, the registers increment or decrement accordingly. If none of these two inputs are active, nothing happens to the contents of the register, so it can be used as a normal general-purpose register.

Internally, the registers use two 4-Bit up/down counters each, which increment and decrement according to the INC- and DEC-inputs.
One problem with these up/down counters is, that they load data asynchronously when their input is enabled. That’s why I introduced a monostable multivibrator, which generates short active signals on the input enable pins of the counters. This makes them act as a register which only load data on the rising edge of a CLK/enable signal.

X-Register

Schematic

X-Register schematic

Y-Register

Schematic

Y-Register schematic