
CM26-00301-2E
F 2 MC-8FX
8-BIT MICROCONTROLLER PROGRAMMING MANUAL




8-BIT MICROCONTROLLER PROGRAMMING MANUAL



The F2MC-8FX is original 8-bit one-chip microcontrollers that support application specific IC (ASIC). It can be widely applied from household to industrial equipment starting with portable equipment.
This manual is intended for engineers who actually develop products using the F2MC-8FX microcontrollers, especially for programmers who prepare programs using the assembly language for the F2MC-8FX series assembler. It describes various instructions for the F2MC- 8FX.
The company names and brand names herein are the trademarks or registered trademarks of their respective owners.
This manual consists of the following six chapters:
CHAPTER 1 OUTLINE AND CONFIGURATION EXAMPLE OF F2MC-8FX CPU
This chapter outlines the F2MC-8FX CPU and explains its configuration by example.
This chapter explains the F2MC-8FX CPU memory space.
This chapter explains the F2MC-8FX dedicated registers and general-purpose registers.
This chapter explains the functions and operation of F2MC-8FX interrupt processing.
This chapter explains the instructions for the F2MC-8FX CPU.
This chapter explains each execution instruction, used in the assembler, in reference format.
The appendix contains instruction and bus operation lists and an instruction map.

Copyright© 2004-2008 FUJITSU LIMITED All rights reserved.

CHAPTER 1 OUTLINE AND CONFIGURATION EXAMPLE OF F2MC-8FX CPU 1 1.1 Outline of F2MC-8FX CPU 2 1.2 Configuration Example of Device Using F2MC-8FX CPU 3
CHAPTER 2 MEMORY SPACE 5 2.1 CPU Memory Space 6 2.2 Memory Space and Addressing 7 2.2.1 Data Area 9 2.2.2 Program Area 11 2.2.3 Arrangement of 16-bit Data in Memory Space 13
CHAPTER 3 REGISTERS 15 3.1 F2MC-8FX Registers 16 3.2 Program Counter (PC) and Stack Pointer (SP) 17 3.3 Accumulator (A) and Temporary Accumulator (T) 18 3.3.1 How To Use The Temporary Accumulator (T) 20 3.3.2 Byte Data Transfer and Operation of Accumulator (A) and Temporary Accumulator (T) 21 3.4 Program Status (PS) 23 3.5 Index Register (IX) and Extra Pointer (EP) 26 3.6 Register Banks 27 3.7 Direct Banks 28
CHAPTER 4 INTERRUPT PROCESSING 29 4.1 Outline of Interrupt Operation 30 4.2 Interrupt Enable/Disable and Interrupt Priority Functions 32 4.3 Creating an Interrupt Processing Program 34 4.4 Multiple Interrupt 36 4.5 Reset Operation 37
CHAPTER 5 CPU SOFTWARE ARCHITECTURE 39 5.1 Types of Addressing Modes 40 5.2 Special Instructions 43
CHAPTER 6 DETAILED RULES FOR EXECUTION INSTRUCTIONS 47 6.1 ADDC (ADD Byte Data of Accumulator and Temporary Accumulator with Carry to Accumulator) 48 6.2 ADDC (ADD Byte Data of Accumulator and Memory with Carry to Accumulator) 50 6.3 ADDCW (ADD Word Data of Accumulator and Temporary Accumulator with Carry to Accumulator) 52 6.4 AND (AND Byte Data of Accumulator and Temporary Accumulator to Accumulator) 54 6.5 AND (AND Byte Data of Accumulator and Memory to Accumulator) 56 6.6 ANDW (AND Word Data of Accumulator and Temporary Accumulator to Accumulator) 58

6.7 BBC (Branch if Bit is Clear) 60 6.8 BBS (Branch if Bit is Set) 62 6.9 BC (Branch relative if C=1)/BLO (Branch if LOwer) 64 6.10 BGE (Branch Great or Equal: relative if larger than or equal to Zero) 66 6.11 BLT (Branch Less Than zero: relative if < Zero) 68 6.12 BN (Branch relative if N = 1) 70 6.13 BNZ (Branch relative if Z = 0)/BNE (Branch if Not Equal) 72 6.14 BNC (Branch relative if C = 0)/BHS (Branch if Higher or Same) 74 6.15 BP (Branch relative if N = 0: PLUS) 76 6.16 BZ (Branch relative if Z = 1)/BEQ (Branch if Equal) 78 6.17 CALL (CALL subroutine) 80 6.18 CALLV (CALL Vectored subroutine) 82 6.19 CLRB (Clear direct Memory Bit) 84 6.20 CLRC (Clear Carry flag) 86 6.21 CLRI (CLeaR Interrupt flag) 88 6.22 CMP (CoMPare Byte Data of Accumulator and Temporary Accumulator) 90 6.23 CMP (CoMPare Byte Data of Accumulator and Memory) 92 6.24 CMP (CoMPare Byte Data of Immediate Data and Memory) 94 6.25 CMPW (CoMPare Word Data of Accumulator and Temporary Accumulator) 96 6.26 DAA (Decimal Adjust for Addition) 98 6.27 DAS (Decimal Adjust for Subtraction) 100 6.28 DEC (DECrement Byte Data of General-purpose Register) 102 6.29 DECW (DECrement Word Data of Accumulator) 104 6.30 DECW (DECrement Word Data of Extra Pointer) 106 6.31 DECW (DECrement Word Data of Index Pointer) 108 6.32 DECW (DECrement Word Data of Stack Pointer) 110 6.33 DIVU (DIVide Unsigned) 112 6.34 INC (INCrement Byte Data of General-purpose Register) 114 6.35 INCW (INCrement Word Data of Accumulator) 116 6.36 INCW (INCrement Word Data of Extra Pointer) 118 6.37 INCW (INCrement Word Data of Index Register) 120 6.38 INCW (INCrement Word Data of Stack Pointer) 122 6.39 JMP (JuMP to address pointed by Accumulator) 124 6.40 JMP (JuMP to effective Address) 126 6.41 MOV (MOVE Byte Data from Temporary Accumulator to Address Pointed by Accumulator) 128 6.42 MOV (MOVE Byte Data from Memory to Accumulator) 130 6.43 MOV (MOVE Immediate Byte Data to Memory) 132 6.44 MOV (MOVE Byte Data from Accumulator to memory) 134 6.45 MOVW (MOVE Word Data from Temporary Accumulator to Address Pointed by Accumulator) 136 6.46 MOVW (MOVE Word Data from Memory to Accumulator) 138 6.47 MOVW (MOVE Word Data from Extra Pointer to Accumulator) 140 6.48 MOVW (MOVE Word Data from Index Register to Accumulator) 142 6.49 MOVW (MOVE Word Data from Program Status Register to Accumulator) 144 6.50 MOVW (MOVE Word Data from Program Counter to Accumulator) 146 6.51 MOVW (MOVE Word Data from Stack Pointer to Accumulator) 148 6.52 MOVW (MOVE Word Data from Accumulator to Memory) 150 6.53 MOVW (MOVE Word Data from Accumulator to Extra Pointer) 152

6.54 MOVW (MOVE Immediate Word Data to Extra Pointer) 154 6.55 MOVW (MOVE Word Data from Accumulator to Index Register) 156 6.56 MOVW (MOVE Immediate Word Data to Index Register) 158 6.57 MOVW (MOVE Word data from Accumulator to Program Status Register) 160 6.58 MOVW (MOVE Immediate Word Data to Stack Pointer) 162 6.59 MOVW (MOVE Word data from Accumulator to Stack Pointer) 164 6.60 MULU (MULtiply Unsigned) 166 6.61 NOP (NoOPeration) 168 6.62 OR (OR Byte Data of Accumulator and Temporary Accumulator to Accumulator) 170 6.63 OR (OR Byte Data of Accumulator and Memory to Accumulator) 172 6.64 ORW (OR Word Data of Accumulator and Temporary Accumulator to Accumulator) 174 6.65 PUSHW (PUSH Word Data of Inherent Register to Stack Memory) 176 6.66 POPW (POP Word Data of Intherent Register from Stack Memory) 178 6.67 RET (RETurn from subroutine) 180 6.68 RETI (RETurn from Interrupt) 182 6.69 ROLC (Rotate Byte Data of Accumulator with Carry to Left) 184 6.70 RORC (Rotate Byte Data of Accumulator with Carry to Right) 186 6.71 SUBC (SUBtract Byte Data of Accumulator from Temporary Accumulator with Carry to Accumulator) 188 6.72 SUBC (SUBtract Byte Data of Memory from Accumulator with Carry to Accumulator) 190 6.73 SUBCW (SUBtract Word Data of Accumulator from Temporary Accumulator with Carry to Accumulator) 192 6.74 SETB (Set Direct Memory Bit) 194 6.75 SETC (SET Carry flag) 196 6.76 SETI (SET Interrupt flag) 198 6.77 SWAP (SWAP Byte Data Accumulator "H" and Accumulator "L") 200 6.78 XCH (eXCHange Byte Data Accumulator "L" and Temporary Accumulator "L") 202 6.79 XCHW (eXCHange Word Data Accumulator and Extrapointer) 204 6.80 XCHW (eXCHange Word Data Accumulator and Index Register) 206 6.81 XCHW (eXCHange Word Data Accumulator and Program Counter) 208 6.82 XCHW (eXCHange Word Data Accumulator and Stack Pointer) 210 6.83 XCHW (eXCHange Word Data Accumulator and Temporary Accumulator) 212 6.84 XOR (eXclusive OR Byte Data of Accumulator and Temporary Accumulator to Accumulator) 214 6.85 XOR (eXclusive OR Byte Data of Accumulator and Memory to Accumulator) 216 6.86 XORW (eXclusive OR Word Data of Accumulator and Temporary Accumulator to Accmulator) 218
APPENDIX A Instruction List 222
A.1 F2MC-8FX CPU Instruction Overview 223 A.2 Operation List 226 A.3 Flag Change Table 233 APPENDIX B Bus Operation List 240 APPENDIX C Instruction Map 251



The vertical lines marked in the left side of the page show the changes.



OF F 2 MC-8FX CPU
This chapter outlines the F2MC-8FX CPU and explains its configuration by example.
1.1 Outline of F2MC-8FX CPU
1.2 Configuration Example of Device Using F2MC-8FX CPU

CHAPTER 1 OUTLINE AND CONFIGURATION EXAMPLE OF F2MC-8FX CPU
The F2MC-8FX CPU is a high-performance 8-bit CPU designed for the embedded control of various industrial and OA equipment.
The F2MC-8FX CPU is a high-performance 8-bit CPU designed for the control of various industrial and OA equipment. It is especially intended for applications requiring low voltages and low power consumption. This 8-bit CPU can perform 16-bit data operations and transfer and is suitable for
applications requiring 16-bit control data. The F2MC-8FX CPU is upper compatibility CPU of the F2MC- 8L CPU, and the instruction cycle number is shortened, the division instruction is strengthened, and a direct area is enhanced.
The F2MC-8FX CPU features are as follows:
High code efficiency

CHAPTER 1 OUTLINE AND CONFIGURATION EXAMPLE OF F2MC-8FX CPU
The CPU, ROM, RAM and various resources for each F2MC-8FX device are designed in modules. The change in memory size and replacement of resources facilitate manufacturing of products for various applications.
Figure 1.2-1 shows a configuration example of a device using the F2MC-8FX CPU.
Figure 1.2-1 Configuration Example of Device Using F2MC-8FX CPU


CHAPTER 1 OUTLINE AND CONFIGURATION EXAMPLE OF F2MC-8FX CPU

This chapter explains the F2MC-8FX CPU memory space.
2.1 CPU Memory Space
2.2 Memory Space and Addressing

2.1 CPU Memory Space
All of the data, program, and I/O areas managed by the F2MC-8FX CPU are assigned to
the 64 Kbyte memory space of the F2MC-8FX CPU. The CPU can access each resource by indicating its address on the 16-bit address bus.
Figure 2.1-1 shows the address configuration of the F2MC-8FX memory space.
The I/O area is located close to the least significant address, and the data area is arranged right above it. The data area can be divided into the register bank, stack and direct areas for each application. In contrast to the I/O area, the program area is located close to the most significant address. The reset, interrupt reset vector and vector call instruction tables are arranged in the highest part.
Figure 2.1-1 F2MC-8FX Memory Space
I/O
0000 H
Program area · Data area

