
CHAPTER 2: ARCHITECTURE
•Notes in numbering operations
When performing a numbering operation, set operands in correct notation according to the radix before operation.
For example, if a decimal operation is done for hexadecimal values (AH to FH), the correct operation result is not obtained as shown in the following example.
Example: ADC %B,%A,10
| Setting value | Result |
| F register |
|
| ||
| B register | A register | B register | E | I | C | Z |
|
1 | 1001B(9) | 1001B(9) | 1000B(8) | 0 | – | 1 | 0 | ● |
2 | 0101B(AH) | 1001B(9) | 1001B(9) | 0 | – | 1 | 0 | ▲ |
3 | 1010B(AH) | 1010B(AH) | 1010B(AH) | 0 | – | 1 | 0 | ⋅ |
4 | 1010B(AH) | 1111B(FH) | 1111B(FH) | 0 | – | 1 | 0 | ⋅ |
|
|
|
|
|
|
|
|
|
Example 1 operates correctly because a decimal value is loaded in the B and A registers. Examples 3 and 4 do not operate correctly.
Example 2 operates correctly even though it is a wrong setting.
2.1.5 EXT register and data extension
The S1C63000 has a linear
Note: Do not use instructions (see Instruction List) which are invalid for the extended addressing when the E flag is set to "1". (Do not use them following instructions that write data to the EXT register or that set the E flag.) Normal operations cannot be guaranteed if such instructions are used.
(1)Operation for EXT register and E flag (flag register)
The following explains the operation for the EXT register and the E flag (flag register).
•Data setting to the EXT register
The following two instructions are provided to set data in the EXT register.
LDB | %EXT,imm8 | Loads an |
LDB | %EXT,%BA | Loads the content of the BA register to the EXT register |
By executing the instruction, the EXT flag is set to "1" and it indicates that the content of the EXT register is valid (the content of the EXT register will be used for data extension in the following instructions).
Furthermore, the content of the EXT register can be read using the instruction below.
LDB %BA,%EXT Loads the content of the EXT register to the BA register
• Setting/resetting the E flag
As mentioned above, the E flag is set to "1" by data setting to the EXT register and reset to "0" while executing the next instruction.
In addition, the E flag can be set/reset using the following instructions that operate the flags.
LD | %F,%A | Writes all the flag data |
LD | %F,imm4 | Writes all the flag data |
AND | %F,imm4 | Resets flag(s) |
OR | %F,imm4 | Sets flag(s) |
XOR | %F,imm4 | Inverts flag(s) |
8 | EPSON | S1C63000 CORE CPU MANUAL |