Ext Register And Data Extension - Epson S1C63000 Core Cpu Manual

Seiko epson s1c63000 cmos 4-bit single chip microcomputer core cpu manual
Table of Contents

Advertisement

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
B register
1
1001B(9)
1001B(9)
2 0101B(AH)
1001B(9)
3 1010B(AH) 1010B(AH) 1010B(AH)
4 1010B(AH) 1111B(FH) 1111B(FH)
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 64K-word addressable space, therefore it is required to handle 16-bit address
data. The EXT register and the F flag that extend 8-bit data into 16-bit data permit 16-bit data processing.
The EXT register is an 8-bit register for storing extension data. The E flag indicates that the EXT register
data is valid (extended addressing mode), and is set to "1" by writing data to the EXT register. The E flag
is reset at 1 cycle after setting (during executing the next instruction), therefore an EXT register data is
valid only for the executable instruction immediately after writing. However, that executable instruction
must be a specific instruction which permits the extended addressing to extend the data using the EXT
register. These instructions are specified in "Instruction List" and "Detailed Explanation of Instructions".
Make sure of the instructions when programming.
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
LDB
%EXT,%BA
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
• 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
LD
%F,imm4
AND
%F,imm4
OR
%F,imm4
XOR
%F,imm4
8
Result
A register
B register
1000B(8)
1001B(9)
Loads an 8-bit immediate data to the EXT register
Loads the content of the BA register to the EXT register
Loads the content of the EXT register to the BA register
Writes all the flag data
Writes all the flag data
Resets flag(s)
Sets flag(s)
Inverts flag(s)
F register
E
I
C
0
1
0
1
0
1
0
1
EPSON
Z
0
0
0
0
S1C63000 CORE CPU MANUAL

Advertisement

Table of Contents
loading

Table of Contents