2.2 Memory Space and Addressing
In addressing by the F2MC-8FX CPU, the applicable addressing mode related to memory access may change according to the address. Therefore, the use of the proper addressing mode increases the code efficiency of instructions.
The F2MC-8FX CPU has the following addressing modes related to memory access. ([ ] indicates one byte):
80H to FFH are mapped to 0080H to 047FH by setting of direct bank pointer (DP).
[Structure] [← OP code →] [← lower 8 bits →] ([← if operand available →]
[Structure] [← OP code →] [← upper 8 bits →] [← lower 8 bits →]
address 00H to 7FH are always 0000H to 007FH. The accesses of operand address
80H to FFH are mapped to 0080H to 047FH by setting of direct bank pointer (DP).
The bit positions are included in the OP code.
use the result as the address.
[Structure] [← OP code →] [← 8 offset bits →] ([← if operand available →])
[Structure] [← OP code →]
[Structure] [← OP code →] [← Immediate data →]
mode is used during the execution of the relative jump and bit check instructions.
Figure 2.2-1 shows the memory space accessible by each addressing mode.

Figure 2.2-1 Memory Space and Addressing

: Direct addressing : Extended addressing : Bit direct addressing : Index addressing : Pointer addressing : General-purpose register addressing : Immediate addressing : Vector addressing : Relative addressing

2.2.1 Data Area
The general-purpose register bank area in the F2MC-8FX CPU is assigned to 0100H to 01FFH. The general-
purpose register numbers are converted to the actual addresses according to the conversion rule shown in Figure 2.2-2 by using the register bank pointer (RP) and the lower 3 bits of the OP code.
Figure 2.2-2 Conversion Rule for Actual Addresses of General-purpose Register Bank Area
Lower bits of OP code
"0" "1"
R4 R3 R2 R1 R0 b2 b1 b0
A15 A14 A13 A12A11A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
The stack area in the F2MC-8FX CPU is used as the saving area for return addresses and dedicated registers when the subroutine call instruction is executed and when an interrupt occurs. Before pushing data into the stack area, decrease the contents of the 16-bit stack pointer (SP) by 2 and then write the data to be saved to the address indicated by the SP. To pop data off the stack area, return data from the address indicated by the SP and then increase the contents of the SP by 2. This shows that the most recently pushed data in the stack is stored at the address indicated by the SP. Figure 2.2-3 and Figure 2.2-4 give examples of saving data in the stack area and returning data from it.
Transaction address

Figure 2.2-3 Example of Saving Data in Stack Area

Figure 2.2-4 Example of Returning Data from Stack Area

The direct area in the F2MC-8FX CPU is located at the lower side of the memory space or the 1152 bytes from 0000H to 047FH and is mainly accessed by direct addressing and bit direct addressing. The area that
can be used at a time by direct addressing and bit direct addressing is 256 bytes. 128 bytes of 0000H to
007FH can be used at any time as a direct area. 0080H to 047FH is a direct bank of 128 bytes × 8 and can
use one direct bank as a direct area by setting the direct bank pointer (DP). Conversion from the operand address of direct addressing and bit direct addressing to the real address is done by the conversion rule shown in Table 2.2-1 by using DP.
Access to it is obtained by the 2-byte instruction.
The I/O control registers and part of RAM that are frequently accessed are arranged in this direct area.
Table 2.2-1 Conversion Rule for Actual Address of Direct Addressing and Bit Direct

00H to 7FH 0000H to 007FH
Addressing

2.2.2 Program Area
FFC0H to FFCFH of the memory space is used as the vector call instruction table. The vector call
instruction for the F2MC-8FX CPU provides access to this area according to the vector numbers included in the OP code and makes a subroutine call using the data written there as the jump address. Table 2.2-2 indicates the correspondence of the vector numbers with the jump address table.
Table 2.2-2 CALLV Jump Address Table
CALLV Jump address table
#k Upper address Lower address
#1 FFC2 H FFC3 H
#2 FFC4 H FFC5 H
#3 FFC6 H FFC7 H
#4 FFC8 H FFC9 H
#5 FFCA H FFCB H
#6 FFCC H FFCD H
#7 FFCE H FFCF H
FFCCH to FFFFH of the memory space is used as the table indicating the starting address of an interrupt or
reset Table 2.2-3 indicates the correspondence between the interrupt numbers or resets and the reference table.

Table 2.2-3 Reset and Interrupt Vector Table
Interrupt No. Table address Interrupt No. Table address
Upper data Lower data Upper data Lower data
Reset FFFEH FFFFH #11 FFE4H FFE5H
FFFCH FFFDH #12 FFE2H FFE3H
#0 FFFAH FFFBH #13 FFE0H FFE1H
#1 FFF8H FFF9H #14 FFDEH FFDFH
#2 FFF6H FFF7H #15 FFDCH FFDDH
#3 FFF4H FFF5H #16 FFDAH FFDBH
#4 FFF2H FFF3H #17 FFD8H FFD9H
#5 FFF0H FFF1H #18 FFD6H FFD7H
#6 FFFEH FFFFH #19 FFD4H FFD5H
#7 FFECH FFFDH #20 FFD2H FFD3H
#8 FFEAH FFFBH #21 FFD0H FFD1H
#9 FFE8H FFF9H #22 FFCEH FFCFH
#10 FFE6H FFE7H #23 FFCCH FFCDH
Use the interrupt number #22 and #23 exclusively for vector call instruction, CALLV #6 and CALLV #7

2.2.3 Arrangement of 16-bit Data in Memory Space
The F2MC-8FX CPU can perform 16-bit data transfer and arithmetic operation though it is an 8-bit CPU. Arrangement of 16-bit data in the memory space is shown below.
As shown in Figure 2.2-5, the F2MC-8FX CPU treats 16-bit data in the memory as upper data if it is written at the first location having a lower address and as lower data if it is written at the next location after that.
Figure 2.2-5 Arrangement of 16-bit Data in Memory
Before execution MEMORY MEMORY After execution
ABCF H ABCF H
ABCE H 34 H ABCE H
A A 1234 H 1234 H
ABCD H 12 H ABCD H
ABCC H ABCC H
As when 16 bits are specified by the operand during the execution of an instruction, bytes are assumed to be upper and lower in the order of their proximity to the OP code. This applies when the operand indicates the memory address and 16-bit immediate data as shown in Figure 2.2-6.
Figure 2.2-6 Arrangement of 16-bit Data during Instruction Execution
:.
MOV A, 5678H ; Extended address MOVWA, #1234H ; 16-bit immediate data
:.
:. XXXXH XX XX ; Extended address XXXXH 60 56 78 ; 16-bit immediate data XXXXH E4 12 34 XXXXH XX
:.
The same may also apply to data saved in the stack by interrupts.
[Example] · Assembled


This chapter explains the F2MC-8FX dedicated registers and general-purpose registers.
3.1 F2MC-8FX Registers
3.2 Program Counter (PC) and Stack Pointer (SP)
3.3 Accumulator (A) and Temporary Accumulator (T)
3.4 Program Status (PS)
3.5 Index Register (IX) and Extra Pointer (EP)
3.6 Register Banks
3.7 Direct Banks

3.1 F 2 MC-8FX Registers
In the F2MC-8FX series, there are two types of registers: dedicated registers in the CPU, and general-purpose registers in memory.
The dedicated register exists in the CPU as a dedicated hardware resource whose application is restricted to the CPU architecture.
The dedicated register is composed of seven types of 16-bit registers. Some of these registers can be operated with only the lower 8 bits.
Figure 3.1-1 shows the configuration of seven dedicated registers.
Figure 3.1-1 Configuration of Dedicated Registers
SP
DP
Program status: stores register bank pointers, direct bank pointer and condition codes CCR: IL1, 0 = 11 Other flags = 0 RP : 00000 DP : 000
The general-purpose register is as follows:
Initial value · 16 bits

3.2 Program Counter (PC) and Stack Pointer (SP)
The program counter (PC) and stack pointer (SP) are application-specific registers existing in the CPU. The program counter (PC) indicates the address of the location at which the instruction currently being executed is stored. The stack pointer (SP) holds the addresses of the data location to be referenced by the interrupt and stack push/pop instructions. The value of the current stack pointer (SP) indicates the address at which the last data pushed onto the stack is stored.
Figure 3.2-1 shows the operation of the program counter (PC).
Figure 3.2-1 Program Counter Operation

Figure 3.2-2 shows the operation of the stack pointer (SP).
Figure 3.2-2 Stack Pointer Operation


3.3 Accumulator (A) and Temporary Accumulator (T)
The accumulator (A) and temporary accumulator (T) are application-specific registers existing in the CPU. The accumulator (A) is used as the area where the results of operations are temporarily stored. The temporary accumulator (T) is used as the area where the old data is temporarily saved for data transfer to the accumulator (A) or the operand for operations.
For 16-bit operation all 16 bits are used as shown in Figure 3.3-1. For 8-bit operation only the lower 8 bits are used as shown in Figure 3.3-2.
Figure 3.3-1 Accumulator (A) Operation (16-bit Operation)

Figure 3.3-2 Accumulator (A) Operation (8-bit Operation)

When 16-bit data is transferred to the accumulator (A), all the old 16-bit data in the accumulator is transferred to the temporary accumulator (T) as shown in Figure 3.3-3. When 8-bit data is transferred to the accumulator, old 8-bit data stored in the lower 8 bits of the accumulator is transferred to the lower 8 bits of the temporary accumulator as shown in Figure 3.3-4. Although all 16-bits are used as the operand for 16-bit operations as shown in Figure 3.3-5, only the lower 8 bits are used for 8-bit operations as shown in Figure 3.3-6.

Figure 3.3-3 Data Transfer between Accumulator (A) and Temporary Accumulator (T) (16-bit Transfer)

Figure 3.3-4 Data Transfer between Accumulator (A) and Temporary Accumulator (T) (8-bit Transfer)

Figure 3.3-5 Operations between Accumulator (A) and Temporary Accumulator (T) (16-bit Operations)

Figure 3.3-6 Operations between Accumulator (A) and Temporary Accumulator (T) (8-bit Operations)


3.3.1 How To Use The Temporary Accumulator (T)
The F2MC-8FX CPU has a special-purpose register called a temporary accumulator. This section described the operation of this register.
The F2MC-8FX CPU has various binary operation instructions, some data transfer instructions and the temporary accumulator (T) for 16-bit data operation. Although there is no instruction for direct data transfer to the temporary accumulator, the value of the original accumulator is transferred to the temporary accumulator before executing the instruction for data transfer to the accumulator. Therefore, to perform operations between the accumulator and temporary accumulator, execute operations after carrying out the instruction for data transfer to the accumulator twice. Since data is not automatically transferred by all instructions to the temporary accumulator, see the columns of TL and TH in the instruction list for details of actual data transfer instructions. An example of addition with carry of 16-bit data stored at addresses 1280H and 0042H is shown below.
MOVW A, 0042H - MOVW A, 1280H - ADDCW A -
Figure 3.3-7 shows the operation for the accumulator and temporary accumulator when the above example is executed.
Figure 3.3-7 Operation of Accumulator (A) and Temporary Accumulator (T) in Word Data Processing


3.3.2 Byte Data Transfer and Operation of Accumulator (A) and Temporary Accumulator (T)
When data transfer to the accumulator (A) is performed byte-by-byte, the transfer data is stored in the AL. Automatic data transfer to the temporary accumulator (T) is also performed byte-by-byte and only the contents of the original AL are stored in the TL. Neither the upper 8 bits of the accumulator nor the temporary accumulator are affected by the transfer. Only the lower 8 bits are used for byte operation between the accumulator and temporary accumulator. None of the upper 8 bits of the accumulator or temporary accumulator are affected by the operation.
An example of addition with carry of 8-bit data stored at addresses 1280H and 0042H is shown below.
MOV A, 0042H - MOV A, 1280H - ADDC A -
Figure 3.3-8 shows the operation of the accumulator and temporary accumulator when the above example is executed.
Figure 3.3-8 Operation of Accumulator and Temporary Accumulator in Byte Data Processing

*1 The TH does not change when there is automatic data transfer to the temporary accumulator.
*2 The AH is not changed by the result of the addition of the AL, TL, and CF.

The temporary accumulator (T) is basically temporary storage for the accumulator (A). Therefore, data from the temporary accumulator cannot be transferred directly to memory. However, as an exception, using the accumulator as a pointer enabling saving of the contents of the temporary accumulator in memory. An example of this case is shown below.
Figure 3.3-9 Direct Data Transfer from Temporary Accumulator (T)
[Example] MOVW @A, T
T T
CDEF H CDEF H
RAM RAM
1235 H
XX H
1235 H
EF H
1234 H
XX H
1234 H
CD H

3.4 Program Status (PS)
The program status (PS) is a 16-bit application-specific register existing in the CPU. In upper byte of program status (PS), the upper 5-bit is the register bank pointer (RP) and lower 3-bit is the direct bank pointer (DP). The lower byte of program status (PS) is the condition code register (CCR). The upper byte of program status (PS), i.e. RP and DP, is mapped to address 0078H. So it is possible to make read and write accesses to
them by an access to address 0078H.
Figure 3.4-1 shows the structure of the program status.
The register bank pointer (RP) indicates the address of the register bank currently in use. The relationship between the contents of the register bank pointer and actual addresses is as shown in Figure 3.4-2.
DP shows the memory area (direct bank) used for direct addressing and bit direct addressing. Conversion from the operand address of direct addressing and bit direct addressing to the real address follows the conversion rule shown in Table 3.4-1 by using DP.
The condition code register (CCR) has bits for indicating the result of operations and the content of transfer data and bits for controlling the operation of the CPU in the event of an interrupt.
Figure 3.4-1 Structure of Program Status (PS)
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
IL0, 1 DP
H I N Z V C
RP
DP CCR
Figure 3.4-2 Conversion Rule for Actual Address of General-purpose Register Area
Lower bits of OP code
"0" "1"
R4 R3 R2 R1 R0 b2 b1 b0
A15 A14 A13 A12 A11 A10 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0
Transaction address

Table 3.4-1 Conversion Rule for Actual Address of Direct Addressing and Bit Direct Addressing
Operand address Direct bank pointer (DP) Actual address
00H to 7FH 0000H to 007FH
000 0080H to 00FFH
001 0100H to 017FH
010 0180H to 01FFH
011 0200H to 027FH
80H to FFH
100 0280H to 02FFH
101 0300H to 037FH
110 0380H to 03FFH
111 0400H to 047FH
The program status flags are explained below.
This flag is 1 if a carry from bit 3 to bit 4 or a borrow from bit 4 to bit 3 is generated as the result of an operation, and it is 0 in other cases. Because it is used for decimal compensation instructions, it cannot be guaranteed if it is used for applications other than addition or subtraction.
An interrupt is enabled when this flag is 1 and is disabled when it is 0. It is set to 0 at reset which results in the interrupt disabled state.
These bits indicate the level of the currently-enabled interrupt. The interrupt is processed only when an interrupt request with a value less than that indicated by these bits is issued.
IL1 IL0 Interrupt level High and low
0 0 0 Highest
This flag is 1 when the most significant bit is 1 and is 0 when it is 0 as the result of an operation.
This flag is 1 when the most significant bit is 0 and is 0 in other cases as the result of an operation.
Lowest

This flag is 1 when a two’s complement overflow occurs and is 0 when one does not as the result of an operation.
This flag is 1 when a carry or a borrow, from bit 7 in byte mode and from bit 15 in word mode, is generated as the result of an operation but 0 in other cases. The shifted-out value is provided by the shift instruction.
The upper byte of program status (PS), i.e. register bank pointer (RP) and direct bank pointer (DP), is mapped to address 0078H. So it is possible to make read and write accesses to them by an access to address 0078H, besides using instructions that have access to PS (MOVW A, PS or MOVW PS, A).

3.5 Index Register (IX) and Extra Pointer (EP)
The index register (IX) and extra pointer (EP) are 16-bit application-specific registers existing in the CPU. The index register (IX) adds an 8-bit offset value with its sign to generate the address stored by the operand. The extra pointer (EP) indicates the address stored by the operand.
Figure 3.5-1 indicates the operation of the index register.
Figure 3.5-1 Operation of Index Register (IX)

34H 34H IX IX 12H 12H
MOVW A, @IX+55H 5678H+0055H = 56CDH +
Figure 3.5-2 shows the operation of the extra pointer.
Figure 3.5-2 Operation of the Extra Pointer (EP)


3.6 Register Banks
The register bank register is an 8-bit general-purpose register existing in memory. There are eight registers per bank of which there can be 32 altogether. The current bank is indicated by the register bank pointer (RP).
Figure 3.6-1 shows the configuration of the register bank.
Figure 3.6-1 Configuration of Register Bank
Address = 0100H + 8 * (RP)
R1
R2
R3
R4
R5
R6
R7
Maximum of 32 banks
Memory area

3.7 Direct Banks
The direct bank is in 0080H to 047FH of direct area, and composed of 128 bytes × 8
banks. The access that uses direct addressing and bit direct addressing in operand address 80H to FFH can be extended to 8 direct banks according to the value of the
direct bank pointer (DP). The current bank is indicated by the direct bank pointer (DP).
Figure 3.7-1 shows the configuration of a direct bank.
The access that uses direct addressing and bit direct addressing in operand address 80H to FFH can be
extended to 8 direct banks according to the value of the direct bank pointer (DP). The access that uses direct addressing and bit direct addressing in operand address 00H to 7FH is not affected by the value of the
direct bank pointer (DP). This access is directed to fixed direct area 0000H to 007FH.
Figure 3.7-1 Configuration of Direct Bank
(DP=111)
and Operand address in bit direct addressing
017FH 0100H 00FFH 0080H 007FH 0000H
FF H 80 H 7F H 00 H
(DP=000)

F2MC-8FX interrupt processing.
4.1 Outline of Interrupt Operation
4.2 Interrupt Enable/Disable and Interrupt Priority Functions
4.3 Creating an Interrupt Processing Program
4.4 Multiple Interrupt
4.5 Reset Operation

4.1 Outline of Interrupt Operation
In the F2MC-8FX series, interrupts are transferred and processed according to the following procedure:

Figure 4.1-1 shows the flow diagram of F2MC-8FX interrupt operation.
Figure 4.1-1 Outline of F2MC-8FX Interrupt Operation
Interrupt request enable bit

4.2 Interrupt Enable/Disable and Interrupt Priority Functions
This is a function to enable/disable a request at the interrupt source. If interrupt enable flags in resources are enabled, interrupt request signals are sent from resources to the interrupt controller. This function is used for controlling the presence or absence of an interrupt, resource-by-resource. It is very useful because when software is described for each resource operation, interrupts in another resource do not need to be checked for whether they are enabled or disabled.
This function determines the interrupt level. The interrupt levels corresponding to interrupts generated in resources are compared with the IL bit in the CPU. If the value is less than the IL bit, a decision is made to issue an interrupt request. This function is able to assign priorities if there are two or more interrupts.
The I flag enables or disables the entire interrupt. If an interrupt request is issued and the I flag in the CPU is set to interrupt enable, the CPU temporarily suspends the flow of instruction execution to process interrupts. This function is able to temporarily disable the entire interrupt.
As shown in Figure 4.2-1, interrupts generated in resources are converted by the corresponding interrupt level registers in the interrupt controller into the values set by software and then transferred to the CPU.
The interrupt level is defined as high if its numerical value is lower, and low if it is higher.

Figure 4.2-1 Relationship between Interrupt Request and Interrupt Level in Resources


4.3 Creating an Interrupt Processing Program
In the F2MC-8FX series, basically, interrupt requests from resources are issued by hardware and cleared by software.
The interrupt processing control flow is as follows:
The numbers in the figure correspond to the numbers above.
Figure 4.3-1 Interrupt Processing Flow
Interrupt processing program
Set he interrupt level to the IL bit.
Main program
Clear the interrupt source: To accept a multiple interrupts from the same resource.
Initialize the resource.
→Prevent multiple
Set the interrupt request from the resource in hardware and issue an interrupt request.
interrupts of the same level.
Interrupt processing program: Transfer the actual processing data.
Release the interrupt from the interrupt processing.
The time to transfer control to the interrupt processing routine after the occurrence of an interrupt 3 in Figure 4.3-1) is 9 instruction cycles. An interrupt can only be processed in the last cycle of each instruction. The time shown in Figure 4.3-2 is required to transfer control to the interrupt processing routine after an interrupt occurs.
The longest cycle (17 + 9 = 26 instruction cycles) is required when an interrupt request is issued immediately after starting the execution of the DIVU instruction.

