Close

AscetiCore ⋅ Registers

jock-tannerJock Tanner wrote 02/23/2021 at 03:09 • 2 min read • Like

From the unprivileged user’s perspective, the CPU have a register file of 16 16-bit registers (let us denote them as R0 to R15 for brevity) and the 16-bit status register (SR). Registers in the register file, with some minor assumptions, can be called general purpose registers, similar to other architectures.

Each general-purpose register in the register file can be addressed in any way by any capable instruction. In addition, some of the common purpose registers have specific meaning and can be used implicitly in some special instructions. Those registers are:

The status register can be accessed using dedicated instructions. It contains various flags for use with the only conditional instruction SKIP:

Some instructions can treat a register as a word or a byte. In the latter case, only the lower 8 bit of the register’s content is accessed.

Like

Discussions