
73
CHAPTER 3
CPU ARCHITECTURE
User’s Manual U12697EJ4V1UD
3.7.3 Using the RSS bit
Basically, always use the RSS bit fixed to 0.
The following descriptions discuss using a 78K/III Series program and a program that sets the RSS bit to 1. Reading
is not necessary if the RSS bit is fixed to 0.
The RSS bit enables the functions in A (R1), X (R0), B (R3), C (R2), AX (RP0), and BC (RP1) to also be used
in registers R4 to R7 (RP2, RP3). When this bit is effectively used, efficient programs in terms of program size and
program execution can be written.
Sometimes, however, unexpected problems arise if the RSS bit is used carelessly. Consequently, always set the
RSS bit to 0. Use the RSS bit set to 1 only when 78K/III Series programs will be used.
By setting the RSS bit to 0 in all programs, writing and debugging programs become more efficient.
Even if a program where the RSS bit is set to 1 is used, when possible, it is recommended to use the program
after modifying the program so that the RSS bit is not set to 1.
(1) Using the RSS bit
Registers used by instructions where the A, X, B, C, and AX registers are directly described in the operand
column of the operation list (see 28.2)
Registers that are implicitly specified by instructions that use the A, AX, B, and C registers with implied
addressing
Registers that are used in addressing by instructions that use the A, B, and C registers with indexed addressing
and based indexed addressing
The registers used in these cases are switched in the following ways by the RSS bit.
When RSS = 0
A
→R1, X→R0, B→R3, C→R2, AX→RP0, BC→RP1
When RSS = 1
A
→R5, X→R4, B→R7, C→R6, AX→RP2, BC→RP3
The registers used in other cases always become the same registers regardless of the contents of the RSS bit.
For registers A, X, B, C, AX, and BC in the NEC assembler RA78K4, instruction code is generated for any register
described by name or for registers set by an RSS quasi directive in the assembler.
When the RSS bit is set or reset, always specify an RSS quasi directive immediately before (or immediately after)
that instruction (see the following examples).
<Program examples>
When RSS = 0
RSS 0
; RSS quasi directive
CLR1 PSWL. 5
MOV B, A
; This description corresponds to “MOV R3, R1”.