Figure 4.3-2 Interrupt Response Time
CPU operation Interrupt handling Normal instruction execution
Interrupt wait time Sample wait (a)
9 instruction cycles (b)
Indicates the last instruction cycle in which an interrupt is sampled.
Interrupt processing program · Interrupt request issued

4.4 Multiple Interrupt
The F2MC-8FX CPU can have a maximum of four levels as maskable interrupts. These can be used to assign priorities to interrupts from resources.
A specific example is given below.
START MOV ADIL, #2 Set the interrupt level of the A/D converter to 2.
MOV TMIL, #1 Set the interrupt level of the timer to 1. ADIL and TMIL are IL bits in the interrupt controller.
CALL STAD Start the A/D converter.
CALL STTM Start the timer.
When the above program is started, interrupts are generated from the A/D converter and timer after an elapsed time. In this case, when the timer interrupt occurs while processing the A/D converter interrupt, it will be processed through the sequence shown in Figure 4.4-1.
Figure 4.4-1 Example of Multiple Interrupt
A/D converter interrupt processing
Process the timer interrupt.
IL=2 IL=1 Timer interrupt occurs. Suspended
Initialize the resource.
The A/D converter interrupt occurs.
Process the timer interrupt.
Release the timer interrupt.
Process the A/D converter interrupt.
The main program is resumed.
Release the timer interrupt.
When starting processing of an A/D converter interrupt, the IL bit in the PS register of the CPU is automatically the same as the value of request (2 here). Therefore, when a level 1 or 0 interrupt request is issued during the processing of an A/D converter interrupt, the processing proceeds without disabling the A/D converter interrupt request. When temporarily disabling interrupts lower in priority than this interrupt during A/D converter interrupt processing, disable the I flag in the PS register of the CPU for the interrupts or set the IL bit to 0.
When control is returned to the interrupted routine by the release instruction after completion of each interrupt processing routine, the PS register is set to the value saved in the stack. Consequently, the IL bit takes on the value before interruption.
For actual coding, refer to the Hardware Manual for each device to check the addresses of the interrupt controller and each resource and the interrupts to be supported.

4.5 Reset Operation
In the F2MC-8FX series, when a reset occurs, the flag of program status is 0 and the IL bit is set to 11. When cleared, the reset operation is executed from the starting address written to set vectors (FFFEH, FFFFH).
A reset affects:
Refer to the manual for each product for details of the value and operation of each register for special reset conditions.


ARCHITECTURE
This chapter explains the instructions for the F2MC-8FX CPU.
5.1 Types of Addressing Modes
5.2 Special Instructions

5.1 Types of Addressing Modes
This addressing mode, indicated as "dir" in the instruction list, is used to access the direct area from 0000H to 047FH. In this addressing, when the operand address is 00H to 7FH, it accesses 0000H to 007FH.
Moreover, when the operand address is 80H to FFH, the access is good to 0080H to 047FH at the mapping
by direct bank pointer DP setting.
[Example] MOV 92H,A
0112H 45H 45H A 001B DP
This addressing mode, indicated as "ext" in the instruction list, is used to access the entire 64-Kbyte area. In this addressing mode, the upper byte is specified by the first operand and the lower byte by the second operand.
This addressing mode, indicated as "dir:b" in the instruction list, is used for bit-by-bit access of the direct area from 0000H to 047FH. In this addressing, when the operand address is 00H to 7FH, it accesses 0000H to 007FH. Moreover, when the operand address is 80H to FFH, the access is good to 0080H to 047FH at the
mapping by direct bank pointer DP setting. The position of the bit in the specified address is specified by the value for the instruction code of three subordinate position bits.
7 6 5 4 3 2 1 0 [Example]
0034H X 1 X X B

This addressing mode, indicated as "@IX+off" in the instruction list, is used to access the entire 64-Kbyte area. In this addressing mode, the contents of the first operand are sign-extended and then added to the index register (IX). The result is used as the address.

This addressing mode, indicated as "@EP" in the instruction list, is used to access the entire 64-Kbyte area. In this addressing mode, the contents of the extra pointer (EP) are used as the address.

This addressing mode, indicated as "Ri" in the instruction list, is used to access the register bank area. In this addressing mode, one upper byte of the address is set to 01 and one lower byte is created from the contents of the register bank pointer (RP) and the 3 lower bits of the instruction to access this address.

01010B 0152H ABH ABH A
This addressing mode, indicated as "#imm" in the instruction list, is used for acquiring the immediate data. In this addressing mode, the operand is used directly as the immediate data. The byte or word is specified by the instruction code.


