A register machine is an easily available place on a computer that can be programmed to store any type of information. Some register machines can be single-register, double-register or a multi-register machine. Register machines are designed to allow access to memory only when the corresponding key is touched. Other types of register machines may be used in conjunction with a microprocessor chip and can be accessed directly by the appropriate key. Some register machines are designed to be directly connected to a microprocessor or microcontroller, while others are designed to use a pin for connection to the chip.
A register machine, sometimes called a microprocessor register, is an inexpensive but convenient way of storing and accessing information. Most register machines are available with some standard memory formats, including nibbles, binary, hex and even multiple-bit memory. Some registers can be either read or write-protected, while others have special hardware functions, and can only be read or written by the appropriate user-accessible architectures. Typical register software applications include user-defined functions, instruction-set programming, data-model programming, and others.
Register operations are performed on two levels: low level hardware and higher level software. The low-level software typically utilizes assembler or disassembler programs to generate machine code that operates on the selected instructions. The higher-level software alters the source code to generate machine instructions. The memory on the register machines is accessed via microcode that is generated by the compiler.
One accumulator register can hold one register state, which is another register. This accumulator in a multiple-register machine can hold two or more register states, each holding a different value. One accumulator register can also hold the stack pointer, which points to the current contents of all registers. The stack pointer is saved into the register address pointer (are pointer values are saved in the CPU), so when this pointer changes, all previous contents are updated. Each instruction is executed in context of the current contents in registers, so instructions are compiled first by context, then in source code, making it more efficient.
The register file is a virtual register that saves and references information for all instructions and compile time. Allocate and deallocate space to hold instructions as they are needed by the compiler. The stack machine stores temporary contents such as temporary labels that help the stack machine identify instructions that are already executed but wanted by the programmer. The compiler emits instructions with the label that is eventually executed in the compiled program.
An address register is used to hold data. Each microprocessor has at least one internal register, called an INX which holds data that are referenced by other internal registers. Internally, the PC is divided into three logical sub-systems, namely, execution unit, memory map, and input and output devices. Output and input devices are connected to the appropriate hardware via a bus, while the output portion is undefined. The PC is programmed with function blocks that specify how the different components of the PC will interact and communicate with each other.