This addressing mode, indicated as "#k" in the instruction list, is used for branching to the subroutine address registered in the table. In this addressing mode, the information about #k is contained in the instruction code and the table addresses listed in Table 5.1-1 are created.
Table 5.1-1 Jump Address Table
#k Address table (upper jump address: lower jump address)
1 FFC2 H :FFC3 H
2 FFC4 H :FFC5 H
3 FFC6 H :FFC7 H
4 FFC8 H :FFC9 H
5 FFCA H :FFCB H
6 FFCC H :FFCD H
7 FFCE H :FFCF H
FFCA H
FE H
DC H FEDC H PC
FFCB H
This addressing mode, indicated as "rel" in the instruction list, is used for branching to the 128-byte area across the program counter (PC). In this addressing mode, the contents of the operand are added with their sign, to the program counter. The result is stored in the program counter.
[Example] BNE +FEH
9ABCH 9ABCH + FFFEH 9ABAH
{ Old PC New PC
In this example, the program jumps to the address where the instruction code BNE is stored, resulting in an infinite loop.
This addressing mode, which has no operand in the instruction list, is used for operations to be determined by the instruction code. In this addressing mode, the operation varies for every instruction.
Old PC New PC
[Example] CALLV #5 · (Conversion) · [Example] NOP

5.2 Special Instructions
This instruction is used for branching to an address where the contents of the accumulator (A) are used. The contents of one of the N jump addresses arranged in table form is selected and transferred to the accumulator. Executing this instruction enables the N-branch processing.
1234H XXXXH New PC Old PC
This instruction is used for performing the opposite operation to JMP @A. In other words, it stores, the contents of the program counter (PC) in the accumulator (A). When this instruction is executed in the main routine and a specific subroutine is to be called, make sure that the contents of the accumulator are the specified value in the subroutine, that is the branch is from the expected section, enabling a decision on crash.
[Example] MOVW A, PC
XXXX H
1234 H
New PC Old PC
1234 H
When this instruction is executed, the contents of the accumulator are the same as those of the address where the code for the next instruction is stored and not the address where the code for this instruction is stored. The above example shows that the value 1234H stored in the accumulator agrees with that of the
address where the instruction code next to MOVW A, PC is stored.
[Example] JMP @A

This instruction is used for multiplying 8 bits of the AL by 8 bits of the TL without a sign and stores the 16- bit result in the accumulator (A). The contents of the temporary accumulator (T) do not change. In the operation, the original contents of the AH and TH are not used. Since the flag does not change, attention must be paid to the result of multiplication when branching accordingly.

This instruction is used for dividing 16 bits of the temporary accumulator (T) by 16 bits of the A without a sign and stores the results as 16 bits in the A and the remainder as 16 bits in the T. When A is 0000H, Z flag
is 1 as 0 division. At this time, the operation result is not guaranteed.

This instruction is used for exchanging the contents of the accumulator (A) for those of the program counter (PC). As a result, the program branches to the address indicated by the contents of the original accumulator and the contents of the current accumulator become the value of the address next to the one where the instruction code XCHW A, PC is stored. This instruction is provided especially for specifying tables using the main routine and for subroutines to use them.

When this instruction is executed, the contents of the accumulator are the same as those of the address where the code for the next instruction is stored and not the address where the code for this instruction is stored. The above example shows that the value of the accumulator 1235H agrees with that of the address
where the instruction code next to XCHW A, PC is stored. Consequently, 1235H not 1234H is indicated.

Figure 5.2-1 Example of Using XCHW A, PC
PUTSUB XCHW A, EP
PUSHW A
PTS1 MOV A, @EP
DB 'PUT OUT DATA', EOL
INCW EP
MOVW A, #1234 H
MOV IO, A
Output table data here.
BNE PTS1
POPW A
XCHW A, EP
JMP @A
This instruction is used for branching to a subroutine address registered in the table. In this addressing mode, the information about #k is included in the instruction code and the tale addresses listed in Table 5.2- 1 are created. After saving the contents of the current program counter (PC) in the stack, the program branches to the address in the table. Because it is a 1-byte instruction, using it for frequently-used subroutines reduces the size of the entire program.
Table 5.2-1 Jump Address Table
#k Address table (upper jump address : lower jump address)
1 FFC2 H :FFC3 H
2 FFC4 H :FFC5 H
3 FFC6 H :FFC7 H
4 FFC8 H :FFC9 H
5 FFCA H :FFCB H
6 FFCC H :FFCD H
7 FFCE H :FFCF H
[Main routine] · [Subroutine]

Before execution After execution [Example] CALLV #3
PC PC
5678 H
SP (- 2 ) SP
1234 H
DC H DC H
FFC7 H
1234 H
FE H FE H
FFC6 H
1233 H
XX H
1233 H
79 H
1232 H
XX H
1232 H
56 H

FOR EXECUTION
INSTRUCTIONS
This chapter explains each execution instruction, used in the assembler, in reference format. All execution insurrections are described in alphabetical order.
For information about the outline of each item and the meaning of symbols (abbreviations) explained for each execution instruction, see "CHAPTER 5 CPU SOFTWARE ARCHITECTURE".

6.1 ADDC (ADD Byte Data of Accumulator and Temporary Accumulator with Carry to Accumulator)
Add the byte data of TL to that of AL, add a carry to the LSB and then return the results to AL. The contents of AH are not changed.
(AL) ← (AL) + (TL) + (C) (Byte addition with carry)
+
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.

Memory FFFFH Memory FFFFH
SP
SP
PS
PS
1 0 1 0
0
Byte · Byte

6.2 ADDC (ADD Byte Data of Accumulator and Memory with Carry to Accumulator)
Add the byte data of EA memory (memory expressed in each type of addressing) to that of AL, add a carry to the LSB and then return the results to AL. The contents of AH are not changed.
(AL) ← (AL) + (EA) + (C) (Byte addition with carry)
+
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.
Table 6.2-1 Number of Execution Cycles / Byte Count / OP Code
EA #d8 dir @IX+off @EP Ri
Number of execution cycles
2 3 3 2 2
OP code 24 25 26 27 28 to 2F

Memory FFFFH Memory FFFFH
SP
PS
0 1 0 0
0

6.3 ADDCW (ADD Word Data of Accumulator and Temporary Accumulator with Carry to Accumulator)
Add the word data of T to that of A, add a carry to the LSB and then return the results to A.
(A) ← (A) + (T) + (C) (Word addition with carry)
+
N: Set to 1 if the MSB of A is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0000H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.

Execution example : ADDCW A
Memory FFFFH Memory FFFFH
S P
S P
P S
P S
0 1 0 0
0
(Before execution) (After execution)

Carry out the logical AND on the byte data of AL and TL for every bit and return the result to AL. The byte data of AH is not changed.
(AL) ← (AL) ^ (TL) (Byte AND)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Always set to 0
C: Not changed

Memory FFFFH Memory FFFFH
SP
PS
0
0

Carry out the logical AND on the byte data of AL and EA memory (memory expressed in each type of addressing) for every bit and return the result to AL. The byte data of AH is not changed.
(AL) ← (AL) ^ (EA) (Byte AND)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Always set to 0
C: Not changed
Table 6.5-1 Number of Execution Cycles / Byte Count / OP Code
EA #d8 dir @IX+off @EP Ri
Number of execution cycles 2 3 3 2 2
OP code 64 65 66 67 68 to 6F

Memory FFFFH Memory FFFFH
SP
PS
PS
0 0 1 0
0

Carry out the logical AND on the word data of A and T for every bit and return the results to A.
(A) ← (A) ^ (T) (Word AND)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of A is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0000H and set to 0 in other cases.
V: Always set to 0
C: Not changed

Memory FFFFH Memory FFFFH
SP
PS
PS
0
0

Branch when the value of bit b in dir memory is 0. Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
BBC dir:b, rel
- + - -
N: Not changed
Z: Set to 1 when the value of dir:b is 0 and set to 0 when it is 1.
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
B0 E800 H
E7FE H
SP
SP
E8 00 E7 FE XXXX XXX0 0084 H
XXXX XXX0 0084 H
PS
0
0 0 0 1
bit0 · bit0

Branch when the value of bit b in dir memory is 1. Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
BBS dir:b, rel
- + - -
N: Not changed
Z: Set to 1 when the value of dir:b is 0 and set to 0 when it is 1.
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
B0 E800 H
E7FE H
SP
SP
E8 00 E7 FE XXXX XXX1 0084 H
XXXX XXX1 0084 H
PS
PS
0
0
bit0 · bit0

Execute the next instruction if the C-flag is 0 and the branch if it is 1. Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
BC rel/BLO rel

Memory FFFFH Memory FFFFH
SP
FE
SP
FE
E802 H F9
F802 H
F9
E8 02 E8 04
PS
PS
1 0 1 1
1 0 1 1

6.10 BGE (Branch Great or Equal: relative if larger than or equal to Zero)
Execute the next instruction if the logical exclusive-OR for the V and N flags is 1 and the branch if it is 0. Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
BGE rel

Memory FFFFH Memory FFFFH
SP
SP
F456 H F456 H FE
FE
F4 56 F4 58
PS
0 1 1 1
0 1 1 1

Execute the next instruction if the logical exclusive-OR for the V and N flags is 0 and the branch if it is 1. Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
BLT rel

Memory FFFFH Memory FFFFH
F458 H F458 H
SP
SP
F456 H F456 H FF
FF
F4 56 F4 5A
PS
PS
0 1 1 1
0 1 1 1

Execute the next instruction if the N-flag is 0 and the branch if it is 1. Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
BN rel

Memory FFFFH Memory FFFFH
SP
SP
FC 5F FC 63 FC5F H FC5F H
FB
FB
PS
PS
1 0 1 1
1 0 1 1

Execute the next instruction if the Z-flag is 1 and the branch if it is 0. Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
BNZ rel/BNE rel

Memory FFFFH Memory FFFFH
SP
FA
SP
FA
FC
FE1E H FE1E H FC
FE 1E FE 20
PS
PS
0 0 0 1
0 0 0 1

6.14 BNC (Branch relative if C = 0)/BHS (Branch if Higher or Same)
Execute the next instruction if the C-flag is 1 and the branch if it is 0 . Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
BNC rel/BHS rel

Memory FFFFH Memory FFFFH
E804 H E804 H
SP
SP
E802 H E802 H F8
F8
E8 02 E8 05
PS
1 0 1 1
1 0 1 1

Execute the next instruction if the N-flag is 1 and the branch if it is 0 . Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
BP rel

Memory FFFFH Memory FFFFH
SP
SP
FC5F H FC5F H FA
FA
FC 5F FC 61
PS
PS
1 1 1 0
1 1 1 0

Execute the next instruction if the Z-flag is 0 and the branch if it is 1 . Branch address corresponds to the value of addition between the PC value (word value) of the next instruction and the value with rel code-extended (word value).
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
BZ rel/BEQ rel

Memory FFFFH Memory FFFFH
FA
FA
FD
FE1E H
FD FE1E H
SP
SP
FE1A H
FE 1E FE 1A
PS
0 0 0 1
0 0 0 1

Branch to address of ext. Return to the instruction next to this one by using the RET instruction of the branch subroutine.
(SP) ← (SP) - 2 (Word subtraction), ((SP)) ← (PC) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
(PC) ← ext · CALL ext

Memory FFFFH Memory FFFFH
020A H
SP
02 OA 02 08
SP
F6
0208 H
F6 23 FC 00
PS
0
0

Branch to the vector address (VA) of vct. Return to the instruction next to this one by using the RET instruction of the branch subroutine. The vector address (VA) indicated by VCT is shown on the next page.
(SP) ← (SP) - 2 (Word subtraction), ((SP)) ← (PC) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
CALLV #vct

Memory FFFFH Memory FFFFH
02 EC00 H
EC
FFC4 H
0208 H
0208 H
SP
SP
E8
0206 H
E8 00
EC 00
PS
PS
0
0
Table 6.18-1 Call Storage Address of Vector Call Instruction
Instruction Lower address Upper address
FFCC H FFCD H CALL#6
FFCA H FFCB H CALL#5
FFC8 H FFC9 H CALL#4
FFC6 H FFC7 H CALL#3
FFC4 H FFC5 H CALL#2
FFC2 H FFC3 H CALL#1
FFC0 H FFC1 H CALL#0
vct · Vector address (VA)

Set the contents of 1 bit (indicated by 3 lower bits (b) of mnemonic) of the direct area to 0.
(dir:b) ← 0
CLRB dir:b
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
0084 H 0000 000X 0084 H 0000 0000
PS
0
0

Set the C-flag to 0.
CLRC
- - - R
R: Set to 0 by executing instruction
N: Not changed
Z: Not changed
V: Not changed
C: Set to 0.

Memory FFFFH Memory FFFFH
SP
PS
PS
0
0 1 0 0

Set the I-flag to 0.
CLRI
I N Z V C
R - - - -
R: Set to 0 by executing instruction
I: Set to 0
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
H I IL1 IL0 Z V C N
N
H I IL1 IL0 Z V C
PS
0 1 1 1 0 0 0 1
0 0 1 1 0 0 0 1

Compare the byte data of AL with that of TL and set the results to CCR. AL and TL are not changed.
CMP A
+
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.

Memory FFFFH Memory FFFFH
SP
PS
PS
0
1 1 0 0

Compare the byte data of AL with that of the EA memory (memory expressed in each type of addressing) and set the results to CCR. AL and EA memory are not changed.
CMP A, EA
+
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.
Table 6.23-1 Number of Execution Cycles / Byte Count / OP Code
EA #d8 dir @IX+off @EP Ri
Number of execution cycles
2 3 3 2 2
OP code 14 15 16 17 18 to 1F

Memory FFFFH Memory FFFFH
SP
SP
PS
0 1 0 0
1 1 0 0

Compare the byte data of EA memory (memory expressed in each type of addressing) with the immediate data and set the results to CCR. EA memory is not changed.
+
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.
Table 6.24-1 Number of Execution Cycles / Byte Count / OP Code
EA dir @IX+off @EP Ri
Number of execution cycles
4 4 3 3
OP code 95 96 97 98 to 9F
(EA) - d8 · CMP EA, #d8

Memory FFFFH Memory FFFFH
SP
PS
0 1 0 0
0

Compare the word data of A with that of T and set the results to CCR. A and T are not changed.
CMPW A
+
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0000H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.

Memory FFFFH Memory FFFFH
SP
PS
PS
1 0 0 0
1 1 1 0

When adding the correction value to AL by the state in the carry before execution of instruction and half-carry, decimal operation is corrected.
(AL) ← (AL) + 6 or 60H or 66H
(Add a correction value shown in the next page to AL and the value of AL according to the state of the C or H-flag.)
+
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Change as indicated on the next page.

Memory FFFFH Memory FFFFH
SP
SP
H I IL1 IL0 Z V C
N
H I IL1 IL0 Z V C
N
PS
PS
0 0 1 1 0
0 0 1 1 0
Table 6.26-1 Decimal Adjustment Table (DAA)
C-flag AL (bit7 to bit4)
H-flag AL (bit3 to bit0)
0 1 1 1
0 to 9 0 to 8 0 to 9 A to F
0 0 1 0 0 1 0 0 1
0 to 9 A to F
00 06 06 60 66 66 60 66 66
0 0 0 1
0 to 3 0 to 9 A to F
9 to F A to F
0 to 3 0 to 9 A to F
0 to 2 0 to 2 0 to 3
Table 6.26-2 Execution Example
Mnemonic AL C H
ADDC A, #25H 9A 0 0
DAA 00 1 0

Subtract the correction value from AL according to the state of the C or H-flag before executing instruction.
(AL) ← (AL) - 6 or 60H or 66H
(Subtract a correction value shown in the next page to AL and the value of AL according to the state of the C or H-flag.)
+
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Change as indicated on the next page.

Memory FFFFH Memory FFFFH
SP
SP
H I IL1 IL0 Z V C
N
H I IL1 IL0 Z V C
N
PS
1 0 1 1 0
1 0 1 1 0
Table 6.27-1 Decimal Adjustment Table (DAS)
0 1 0 1
0 1 1 0
00 66 06 60
0 1 0 1
Table 6.27-2 Execution Example
Mnemonic AL C H
SUBC A, #25H 4B 0 1
DAS 45 0 1

Decrement byte data of Ri by one.
(Ri) ← (Ri) - 1 (byte subtract)
+ + + -
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Not changed
DEC Ri

Memory FFFFH Memory FFFFH
FE 0112 H
R2
FD 0112 H
SP
SP
R1
R1
R0
0110 H
R0
0110 H
PS
0
1 0 0 0

Decrement word data of A by one.
(A) ← (A) - 1 (Word subtraction)
+ + - -
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0000H and set to 0 in other cases.
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
PS
0
0

Decrement word data of EP by one.
(EP) ← (EP) - 1 (Word subtraction)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
PS
PS
0
0

Decrement word data of IX by one.
(IX) ← (IX) - 1 (Word subtraction)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
PS
PS
0
0

Decrement word data of SP by one.
(SP) ← (SP) - 1 (Word subtraction)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
0
0

Divide the word data of T by that of AL as an unsigned binary value. Return the quotient to A and the remainder to T. When A is 0, the result is indefinite and Z flag is 1 to show 0 division.
Quotient (A) ← (T) / (A)
Remainder (T) ← (T) MOD (A)
- + - -
N: Not changed
Z: Set to 1 if A before execution of instruction is 0000H and set to 0 in other cases.
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
01 41 00 01
SP
PS
PS
0
0

Add 1 to byte data of Ri.
(Ri) ← (Ri) + 1 (Word addition)
+ + + -
N: Set to 1 if the MSB is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Not changed
INC Ri

Memory FFFFH Memory FFFFH
SP
R1
R1
R0
R0 0108 H 0108 H
PS
PS
0
0

Add 1 to word data of A.
(A) ← (A) +1 (Word addition)
+ + - -
N: Set to 1 if the MSB of A is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0000H and set to 0 in other cases.
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
12 33 12 34
SP
PS
0
0

Add 1 to word data of EP.
(EP) ← (EP) + 1 (Word addition)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
PS
PS
0
0

Add 1 to word data of IX.
(IX) ← (IX) + 1 (Word addition)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
25 72 25 73
SP
PS
PS
0
0

Add 1 to word data of SP.
(SP) ← (SP) + 1 (Word addition)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
FF FF 00 00
PS
PS
0
0

Transfer word data from A to PC.
(PC) ← (A) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
SP
XX XX F0 89
PS
1 0 0 0
1 0 0 0

Branch to the PC value indicated by ext.
(PC) ← ext (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
JMP ext

Memory FFFFH Memory FFFFH
SP
E6
SP
E6
D800 H 21
D800 H 21
D8 00 E6 54
PS
PS
0 1 1 1
0 1 1 1

6.41 MOV (MOVE Byte Data from Temporary Accumulator to Address Pointed by Accumulator)
Transfer byte data from T to memory indirectly addressed by A.
((A)) ← T (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
01 20 01 20
0120 H XX 0120 H 3F
SP
SP
PS
0

Transfer byte data from EA memory (memory expressed in each type of addressing) to A. Byte data in AL is transferred to TL. AH is not changed.
(AL) ← (EA) (Byte transfer)
+ + - -
N: Set to 1 if the MSB of transferred data is 1 and set to 0 in other cases.
Z: Set to 1 if transferred data is 00H and set to 0 in other cases.
V: Not changed
C: Not changed
Table 6.42-1 Number of Execution Cycles / Byte Count / OP Code
EA #d8 dir @IX+off ext @A @EP Ri
Number of execution cycles 2 3 3 4 2 2 2
OP code 04 05 06 60 92 07 08 to 0F

Memory FFFFH Memory FFFFH
11 22 11 51
SP
SP
PS
0
0

Transfer byte immediate data to EA memory (memory expressed in each type of addressing).
(EA) ← d8 (Byte transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
Table 6.43-1 Number of Execution Cycles / Byte Count / OP Code
EA dir @IX+off @EP Ri
Number of execution cycles 4 4 3 3
OP code 85 86 87 88 to 8F
MOV EA, #d8

Memory FFFFH Memory FFFFH
02 00 02 00
0202 H XX
(IX+2) (IX+2)
SP
SP
PS
PS
0
0

Transfer bytes (data from AL) immediate data to EA memory (memory expressed in each type of addressing).
(EA) ← (AL) (Byte transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
Table 6.44-1 Number of Execution Cycles / Byte Count / OP Code
EA dir @IX+off ext @EP Ri
Number of execution cycles 3 3 4 2 2
OP code 45 46 61 47 48 to 4F

Memory FFFFH Memory FFFFH
SP
SP
PS
PS
0
0

6.45 MOVW (MOVE Word Data from Temporary Accumulator to Address Pointed by Accumulator)
Transfer word data from T to memory indirectly addressed by A.
((A)) ← (T) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
FB AA
AA
SP
SP
FB
PS
PS
0
0

Transfer word data from EA and EA + 1 memories (EA is an address expressed in each type of addressing) to A. Word data in A is transferred to T.
(A) ← (EA) (Word transfer)
+ + - -
N: Set to 1 if MSB of transferred data is 1 and set to 0 in other cases.
Z: Set to 1 if transferred data is 0000H and set to 0 in other cases.
V: Not changed
C: Not changed
Table 6.46-1 Number of Execution Cycles / Byte Count / OP Code
EA #d16 dir @IX+off ext @A @EP
Number of execution cycles 3 4 4 5 3 3
OP code E4 C5 C6 C4 93 C7

Memory FFFFH Memory FFFFH
01 50 01 50
EF
EF
SP
SP
PS
0
1 0 0 0

Transfer word data from EP to A.
(A) ← (EP) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
SP
PS
0
0

Transfer word data from IX to A.
(A) ← (IX) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
87 23 87 23
SP
PS
0
0

Transfer word data from PS to A.
(A) ← (PS) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
SP
PS
78 18 78 18
1 0 0 0
1 0 0 0

Transfer word data from PC to A.
(A) ← (PC) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Execution example : MOVW A, PC
Memory FFFFH Memory FFFFH
S P
S P
F0 62 F0 62
P S
0
0
(Before execution) (After execution)

Transfer word data from SP to A.
(A) ← (SP) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
69 05 69 05
PS
0
0

Transfer word data from A to EA and EA + 1 memories (memory expressed in each type of addressing).
(EA) ← (A) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
Table 6.52-1 Number of Execution Cycles / Byte Count / OP Code
EA dir @IX+off ext @EP
Number of execution cycles 4 4 5 3
OP code D5 D6 D4 D7

Memory FFFFH Memory FFFFH
10 56 10 56
0094 H
SP
SP
0093 H
0093 H
PS
0
0

Transfer word data from A to EP.
(EP) ← (A) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
87 65 87 65
SP
XX XX 87 65 Byte Byte
1 0 0 0
1 0 0 0

Transfer word immediate data to EP.
(EP) ← d16 (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
MOVW EP, #d16

Memory FFFFH Memory FFFFH
SP
XX XX 23 45 Byte Byte
PS
0
0

Transfer word data from A to IX.
(IX) ← (A) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
56 43 56 43
SP
PS
PS
0
0

Transfer word immediate data to IX.
(IX) ← d16 (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
MOVW IX, #d16

Memory FFFFH Memory FFFFH
SP
SP
PS
0
0

Transfer word data from A to PS.
(PS) ← (A) (Word transfer)
+
N: Become the value for lower bit 3 of A
Z: Become the value for lower bit 2 of A
V: Become the value for lower bit 1 of A
C: Become the value for lower bit 0 of A

Execution example : MOVW PS, A
50 32 50 32
S P
P S X X X X
XX XX 50 3 2
P S 0 0 1 0
(Before execution)
(After execution)

Transfer word immediate data to SP.
(SP) ← d16 (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
MOVW SP, #d16

Execution example : MOVW SP, #6789H
Memory FFFFH Memory FFFFH
S P
XX 67 8 9
P S
P S
0
0
(Before execution) (After execution)

Transfer word data from A to SP.
(SP) ← (A) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Execution example : MOVW SP, A
Memory FFFFH Memory FFFFH
43 21 43 21
XX 4 3 21
S P
P S
0
0
(Before execution) (After execution)

Multiply the byte data of AL and TL as unsigned binary values. Return the results to the word data of A.
MULU A
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
XX 40 XX 40
SP
SP
PS
0
0

-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
N Z V C N Z V C
PS
PS

Carry out the logical OR on byte data of AL and TL for every bit and return the results to AL. The contents of AH are not changed.
(AL) ← (AL) ∨ (TL) (byte logical OR)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Always set to 0
C: Not changed

Memory FFFFH Memory FFFFH
15 23 15 63
SP
SP
PS
PS
0
0

Carry out the logical OR on AL and EA memory (memory expressed in each type of addressing) for every bit and return the results to AL. The contents of AH are not changed.
(AL) ← (AL)∨ (EA) (byte logical OR)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Always set to 0
C: Not changed
Table 6.63-1 Number of Execution Cycles / Byte Count / OP Code
EA #d8 dir @IX+off @EP Ri
Number of execution cycles 2 3 3 2 2
OP code 74 75 76 77 78 to 7F

Memory FFFFH Memory FFFFH
15 32 15 76
56 0122 H
SP
SP
PS
0
0

Carry out the logical OR on the word data of A and T for every bit and return the results to A.
(A) ← (A) ∨ (T) (word logical OR)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of A is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0000H and set to 0 in other cases.
V: Always set to 0
C: Not changed

Memory FFFFH Memory FFFFH
57 23 77 63
33 41 33 41
SP
PS
PS
0
0

Subtract 2 from the value of SP. Then, transfer the word value from the memory indicated by SP to dr.
(SP) ← (SP) - 2 (Word subtraction)
((SP)) ← (dr) (Word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
Table 6.65-1 Number of Execution Cycles / Byte Count / OP Code
Number of execution cycles 4 4
OP code 40 41
PUSHW dr

Memory FFFFH Memory FFFFH
0222 H
SP
SP
02 22 X
0220 H
PS
PS
0
0

Transfer the word value from the memory indicated by SP to dr. Then, add 2 to the value of SP.
(dr) ← ((SP)) (Word transfer)
(SP) ← (SP) + 2 (Word addition)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed
Table 6.66-1 Number of Execution Cycles / Byte Count / OP Code
Number of execution cycles 3 3
OP code 50 51
POPW dr

Memory FFFFH Memory FFFFH
SP
SP
0233 H
0233 H
PS
0
0
02 33 26

Return the contents of PC saved in the stack. When this instruction is used in combination with the CALLV or CALL instruction, return to the next instruction to each of them.
(PC) ← ((SP)) (Word transfer)
(SP) ← (SP) + 2 (Word addition)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

Memory FFFFH Memory FFFFH
SP
SP
FC
0206 H
FC FC 10 0206 H
F8 09
PS
PS
0
0
02 06 10

Return the contents of PS and PC saved in the stack. Return PS and PC to the state before interrupt.
(PS) ← ((SP)), (PC) ← ((SP + 2)) (Word transfer)
(SP) ← (SP) + 4 (Word addition)
+
N: Become to the saved value of N.
Z: Become to the saved value of Z.
V: Become to the saved value of V.
C: Become to the saved value of C.

Execution example : RETI
Memory FFFFH Memory FFFFH
FC
FC
020 8 H
S P
S P
02 OA
0206 H
FC 10 0206 H
P S
XX XB 0 8 8 4
1 1 1 0
0 0 0 1
(Before execution) (After execution)

Shift byte data of AL with a carry one bit to the left. The contents of AH are not changed.
ROLC A
+ + - +
N: Set to 1 if the MSB is 1 as the result of the shift and set to 0 in other cases.
Z: Set to 1 if the result of the shift is 00H and set to 0 in other cases.
V: Not changed
C: Enter Bit 7 of A before shift.

Memory FFFFH Memory FFFFH
SP
SP
PS
0 1 0 0
1 0 0 0

Shift byte data of AL with a carry bit to the right. The contents of AH are not changed.
RORC A
+ + - +
N: Set to 1 if the MSB is 1 as the result of the shift and set to 0 in other cases.
Z: Set to 1 if the result of the shift is 00H and set to 0 in other cases.
V: Not changed
C: LSB of A before entering shift

Memory FFFFH Memory FFFFH
SP
SP
PS
0 1 0 0
1 1 0 0

6.71 SUBC (SUBtract Byte Data of Accumulator from Temporary Accumulator with Carry to Accumulator)
Subtract the byte data of AL from that of TL, subtract a carry and then return the result to AL. The contents of AH are not changed.
(AL) ← (TL) - (AL) - C (Byte subtraction with carry)
+
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.

Memory FFFFH Memory FFFFH
12 11 12 23
76 34 76 34
SP
PS
0
0

6.72 SUBC (SUBtract Byte Data of Memory from Accumulator with Carry to Accumulator)
Subtract the byte data of the EA memory (memory expressed in each type of addressing) from that of AL, subtract a carry and then return the results to AL. The contents of AH are not changed.
(AL) ← (AL) - (EA) - C (Byte subtraction with carry)
+
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.
Table 6.72-1 Number of Execution Cycles / Byte Count / OP Code
EA #d8 dir @IX+off @EP Ri
Number of execution cycles 2 3 3 2 2
OP code 34 35 36 37 38 to 3F

Memory FFFFH Memory FFFFH
SP
SP
PS
0
1 1 0 0

6.73 SUBCW (SUBtract Word Data of Accumulator from Temporary Accumulator with Carry to Accumulator)
Subtract the word data of A from that of T, subtract a carry and then return the result to A.
(AL) ← (T) - (A) - C (Word subtraction with carry)
+
N: Set to 1 if the MSB of A is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0000H and set to 0 in other cases.
V: Set to 1 if an overflow occurs as the result of operation and set to 0 in other cases.
C: Set to 1 if a carry occurs as the result of operation and set to 0 in other cases.

Memory FFFFH Memory FFFFH
24 20 32 14
56 34 56 34
SP
PS
0
0

Set the contents of 1 bit (indicated by 3 lower bits (b) of mnemonic) for the direct area to 1.
(dir:b) ← 1
SETB dir:b
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
00X0 0000 0032 H 0032 H 0010 0000
SP
SP
0000 H
0000 H
PS
PS
0
0
Memory Memory

Set the C-flag to 1.
SETC
- - - S
S: Set to 1 by executing instruction
N: Not changed
Z: Not changed
V: Not changed
C: Set to 1

FFFF H
SP
SP
0000H Byte Byte
PS
0
0 1 0 0
Memory Memory

Set the I-flag to 1 (enable an interrupt).
SETI
I N Z V C
S - - - -
S: Set to 1 by executing instruction
I: Set to 1
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
SP
SP
0000H Byte Byte
H I IL1 IL0 Z V C
N
N H I IL1 IL0 Z V C
PS
PS
0 1
Memory Memory

Exchange the byte data of AH for that of AL.
(AH) ↔ (AL) (Byte data exchange)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
32 AA AA 32
SP
SP
0000H Byte Byte
PS
PS
0
0
Memory Memory

Exchange the byte data of AL for that of TL.
(AL) ↔ (TL) (conversion of byte data)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
32 AA 32 79
55 79 55 AA
SP
SP
0000H Byte Byte
PS
PS
0
0
Memory Memory

Exchange the word data of A for that of EP.
(A) ↔ (EP) (conversion of word data)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
32 AA 55 79
SP
SP
0000H Byte Byte
55 79 32 AA
PS
0
0
Memory Memory

Exchange the word data of A for that of IX.
(A) ↔ (IX) (conversion of word data)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
32 AA 55 79
55 79 32 AA
SP
SP
0000H Byte Byte
PS
0
0
Memory Memory

Exchange the word data of PC for that of A.
(PC) ← (A) (word transfer)
(A) ← (PC) +1 (word addition, word transfer)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
F0 C7 F1 7A
SP
SP
F1 79 F0 C7
0000H Byte Byte
PS
1 0 0 0
1 0 0 0
Memory Memory

Exchange the word data of A for that of SP.
(A) ↔ (SP) (conversion of word data)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
32 AA 55 79
SP
SP
55 79 32 AA
0000H Byte Byte
PS
PS
0
0
Memory Memory

Exchange the word data of A for that of T.
(A) ↔ (T) (conversion of word data)
-
N: Not changed
Z: Not changed
V: Not changed
C: Not changed

FFFF H
32 AA 55 79
55 79 32 AA
SP
SP
0000H Byte Byte
PS
0
0
Memory Memory

6.84 XOR (eXclusive OR Byte Data of Accumulator and Temporary Accumulator to Accumulator)
Carry out the logical exclusive-OR on the byte data of AL and TL for every bit and return the results to AL. The contents of AH are not changed.
(AL) ← (AL) ∀ (TL) (byte logical exclusive-OR)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Always set to 0
C: Not changed

FFFF H
76 23 76 62
SP
SP
0000H Byte Byte
PS
0
0
Memory Memory

Carry out the logical exclusive-OR for the byte data of AL and EA memory (memory expressed in each type of addressing) for every bit and return the results to AL. The contents of AH are not changed.
(AL) ← (AL) ∀ (EA) (byte logical exclusive-OR)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of AL is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 00H and set to 0 in other cases.
V: Always set to 0
C: Not changed
Table 6.85-1 Number of Execution Cycles / Byte Count / OP Code
EA #d8 dir @IX+off @EP Ri
Number of execution cycles 2 3 3 2 2
OP code 54 55 56 57 58 to 5F

FFFF H
54 32 54 20
SP
0000H Byte Byte
01 22 01 22
PS
0
0
Memory Memory

6.86 XORW (eXclusive OR Word Data of Accumulator and Temporary Accumulator to Accmulator)
Carry out the logical exclusive-OR on the word data of A and T for every bit and return the results to A.
(A) ← (A) ∀ (T) (word logical exclusive-OR)
+ + R -
R: Set to 0 by executing instruction
N: Set to 1 if the MSB of A is 1 as the result of operation and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0000H and set to 0 in other cases.
V: Always set to 0
C: Not changed

FFFF H
57 23 64 62
33 41 33 41
SP
0000H Byte Byte
PS
PS
0
0
Memory Memory



The appendix contains instruction and bus operation lists and an instruction map.
APPENDIX A Instruction List
APPENDIX B Bus Operation List
APPENDIX C Instruction Map

APPENDIX A Instruction List
Appendix A contains lists of instructions used in the assembler.
A.1 F2MC-8FX CPU Instruction Overview
A.2 Operation List
A.3 Flag Change Table

APPENDIX A Instruction List
This section explains the F2MC-8FX CPU instructions.
In the F2MC-8FX CPU, there is 140 kinds of one byte machine instruction (as the map, 256 bytes), and the instruction code is composed of the instruction and the operand following it.
Figure A.1-1 shows the instruction code and the correspondence of the instruction map.
Figure A.1-1 Correspondence between the Instruction Code and the Instruction Map
Give 0 to 2 bytes according to the instruction.
Operand Operand Machine instruction Instruction code
[Instruction map] Upper 4 bits
The following are enumerated as a feature of F2MC-8FX CPU instruction.
1 byte · Lower 4 bits

Table A.1-1 explains the sign used by describing the instruction code in the table.
Table A.1-1 Sign of the Instruction List
dir Direct address (8 bits)
off Offset (8 bits)
ext Extended address (16 bits)
#vct Vector table number (3 bits)
#d8 Immediate data (8 bits)
#d16 Immediate data (16 bits)
dir:b Bit direct address (8 bits: 3 bits)
rel Relative branch address (8 bits)
A Accumulator (8-bit or 16-bit length is determined by instruction to be used.)
AH Upper 8 bits of accumulator (8 bits)
AL Lower 8 bits of accumulator (8 bits)
T Temporary accumulator (8-bit or 16-bit length is determined by instruction to be used.)
TH Upper 8 bits of temporary accumulator (8 bits)
TL Lower 8 bits of temporary accumulator (8 bits)
IX Index register (16 bits)
EP Extra pointer (16 bits)
PC Program counter (16 bits)
SP Stack pointer (16 bits)
PS Program status (16 bits)
dr Accumulator or index register (16 bits)
CCR Condition code register (8 bits)
RP Register bank pointer (5 bits)
DP Direct bank pointer (3 bits)
Ri General-purpose register (8 bits, i = 0 to 7)
X X indicates immediate data. (8-bit or 16-bit length is determined by instruction to be used.)
(X) The contents of X are to be accessed. (8-bit or 16-bit length is determined by instruction to be used.)
((X)) The address indicated by the contents of X is to be accessed. (8-bit or 16-bit length is determined by instruction to be used.)

APPENDIX A Instruction List
Table A.1-2 explains the item of instruction table.
Table A.1-2 Item in Instruction Table
NMEMONIC The assembly description of the instruction is shown.
RD The read of an internal bus is shown.
WR The write of an internal bus is shown.
RMW The read modification write signal of an internal bus is shown.
~ Cycle of the instruction number is shown. One instruction cycle is one machine cycle. Note: The instruction cycle number might be postponed one cycle by the immediately preceding instruction. Moreover, cycle of the instruction number might be extended in the access to the IO area.
# The number of bytes for the instruction is shown.
Operation The operation of the instruction is shown.
OP CODE The code of the instruction is shown. When a pertinent instruction occupies two or more codes, it follows the following description rules. 48 to 4F: 48, 49, ..., 4F are shown.
Item Description

A.2 Operation List
Table A.2-1 is the operation list for transfer instructions. Table A.2-2 is the operation list for operation instructions. Table A.2-3 is the operation list for branch instructions. Table A.2-4 is the operation list for other instructions.
Table A.2-1 Operation List (for Transfer Instructions) (1/3)
No MNEMONIC ~ # OPERATION TL TH AH N Z V C OP CODE
1 MOV dir, A 3 2 (dir) ← (A) – 45
2 MOV @IX+off, A
3 2 (IX)+off) ← (A) – 46
3 MOV ext, A 4 3 (ext) ← (A) – 61
4 MOV @EP, A 2 1 ((EP)) ← (A) – 47
5 MOV Ri, A 2 1 (Ri) ← (A) – 48 to 4F
6 MOV A, #d8 2 2 (A) ← d8 AL – – + + – – 04
7 MOV A, dir 3 2 (A) ← (dir) AL – – + + – – 05
8 MOV A, @IX+off
3 2 (A) ← ((IX)+off) AL – – + + – – 06
9 MOV A, ext 4 3 (A) ← (ext) AL – – + + – – 60
10 MOV A, @A 2 1 (A) ← ((A)) AL – – + + – – 92
11 MOV A, @EP 2 1 (A) ← ((EP)) AL – – + + – – 07
12 MOV A, Ri 2 1 (A) ← (Ri) AL – – + + – – 08 to 0F
13 MOV dir, #d8 4 3 (dir) ← d8 – 85
14 MOV @IX+off, #d8
4 3 ((IX)+off) ← d8 – 86
15 MOV @EP, #d8 3 2 ((EP)) ← d8 – 87
16 MOV Ri, #d8 3 2 (Ri) ← d8 – 88 to 8F
17 MOVW dir, A 4 2 (dir) ← (AH), (dir+1)←(AL)
18 MOVW @IX+off, A
4 2 ((IX)+off) ← (AH), ((IX)+off+1) ← (AL)

APPENDIX A Instruction List
Table A.2-1 Operation List (for Transfer Instructions) (2/3)
No MNEMONIC ~ # OPERATION TL TH AH N Z V C OP CODE
19 MOVW ext, A 5 3 (ext) ← (AH), (ext+1) ← (AL)
20 MOVW @EP, A 3 1 ((EP)) ← (AH), ((EP)+1) ← (AL)
21 MOVW EP, A 1 1 (EP) ← (A) – E3
22 MOVW A, #d16 3 3 (A) ← d16 AL AH dH + + – – E4
23 MOVW A, dir 4 2 (AH) ← (dir), (AL) ← (dir+1)
AL AH dH + + – – C5
24 MOVW A, @IX+off
4 2 (AH) ← ((IX)+off), (AL) ← ((IX)+off+1)
AL AH dH + + – – C6
25 MOVW A, ext 5 3 (AH) ← (ext), (AL) ← (ext+1)
AL AH dH + + – – C4
26 MOVW A, @A 3 1 (AH) ← ((A)), (AL) ← ((A)+1)
AL AH dH + + – – 93
27 MOVW A, @EP 3 1 (AH) ← ((EP)), (AL) ← ((EP)+1)
AL AH dH + + – – C7
28 MOVW A, EP 1 1 (A) ← (EP) – – dH – F3
29 MOVW EP, #d16 3 3 (EP) ← d16 – E7
30 MOVW IX, A 1 1 (IX) ← (A) – E2
31 MOVW A, IX 1 1 (A) ← (IX) – – dH – F2
32 MOVW SP, A 1 1 (SP) ← (A) – E1
33 MOVW A, SP 1 1 (A) ← (SP) – – dH – F1
34 MOV @A, T 2 1 ((A)) ← (T) – 82
35 MOVW @A, T 3 1 ((A)) ← (TH), ((A)+1) ← (TL)
– 83
36 MOVW IX, #d16 3 3 (IX) ← d16 – E6
37 MOVW A, PS 1 1 (A) ← (PS) – – dH – 70
38 MOVW PS, A 1 1 (PS) ← (A) – – – + 71
39 MOVW SP, #d16 3 3 (SP) ← d16 – E5
40 SWAP 1 1 (AH) ↔ (AL) – – AL – 10

Table A.2-1 Operation List (for Transfer Instructions) (3/3)
No MNEMONIC ~ # OPERATION TL TH AH N Z V C OP CODE
41 SETB dir:b 4 2 (dir):b ← 1 – A8 to AF
42 CLRB dir:b 4 2 (dir):b ← 0 – A0 to A7
43 XCH A, T 1 1 (AL) ↔ (TL) AL – 42
44 XCHW A, T 1 1 (A) ↔ (T) AL AH dH – 43
45 XCHW A, EP 1 1 (A) ↔ (EP) – – dH – F7
46 XCHW A, IX 1 1 (A) ↔ (IX) – – dH – F6
47 XCHW A, SP 1 1 (A) ↔ (SP) – – dH – F5
48 MOVW A, PC 2 1 (A) ← (PC) – – dH – F0
Table A.2-2 Operation List (for Operation Instructions) (1/3)
No MNEMONIC ~ # OPERATION TL TH AH NZVC OP CODE
1 ADDC A, Ri 2 1 (A) ← (A)+(Ri)+C – – – + 28 to 2F
2 ADDC A, #d8 2 2 (A) ← (A)+d8+C – – – + 24
3 ADDC A, dir 3 2 (A) ← (A)+(dir)+C – – – + 25
4 ADDC A, @IX+off
3 2 (A) ← (A)+((IX)+off)+C – – – + 26
5 ADDC A, @EP 2 1 (A) ← (A)+((EP))+C – – – + 27
6 ADDCW A 1 1 (A) ← (A)+(T)+C – – dH + 23
7 ADDC A 1 1 (AL) ← (AL)+(TL)+C – – – + 22
8 SUBC A, Ri 2 1 (A) ← (A)-(Ri)-C – – – + 38 to 3F
9 SUBC A, #d8 2 2 (A) ← (A)-d8-C – – – + 34
10 SUBC A, dir 3 2 (A) ← (A)-(dir)-C – – – + 35
11 SUBC A, @IX+off
3 2 (A) ← (A)-((IX)+off)-C – – – + 36
12 SUBC A, @EP 2 1 (A) ← (A)-((EP))-C – – – + 37
13 SUBCW A 1 1 (A) ← (T)-(A)-C – – dH + 33
14 SUBC A 1 1 (AL) ← (TL)-(AL)-C – – – + 32

APPENDIX A Instruction List
Table A.2-2 Operation List (for Operation Instructions) (2/3)
No MNEMONIC ~ # OPERATION TL TH AH NZVC OP CODE
15 IINC Ri 3 1 (Ri) ← (Ri)+1 – – – + + + – C8 to CF
16 INCW EP 1 1 (EP) ← (EP)+1 – C3
17 INCW IX 1 1 (IX) ← (IX)+1 – C2
18 INCW A 1 1 (A) ← (A)+1 – – dH + + – – C0
19 DEC Ri 3 1 (Ri) ← (Ri)-1 – – – + + + – D8 to DF
20 DECW EP 1 1 (EP) ← (EP)-1 – D3
21 DECW IX 1 1 (IX) ← (IX)-1 – D2
22 DECW A 1 1 (A) ← (A)-1 – – dH + + – – D0
23 MULU A 8 1 (A) ← (AL)*(TL) – – dH – 01
24 DIVU A 17 1 (A) ← (T)/(A), MOD → (T)
dL dH dH – + – – 11
25 ANDW A 1 1 (A) ← (A) ^ (T) – – dH + + R – 63
26 ORW A 1 1 (A) ← (A) ∨ (T) – – dH + + R – 73
27 XORW A 1 1 (A) ← (A) ∀ (T) – – dH + + R – 53
28 CMP A 1 1 (TL)-(AL) – – – + 12
29 CMPW A 1 1 (T)- (A) – – – + 13
30 RORC A 1 1 – – – + + – + 03
31 ROLC A 1 1 – – – + + – + 02
32 CMP A, #d8 2 2 (A)- d8 – – – + 14
33 CMP A, dir 3 2 (A)- (dir) – – – + 15
34 CMP A, @EP 2 1 (A)- ((EP)) – – – + 17
35 CMP A, @IX+off
3 2 (A)- ((IX)+off) – – – + 16
36 CMP A, Ri 2 1 (A)- (Ri) – – – + 18 to 1F
37 DAA 1 1 decimal adjust for addition – – – + 84

Table A.2-2 Operation List (for Operation Instructions) (3/3)
No MNEMONIC ~ # OPERATION TL TH AH NZVC OP CODE
38 DAS 1 1 decimal adjust for subtraction
– – – + 94
39 XOR A 1 1 (A) ← (AL) ∀ (TL) – – – + + R – 52
40 XOR A, #d8 2 2 (A) ← (AL) ∀ d8 – – – + + R – 54
41 XOR A, dir 3 2 (A) ← (AL) ∀ (dir) – – – + + R – 55
42 XOR A, @EP 3 1 (A) ← (AL) ∀ ((EP)) – – – + + R – 57
43 XOR A, @IX+off 4 2 (A) ← (AL) ∀ ((IX)+off) – – – + + R – 56
44 XOR A, Ri 2 1 (A) ← (AL) ∀ (Ri) – – – + + R – 58 to 5F
45 AND A 1 1 (A) ← (AL) ^ (TL) – – – + + R – 62
46 AND A, #d8 2 2 (A) ← (AL) ^ d8 – – – + + R – 64
47 AND A, dir 3 2 (A) ← (AL) ^ (dir) – – – + + R – 65
48 AND A, @EP 2 1 (A) ← (AL) ^ ((EP)) – – – + + R – 67
49 AND A, @IX+off 3 2 (A) ← (AL) ^ ((IX)+off) – – – + + R – 66
50 AND A, Ri 2 1 (A) ← (AL) ^ (Ri) – – – + + R – 68 to 6F
51 OR A 1 1 (A) ← (AL) ∨ (TL) – – – + + R – 72
52 OR A, #d8 2 2 (A) ← (AL) ∨ d8 – – – + + R – 74
53 OR A, dir 3 2 (A) ← (AL) ∨ (dir) – – – + + R – 75
54 OR A,@EP 2 1 (A) ← (AL) ∨ ((EP)) – – – + + R – 77
55 OR A, @IX,off 3 2 (A) ← (AL) ∨ ((IX)+off) – – – + + R – 76
56 OR A, Ri 2 1 (A) ← (AL) ∨ (Ri) – – – + + R – 78 to 7F
57 CMP dir, #d8 4 3 (dir) - d8 – – – + 95
58 CMP @EP, #d8 3 2 ((EP))- d8 – – – + 97
59 CMP @IX+off, #d8
4 3 ((IX)+off) - d8 – – – + 96
60 CMP Ri, #d8 3 2 (Ri) - d8 – 98 to 9F
61 INCW SP 1 1 (SP) ← (SP) + 1 – C1
62 DECW SP 1 1 (SP) ← (SP) - 1 – D1

APPENDIX A Instruction List
Table A.2-3 Operation List (for Branch Instructions)
No MNEMONIC ~ # OPERATION TL TH AH NZVC OP CODE
1 BZ/BEQ rel (divergence) (no divergence)
4 2 2 if Z=1 then PC ← PC+rel – FD
2 BNZ/BNE rel (divergence) (no divergence)
4 2 2 if Z=0 then PC ← PC+rel – FC
3 BC/BLO rel (divergence) (no divergence)
4 2 2 if C=1 then PC ← PC+rel – F9
4 BNC/BHS rel (divergence) (no divergence)
4 2 2 if C=0 then PC ← PC+rel – F8
5 BN rel (divergence) (no divergence)
4 2 2 if N=1 then PC ← PC+rel – FB
6 BP rel (divergence) (no divergence)
4 2 2 if N=0 then PC ← PC+rel – FA
7 BLT rel (divergence) (no divergence)
4 2 2 if V ∀ N=1 then PC ← PC+rel
8 BGE rel (divergence) (no divergence)
4 2 2 if V ∀ N=0 then PC ← PC+rel
9 BBC dir:b, rel 5 3 if (dir:b)=0 then PC ← PC+rel
– + – – B0 to B7
10 BBS dir:b, rel 5 3 if (dir:b)=1 then PC ← PC+rel
– + – – B8 to BF
11 JMP @A 3 1 (PC) ← (A) – E0
12 JMP ext 4 3 (PC) ← ext – 21
13 CALLV #vct 7 1 vector call – E8 to EF
14 CALL ext 6 3 subroutine call – 31
15 XCHW A, PC 3 1 (PC) ← (A), (A) ← (PC)+1
– – dH – F4
16 RET 6 1 return from subroutine – 20
17 RETI 8 1 return from interrupt – – – restore 30

Table A.2-4 Operation List (for Other Instructions)
No MNEMONIC ~ # OPERATION TL TH AH N Z V C OP CODE
1 PUSHW A 4 1 (SP) ← (SP)-2, ((SP)) ← (A) – 40
2 POPW A 3 1 (A) ← ((SP)), (SP ) ← (SP)+2
– – dH – 50
3 PUSHW IX 4 1 (SP) ← (SP)-2, ((SP)) ← (IX)
– 41
4 POPW IX 3 1 (IX) ← ((SP)), (SP) ← (SP)+2
– 51
5 NOP 1 1 No operation – 00
6 CLRC 1 1 (C) ← 0 – R 81
7 SETC 1 1 (C) ← 1 – S 91
8 CLRI 1 1 (I) ← 0 – 80
9 SETI 1 1 (I) ← 1 – 90

APPENDIX A Instruction List
Table A.3-1 is the flag change table for transfer instructions. Table A.3-2 is the flag change table for operation instructions. Table A.3-3 is the flag change table for branch instructions. Table A.3-4 is the flag change table for other instructions.
Table A.3-1 Flag Change Table (for Transfer Instructions) (1/2)
MOV , #d8 N: Set to 1 if the transferred data is negative and set to 0 in other cases.
MOV A, dir Z: Set to 1 if the transferred data is 0 and set to 0 in other cases
MOV A, @EP
MOVW A, #d16 N: Set to 1 if the transferred data is negative and set to 0 in other cases.
MOVW A, dir Z: Set to 1 if the transferred data is 0 and set to 0 in other cases
MOVW A, @EP
Instruction Flag change · MOV Ri, A · MOV A, Ri

Table A.3-1 Flag Change Table (for Transfer Instructions) (2/2)
MOVW A, SP
V: Not changed
C: Not changed
MOVW PS, A N: Set to 1 if bit 3 of A is 1 and set to 0 if 0.
Z: Set to 1 if bit 2 of A is 1 and set to 0 if 0.
V: Set to 1 if bit 1 of A is 1 and set to 0 if 0.
C: Set to 1 if bit 0 of A is 1 and set to 0 if 0.
SETB dir:b N: Not changed
CLRB dir:b Z: Not changed
V: Not changed
C: Not changed
V: Not changed
C: Not changed
Instruction Flag change · MOVW SP, #d16

APPENDIX A Instruction List
Table A.3-2 Flag Change Table (for Operation Instructions) (1/3)
ADDC A, Ri N: Set to 1 if the result of operation is negative and set to 0 in other cases.
ADDC A, #d8 Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
ADDC A, dir V: Set to 1 if an overflow occurs and set to 0 in other cases.
ADDC A, @IX+off C: Set to 1 if a carry occurs and set to 0 in other cases.
ADDC A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
ADDCW A Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Set to 1 if an overflow occurs and set to 0 in other cases.
C: Set to 1 if a carry occurs and set to 0 in other cases.
SUBC A, Ri N: Set to 1 if the result of operation is negative and set to 0 in other cases.
SUBC A, #d8 Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
SUBC A, dir V: Set to 1 if an overflow occurs and set to 0 in other cases.
SUBC A, @IX+off C: Set to 1 if a borrow occurs and set to 0 in other cases.
SUBC A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
SUBCW A Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Set to 1 if an overflow occurs and set to 0 in other cases.
C: Set to 1 if a borrow occurs and set to 0 in other cases.
INC Ri N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Set to 1 if an overflow occurs and set to 0 in other cases.
C: Not changed
C: Not changed
INCW A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Not changed
C: Not changed
DEC Ri N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Set to 1 if an overflow occurs and set to 0 in other cases.
C: Not changed
Instruction Flag change

Table A.3-2 Flag Change Table (for Operation Instructions) (2/3)
C: Not changed
DECW A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Not changed
C: Not changed
Z: Not changed
V: Not changed
C: Not changed
Z: Set to 1 if A before operation is 0000H and set to 0 in other cases.
V: Not changed
C: Not changed
ANDW A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Always Set to 0
C: Not changed
AND A, #d8 N: Set to 1 if the result of operation is negative and set to 0 in other cases.
AND A, dir Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
ORW A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Always set to 0
C: Not changed
OR A, #d8 N: Set to 1 if the result of operation is negative and set to 0 in other cases.
OR A, dir Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
Instruction Flag change · AND A, Ri · OR A, Ri

APPENDIX A Instruction List
Table A.3-2 Flag Change Table (for Operation Instructions) (3/3)
XORW A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Always set to 0
C: Not changed
XOR A, #d8 N: Set to 1 if the result of operation is negative and set to 0 in other cases.
XOR A, dir Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
CMP A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Set to 1 if an overflow occurs and set to 0 in other cases.
C: Set to 1 if a borrow occurs and set to 0 in other cases.
CMPW A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Set to 1 if an overflow occurs and set to 0 in other cases.
C: Set to 1 if a borrow occurs and set to 0 in other cases.
CMP A, #d8 N: Set to 1 if the result of operation is negative and set to 0 in other cases.
CMP A, dir Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
CMP A, @EP V: Set to 1 if an overflow occurs and set to 0 in other cases.
CMP A, @IX+off C: Set to 1 if a borrow occurs and set to 0 in other cases.
CMP dir, #d8 N: Set to 1 if the result of operation is negative and set to 0 in other cases.
CMP @EP #d8 Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
CMP @IX+off, #d8 V: Set to 1 if an overflow occurs and set to 0 in other cases.
CMP Ri, #d8 C: Set to 1 if a borrow occurs and set to 0 in other cases.
RORC A N: Set to 1 if the result of operation is negative and set to 0 in other cases.
ROLC A Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Not changed
C: Enter bit 0 (when RORA) or bit 7 (when ROLA) of A before the operation.
DAA N: Set to 1 if the result of operation is negative and set to 0 in other cases.
DAS Z: Set to 1 if the result of operation is 0 and set to 0 in other cases.
V: Set to 1 if an overflow occurs and set to 0 in other cases.
C: Set to 1 if a carry (borrow) occurs and set to 0 in other cases.
Instruction Flag change · XOR A, Ri · CMP A, Ri

Table A.3-3 Flag Change Table (for Branch Instructions)
Z: Not changed
V: Not changed
C: Not changed
BBC dir:b, rel N: Not changed
BBS dir:b, rel Z: Set to 1 if bit b is 0 and set to 0 if 1.
V: Not changed
C: Not changed
C: Not changed
RETI N: N value of saved CCR is entered.
Z: Z value of saved CCR is entered.
V: V value of saved CCR is entered.
C: C value of saved CCR is entered.

APPENDIX A Instruction List
Table A.3-4 Flag Change Table (for Other Instructions)
V: Not changed
C: Not changed
V: Not changed
C: Not changed
Z: Not changed
V: Not changed
C: Not changed
Z: Not changed
V: Not changed
C: Become to 0
Z: Not changed
V: Not changed
C: Become to 1
Z: Not changed
V: Not changed
C: Not changed
I: Become to 0
Z: Not changed
V: Not changed
C: Not changed
I: Become to 1
Instruction Flag change

APPENDIX B Bus Operation List
Table B-1 is a bus operation list.
Table B-1 Bus Operation List (1/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
00 NOP 1 1 N +2 The following following instruction
90 SETI
81 CLRC
91 SETC
10 SWAP 1 1 N +2 The following following instruction
22 ADDC A
32 SUBC A
42 XCH A, T
52 XOR A
62 AND A
72 OR A
13 CMPW A 1 1 N +2 The following following instruction
33 SUBCW A
43 XCHW A, T
53 XORW A
63 ANDW A
73 ORW A
04 MOV A, #d8 2 1 N +2 The following instruction
14 CMP A, #d8 2 N +3 The following following instruction
24 ADDC A, #d8
34 SUBC A, #d8
54 XOR A, #d8
64 AND A, #d8
74 OR A, #d8

APPENDIX B Bus Operation List
Table B-1 Bus Operation List (2/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
05 MOV A, dir 3 1 N +2 The following instruction
15 CMP A, dir 2 dir address Data 1 0 0
25 ADDC A, dir 3 N +3 The following following instruction
35 SUBC A, dir
55 XOR A, dir
65 AND A, dir
75 OR A, dir
45 MOV dir, A 3 1 N +2 The following instruction
2 dir address Data 0 1 0
3 N +3 The following following instruction
06 MOV A, @IX+off 3 1 N +2 The following instruction
16 CMP A, @IX+off 2 N +3 The following following instruction
26 ADDC A, @IX+off 3 (IX)+off address
Data 1 0 0
36 SUBC A, @IX+off
56 XOR A, @IX+off
66 AND A, @IX+off
76 OR A, @IX+off
46 MOV @IX+off, A 3 1 N +2 The following instruction
2 N +3 The following following instruction
3 (IX)+off address Data 0 1 0
07 MOV A, @EP 2 1 N +2 The following following instruction
17 CMP A, @EP 2 (EP) address Data 1 0 0
37 SUBC A, @EP
57 XOR A, @EP
67 AND A, @EP
77 OR A, @EP
47 MOV @EP, A 2 1 N +2 The following following instruction
2 (EP) address Data 0 1 0

Table B-1 Bus Operation List (3/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
2 Rn address Data 0 1 0
C0 INCW A 1 1 N +2 The following following instruction
C1 INCW SP
D1 DECW SP
C2 INCW IX
D2 DECW IX
C3 INCW EP
D3 DECW EP
F0 MOVW A, PC 2 1 N +2 The following following instruction
2 − − 0 0 0
E1 MOVW SP, A 1 1 N +2 The following following instruction
E2 MOVW IX, A
F2 MOVW A, IX
E3 MOVW EP, A
F3 MOVW A, EP
E0 JMP @A 3 1 N +2 Data of N +2 1 0 0
2 Address divergence The following instruction
3 Address divergence +1
The following following instruction
F5 XCHW A, SP 1 1 N +2 The following following instruction
F7 XCHW A, EP

APPENDIX B Bus Operation List
Table B-1 Bus Operation List (4/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
F4 XCHW A, PC 3 1 N +2 Data of N +2 1 0 0
2 Address divergence The following instruction
3 Address divergence +1
The following following instruction
A0 - A7 CLRB dir:n 4 1 N +2 The following instruction
A8 - AF SETB dir:n 2 dir address Data 1 0 1
3 dir address Data 0 1 0
4 N +3 The following following instruction
B0 - B7 BBC dir:n, rel Divergence
B8 - BF BBS dir:n, rel 5 1 N +2 rel 1 0 0
2 dir address Data 1 0 0
3 N +3 Data of N+3 1 0 0
4 Address divergence The following instruction
5 Address divergence +1
The following following instruction
5 1 N +2 rel 1 0 0
2 dir address Data 1 0 0
3 N +3 The following instruction
4 − − 0 0 0
5 N +4 The following following instruction
60 MOV A, ext 4 1 N +2 ext (L byte) 1 0 0
2 N +3 The following instruction
3 ext address Data 1 0 0
4 N +4 The following following instruction
61 MOV ext, A 4 1 N +2 ext (L byte) 1 0 0
2 N +3 The following instruction
3 ext address Data 0 1 0
4 N +4 The following following instruction
No divergence

Table B-1 Bus Operation List (5/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
C4 MOVW A, ext 5 1 N +2 ext (L byte) 1 0 0
2 N +3 The following instruction
3 ext address Data (H byte) 1 0 0
4 ext+1 address Data (L byte) 1 0 0
5 N +4 The following following instruction
D4 MOVW ext, A 5 1 N +2 ext (L byte) 1 0 0
2 N +3 The following instruction
3 ext address Data (H byte) 0 1 0
4 ext+1 address Data (L byte) 0 1 0
5 N +4 The following following instruction
C5 MOVW A, dir 4 1 N +2 The following instruction
2 dir address Data (H byte) 1 0 0
3 dir+1 address Data (L byte) 1 0 0
4 N +3 The following following instruction
D5 MOVW dir, A 4 1 N +2 The following instruction
2 dir address Data (H byte) 0 1 0
3 dir+1 address Data (L byte) 0 1 0
4 N +3 The following following instruction
C6 MOVW A, @IX+off
4 1 N +2 The following instruction
2 N +3 The following following instruction
3 (IX)+off address Data (H byte) 1 0 0
4 (IX)+off+1 address Data (L byte) 1 0 0
D6 MOVW @IX+off, A
4 1 N +2 The following instruction
2 N +3 The following following instruction
3 (IX)+off address Data (H byte) 0 1 0
4 (IX)+off+1 address Data (L byte) 0 1 0

APPENDIX B Bus Operation List
Table B-1 Bus Operation List (6/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
C7 MOVW A, @EP 3 1 N +2 The following following instruction
2 (EP) address Data(H byte) 1 0 0
3 (EP)+1 address Data(L byte) 1 0 0
D7 MOVW @EP, A 3 1 N +2 The following following instruction
2 (EP) address Data(H byte) 0 1 0
3 (EP)+1 address Data(L byte) 0 1 0
85 MOV dir, #d8 4 1 N +2 #d8 1 0 0
2 dir address Data 0 1 0
3 N +3 The following instruction
4 N +4 The following following instruction
95 CMP dir, #d8 4 1 N +2 #d8 1 0 0
2 dir address Data 1 0 0
3 N +3 The following instruction
86 MOV @IX+off, #d8
4 1 N +2 #d8 1 0 0
2 N +3 The following instruction
3 (IX)+off address Data 0 1 0
4 N +4 The following following instruction
96 CMP @IX+off, #d8 4 1 N +2 #d8 1 0 0
2 N +3 The following instruction
3 (IX)+off address Data 1 0 0
4 N +4 The following following instruction

Table B-1 Bus Operation List (7/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
87 MOV @EP, #d8 3 1 N +2 The following instruction
2 (EP) address Data 0 1 0
3 N +3 The following following instruction
97 CMP @EP, #d8 3 1 N +2 The following instruction
2 (EP) address Data 1 0 0
3 N +3 The following following instruction
2 Rn address Data 0 1 0
3 N +3 The following following instruction
2 Rn address Data 1 0 0
3 N +3 The following following instruction
82 MOV @A, T 2 1 N +2 The following following instruction
2 (A) address Data 0 1 0
92 MOV A, @A 2 1 N +2 The following following instruction
2 (A) address Data 1 0 0
83 MOVW @A, T 3 1 N +2 The following following instruction
2 (A) address Data (H byte) 0 1 0
3 (A) +1 address Data (L byte) 0 1 0

APPENDIX B Bus Operation List
Table B-1 Bus Operation List (8/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
93 MOVW A, @A 3 1 N +2 The following following instruction
2 (A) address Data (H byte) 1 0 0
3 (A) +1 address Data (L byte) 1 0 0
E4 MOVW A, #d16 3 1 N +2 Data (L byte) 1 0 0
E5 MOVW SP, #d16 2 N +3 The following instruction
E6 MOVW IX, #d16 3 N +4 The following following instruction
E7 MOVW EP, #d16
84 DAA 1 1 N +2 The following following instruction
02 ROLC A
03 RORC A
70 MOVW A, PS
71 MOVW PS, A
C8 - CF INC Ri 3 1 N +2 The following following instruction
D8 - DF DEC Ri 2 Rn address Data 1 0 1
3 Rn address Data 0 1 0
E8 - EF CALLV #n 7 1 N +2 Data of N +2 1 0 0
2 Vector address Vector (H) 1 0 0
3 Vector address +1 Vector (L) 1 0 0
4 SP -1 Return address (L) 0 1 0
5 SP -2 Return address (H) 0 1 0
6 Address divergence ahead
7 Address divergence ahead +1
The following following instruction
The following instruction

Table B-1 Bus Operation List (9/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
F8 BNC rel Divergence
F9 BC rel 4 1 N +2 Data of N +2 1 0 0
FA BP rel 2 N +3 Data of N +3 1 0 0
FB BN rel 3 Address divergence ahead
FC BNZ rel 4 Address divergence ahead +1
The following following instruction
FD BZ rel No divergence
FE BGE rel 2 1 N +2 The following instruction
FF BLT rel 2 N +3 The following following instruction
40 PUSHW A 4 1 N +2 The following following instruction
41 PUSHW IX 2 − − 0 0 0
3 SP -1 Save data (L) 0 1 0
4 SP -2 Save data (H) 0 1 0
50 POPW A 3 1 N +2 The following following instruction
51 POPW IX 2 SP Return data (H) 1 0 0
3 SP +1 Return data (L) 1 0 0
20 RET 6 1 N +2 Data of N +2 1 0 0
2 SP Return address (H) 1 0 0
3 SP +1 Return address (L) 1 0 0
4 − − 0 0 0
5 Return address The following instruction
6 Return address +1 The following following instruction
30 RETI 8 1 N +2 Data of N +2 1 0 0
3 SP +1 PSL (CCR) 1 0 0
4 SP +2 Return address (H) 1 0 0
5 SP +3 Return address (L) 1 0 0
6 − − 0 0 0
7 Return address The following instruction
8 Return address +1 The following following instruction
The following instruction

APPENDIX B Bus Operation List
Table B-1 Bus Operation List (10/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
31 CALL ext 6 1 N +2 Address divergence ahead (L)
2 − − 0 0 0
3 SP -1 Return address (L) 0 1 0
4 SP -2 Return address (H) 0 1 0
5 Address divergence ahead
6 Address divergence ahead +1
The following following instruction
21 JMP ext 4 1 N +2 Address divergence ahead (L)
2 − − 0 0 0
3 Address divergence ahead
4 Address divergence ahead +1
The following following instruction
01 MULU A 8 1 N +2 The following following instruction
2 − − 0 0 0
8 − − 0 0 0
11 DIVU A 17 1 N +2 The following following instruction
2 − − 0 0 0
17 − − 0 0 0
− RESET 7 1 − − 0 0 0
2 0FFFDH Mode data 1 0 0
3 0FFFEH Reset vector (H) 1 0 0
4 0FFFFH Reset vector (L) 1 0 0
5 − − 0 0 0
6 Start address The following instruction
7 Start address +1 The following following instruction

Table B-1 Bus Operation List (11/11)
CODE MNEMONIC ~ Cycle Address bus Data bus RD WR RMW
− INTERRUPT 9 1 N +2 Data of N +2 1 0 0
2 Vector address Vector (H) 1 0 0
3 Vector address +1 Vector (L) 1 0 0
4 SP -1 Return address (L) 0 1 0
5 SP -2 Return address (H) 0 1 0
7 SP -4 PSH (RP, DP) 0 1 0
8 Address divergence ahead
9 Address divergence ahead +1
The following following instruction
-: Invalid bus cycle N: Address where instruction under execution is stored Note: The cycle of the instruction might be extended by the immediately preceding instruction by one cycle. Moreover, cycle of the instruction number might be extended in the access to the IO area.
The following instruction

APPENDIX C Instruction Map

Table C-1 Instruction Map



INDEX
The index follows on the next page. This is listed in alphabetic order.

Index
Immediate Addressing (#imm) 41 #k
Accumulator (A) 18 Example of Operation of Accumulator (A) and
Vector Addressing (#k) 42 @EP
Temporary Accumulator (T) in Byte Data Processing 21 Accumulator
Pointer Addressing (@EP) 41 @IX+off
Accumulator (A) 18 Example of Operation of Accumulator (A) and
Index Addressing (@IX+off) 41
Temporary Accumulator (T) in Byte Data Processing 21 ADDC
16-bit Data Arrangement of 16-bit Data in Memory Space 13
ADDC (ADD Byte Data of Accumulator and Memory
with Carry to Accumulator) 50 ADDC (ADD Byte Data of Accumulator and
Temporary Accumulator with Carry to Accumulator) 48 ADDCW
ADDCW (ADD Word Data of Accumulator and
Temporary Accumulator with Carry to Accumulator) 52 Addressing
Memory Space and Addressing 7 AND
AND (AND Byte Data of Accumulator and Memory
to Accumulator) 56 AND (AND Byte Data of Accumulator and
Temporary Accumulator to Accumulator)
ANDW (AND Word Data of Accumulator and
Temporary Accumulator to Accumulator)
58
BBC
BBC (Branch if Bit is Clear) 60 BBS
BBS (Branch if Bit is Set) 62 BC
BC (Branch relative if C=1)/BLO (Branch if LOwer)
BZ (Branch relative if Z=1)/BEQ (Branch if Equal)
equal to Zero) 66
Symbols · #imm · Numerics

BHS
CMPW
BNC (Branch relative if C=0)/BHS (Branch if Higher
CMPW (CoMPare Word Data of Accumulator and
or Same) 74 Bit Direct Addressing
Temporary Accumulator) 96 CPU
Configuration Example of Device Using F2MC-8FX
Bit Direct Addressing (dir:b) 40 BLO
CPU 3 F2MC-8FX CPU Features 2 F2MC-8FX CPU Instruction Overview 223 Outline of F2MC-8FX CPU 2
BC (Branch relative if C=1)/BLO (Branch if LOwer)
D
DAA
BN (Branch relative if N=1) 70 BNC
DAA (Decimal Adjust for Addition) 98 DAS
BNC (Branch relative if C=0)/BHS (Branch if Higher
DAS (Decimal Adjust for Subtraction) 100 DEC
or Same) 74 BNE
DEC (DECrement Byte Data of General-purpose
BNZ (Branch relative if Z=0)/BNE (Branch if Not
Register) 102 DECW
Equal) 72 BNZ
DECW (DECrement Word Data of Accumulator)
BNZ (Branch relative if Z=0)/BNE (Branch if Not
104 DECW (DECrement Word Data of Extra Pointer)
Equal) 72 BP
106 DECW (DECrement Word Data of Index Pointer)
108 DECW (DECrement Word Data of Stack Pointer)
Bus Operation List 240 Byte Data Processing
110 Dedicated Register
Example of Operation of Accumulator (A) and
F2MC-8FX Dedicated Registers 16 dir
Temporary Accumulator (T) in Byte Data Processing 21 BZ
Direct Addressing (dir) 40 dir:b
BZ (Branch relative if Z=1)/BEQ (Branch if Equal)
78
Bit Direct Addressing (dir:b) 40 Direct Addressing
Direct Addressing (dir) 40 Direct Area
CALL (CALL subroutine) 80 CALLV
Direct Area 10 Direct Bank
Direct Bank 28 Direct Bank Pointer
CALLV #k 45 CALLV (CALL Vectored subroutine) 82 CLRB
Access to Register Bank Pointer and Direct Bank
Pointer 25 Direct Data Transfer
CLRB (Clear direct Memory Bit) 84 CLRC
CLRC (Clear Carry flag) 86 CLRI
Direct Data Transfer from Temporary Accumulator
CLRI (CLeaR Interrupt flag) 88 CMP
DIVU (DIVide Unsigned) 112 DIVU A 44
CMP (CoMPare Byte Data of Accumulator and
Memory) 92 CMP (CoMPare Byte Data of Accumulator and
Temporary Accumulator) 90 CMP (CoMPare Byte Data of Immediate Data and
Extra Pointer (EP) 26
Memory) 94

Interrupt Enable/Disable Functions 32 Interrupt Requests in Resources 32 Multiple Interrupt 36 Outline of Interrupt Operation 30 Reset and Interrupt Vector Table 11 Item
Extended Addressing (ext) 40 Extended Addressing
Extended Addressing (ext) 40 Extra Pointer
Extra Pointer (EP) 26
Item in Instruction Table 225 IX
Index Register (IX) 26
Program Status (PS) Flags 24 Flag Change
JMP
Flag Change Table 233
JMP (JuMP to address pointed by Accumulator)
124 JMP (JuMP to effective Address) 126 JMP @A 43
F2MC-8FX General-Purpose Registers 16 General-Purpose Register Addressing
General-Purpose Register Addressing (Ri) 41 General-Purpose Register Bank Area
Arrangement of 16-bit Data in Memory Space 13 CPU Memory Space 6 Memory Space and Addressing 7 MOV
General-Purpose Register Bank Area 9
MOV (MOVE Byte Data from Accumulator to
Immediate Addressing (#imm) 41 INC
memory) 134 MOV (MOVE Byte Data from Memory to
INC (INCrement Byte Data of General-purpose
Accumulator) 130 MOV (MOVE Byte Data from Temporary
Register) 114 INCW
Accumulator to Address Pointed by Accumulator) 128 MOV (MOVE Immediate Byte Data to Memory)
INCW (INCrement Word Data of Accumulator)
116 INCW (INCrement Word Data of Extra Pointer)
118 INCW (INCrement Word Data of Index Register)
MOVW (MOVE Immediate Word Data to Extra
Pointer) 154 MOVW (MOVE Immediate Word Data to Index
120 INCW (INCrement Word Data of Stack Pointer)
Register) 158 MOVW (MOVE Immediate Word Data to Stack
122 Index Addressing
Pointer) 162 MOVW (MOVE Word Data from Accumulator to
Index Addressing (@IX+off) 41 Index Register
Extra Pointer) 152 MOVW (MOVE Word Data from Accumulator to
Index Register (IX) 26 Inherent Addressing
Index Register) 156 MOVW (MOVE Word Data from Accumulator to
Inherent Addressing 42 Instruction
Memory) 150 MOVW (MOVE Word data from Accumulator to
F2MC-8FX CPU Instruction Overview 223 Instruction List
Program Status Register) 160 MOVW (MOVE Word data from Accumulator to
Sign of the Instruction List 224 Instruction Map
Stack Pointer) 164 MOVW (MOVE Word Data from Extra Pointer to
Instruction Map 251 Instruction Table
Accumulator) 140 MOVW (MOVE Word Data from Index Register to
Item in Instruction Table 225 Interrupt
Accumulator) 142 MOVW (MOVE Word Data from Memory to
Creating an Interrupt Processing Program 34
Accumulator) 138

MOVW (MOVE Word Data from Program Counter to
Accumulator) 146 MOVW (MOVE Word Data from Program Status
Register Bank Register 27 Register Bank Pointer
Register to Accumulator) 144 MOVW (MOVE Word Data from Stack Pointer to
Accumulator) 148 MOVW (MOVE Word Data from Temporary
Access to Register Bank Pointer and Direct Bank
Pointer 25 rel
Accumulator to Address Pointed by Accumulator) 136 MOVW A,PC 43 Multiple Interrupt
Relative Addressing (rel) 42 Relative Addressing
Relative Addressing (rel) 42 Reset
Multiple Interrupt 36 MULU
Reset and Interrupt Vector Table 11 Reset Operation 37 RET
MULU (MULtiply Unsigned) 166 MULU A 44
RET (RETurn from subroutine) 180 RETI
RETI (RETurn from Interrupt) 182 Ri
NOP (NoOPeration) 168
General-Purpose Register Addressing (Ri) 41 ROLC
ROLC (Rotate Byte Data of Accumulator with Carry
to Left) 184 RORC
Operation List 226 OR
RORC (Rotate Byte Data of Accumulator with Carry
OR (OR Byte Data of Accumulator and Memory to
to Right) 186
Accumulator) 172 OR (OR Byte Data of Accumulator and Temporary
Accumulator to Accumulator) 170 ORW
ORW (OR Word Data of Accumulator and Temporary
SETB (Set Direct Memory Bit) 194 SETC
Accumulator to Accumulator) 174
SETC (SET Carry flag) 196 SETI
SETI (SET Interrupt flag) 198 Sign
Program Counter (PC) 17 Pointer Addressing
Sign of the Instruction List 224 SP
Pointer Addressing (@EP) 41 POPW
Stack Pointer (SP) 17 Stack Area
POPW (POP Word Data of Intherent Register from
Stack Area 9 Stack Pointer
Stack Memory) 178 Program Counter
Stack Pointer (SP) 17 SUBC
Program Counter (PC) 17 Program Status
SUBC (SUBtract Byte Data of Accumulator from
Program Status (PS) Flags 24 Structure of Program Status (PS) 23 PS
Temporary Accumulator with Carry to Accumulator) 188 SUBC (SUBtract Byte Data of Memory from
Program Status (PS) Flags 24 Structure of Program Status (PS) 23 PUSHW
Accumulator with Carry to Accumulator)
PUSHW (PUSH Word Data of Inherent Register to
SUBCW (SUBtract Word Data of Accumulator from
Stack Memory) 176
Temporary Accumulator with Carry to Accumulator) 192
Register Bank

SWAP
SWAP (SWAP Byte Data Accumulator ’H’and
Reset and Interrupt Vector Table 11
Accumulator ’L’) 200
XCH (eXCHange Byte Data Accumulator ’L’and
Direct Data Transfer from Temporary Accumulator
Temporary Accumulator ’L’) 202 XCHW
(T) 22 Example of Operation of Accumulator (A) and
XCHW (eXCHange Word Data Accumulator and
Temporary Accumulator (T) in Byte Data Processing 21 How to Use the Temporary Accumulator (T) 20 Temporary Accumulator (T) 18 Temporary Accumulator
Extrapointer) 204 XCHW (eXCHange Word Data Accumulator and
Index Register) 206 XCHW (eXCHange Word Data Accumulator and
Program Counter) 208 XCHW (eXCHange Word Data Accumulator and
Direct Data Transfer from Temporary Accumulator
(T) 22 Example of Operation of Accumulator (A) and
Stack Pointer) 210 XCHW (eXCHange Word Data Accumulator and
Temporary Accumulator (T) in Byte Data Processing 21 How to Use the Temporary Accumulator (T) 20 Temporary Accumulator (T) 18
Temporary Accumulator) 212 XCHW A,PC 44 XOR
XOR (eXclusive OR Byte Data of Accumulator and
Memory to Accumulator) 216 XOR (eXclusive OR Byte Data of Accumulator and
Temporary Accumulator to Accumulator)
Vector Addressing (#k) 42 Vector Call
XORW (eXclusive OR Word Data of Accumulator
Vector Call Instruction Table 11
and Temporary Accumulator to Accmulator)
218
Vector Table · Vector Addressing

FUJITSU SEMICONDUCTOR • CONTROLLER MANUAL
F 2 MC-8FX
8-BIT MICROCONTROLLER
PROGRAMMING MANUAL
February 2008 the second edition
Edited Strategic Business Development Dept.


Owners and our team usually reply within a day — and your question helps the next person too.
Be the first to ask — other owners or our team will answer.