[Japanese]

About KUE-CHIP2 and KUE-CHIP2 educational board

KUE-CHIP2 (Kyoto University Education Chip 2) is an 8-bit microprocessor developed as a teaching aid for computer education at universities and other institutions. KUE-CHIP2 has an extremely simple architecture and a basic instruction set.

Using the KUE-CHIP2 educational board, it is possible to observe and change the state of registers and memory during execution while executing the program one clock cycle or one instruction at a time.

KUE-CHIP2 educational boards are manufactured and sold by ASTEM. Follow ASTEM Home Page for details.

[IMPORTANT NOTICE] KUE-CHIP2 is now out of distribution as of the end of March 2025.


Instruction set for KUE-CHIP2

All excerpts are from the "KUE-CHIP2 Educational Board Reference Manual"

Assembly Syntax

Addressing mode for KUE-CHIP2
ACC Accumulator
IX Index Register
d Immediate Address
[d] Absolute Address (Code Region)
(d) Absolute Address (Data Region)
[IX+d] Indexed Address (Code Region)
(IX+d) Indexed Address (Data Region)

KUE-CHIP2 Logical Address Mode
{ea} Entire Address Mode
{reg} Register Address Mode
{imm} Immediate Address Mode
{ma} Memory Reference Address Mode

Address Mode Correspondence Table
ACC IX d [d] (d) [IX+d] (IX+d)
{ea}
{reg}
{imm}
{ma}

KUE-CHIP2 Instructions Table
Mnemonic Address Mode Instruction Function
HLT
NOP
Halt
No OPeration
IN
OUT
INput
OUTput
SCF
RCF
Set Carry Flag
Reset Carry Flag
LD
ST
{reg},{ea}
{reg},{ma}
LoaD
STore
ADD
ADC
SUB
SBC
CMP
AND
OR
EOR
{reg},{ea}
{reg},{ea}
{reg},{ea}
{reg},{ea}
{reg},{ea}
{reg},{ea}
{reg},{ea}
{reg},{ea}
ADD
ADd with Carry
SUBtract
SuBtract with Carry
CoMPare
AND
OR
Exclusive OR
Ssm
Rsm
{reg}
{reg}
Shift
Rotate
sm RA
LA
RL
LL
Right Arithmetically
Left Arithmerically
Right Logically
Left Logically
Bcc {imm} Branch
cc A
VF
NZ
Z
ZP
N
P
ZN
NI
NO
NC
C
GE
LT
GT
LE
Always
on oVerFlow
on Not Zero
on Zero
on Zero or Positive
on Negative
on Positive
on Zero or Negative
on No Input
on No Output
on No Carry
on Carry
on Greater than or Equal
on Less Than
on Greater Than
on Less than or Equal

Instruction Set

Abbreviation Instruction code (First) B' (Second) Instruction Function Overview
NOP 0 0 0 0 0 - - - No OPeration
HLT 0 0 0 0 1 - - - HaLT Halt
0 1 0 1 - - - - Unused (HLT)
OUT 0 0 0 1 0 - - - OUTput (ACC)→OBUF
IN 0 0 0 1 1 - - - INput (IBUF)→ACC
RCF 0 0 1 0 0 - - - Reset CF 0→CF
SCF 0 0 1 0 1 - - - Set CF 1→CF
Bcc 0 0 1 1 cc Branch cc If the condition is satisfied, B'→PC
Ssm 0 1 0 0 A 0 sm Shift sm (A)→shift, rotate→A
Overflowing bit→CF
Rsm 0 1 0 0 A 1 sm Rotate sm
LD 0 1 1 0 A B LoaD (B)→A
ST 0 1 1 1 A B STore (A)→B
SBC 1 0 0 0 A B SuBtract with Carry (A)-(B)-CF→A
ADC 1 0 0 1 A B ADd with Carry (A)+(B)+CF→A
SUB 1 0 1 0 A B SUBtract (A)-(B)→A
ADD 1 0 1 1 A B ADD (A)+(B)→A
EOR 1 1 0 0 A B Exclusive OR (A)⨁(B)→A
OR 1 1 0 1 A B OR (A)∨(B)→A
AND 1 1 1 0 A B AND (A)∧(B)→A
CMP 1 1 1 1 A B CoMPare (A)-(B)

A

B'

B

cc: Condition Code

Abbreviation Condition Code Function Overview
A 0 0 0 0 Always
VF 1 0 0 0 on oVerFlow
NZ 0 0 0 1 on Not Zero
Z 1 0 0 1 on Zero
ZP 0 0 1 0 on Zero or Positive
N 1 0 1 0 on Negative
P 0 0 1 1 on Positive
ZN 1 0 1 1 on Zero or Negative
NI 0 1 0 0 on No Input
NO 1 1 0 0 on No Output
NC 0 1 0 1 on Not Carry
C 1 1 0 1 on Carry
GE 0 1 1 0 on Greater than or Equal
LT 1 1 1 0 on Less Than
GT 0 1 1 1 on Greater Than
LE 1 1 1 1 on Less than or Equal

sm: Shift Mode

Abbreviation Condition Code Function Overview
RA 0 0 Right Arithmetically
LA 0 1 Left Arithmetically
RL 1 0 Right Logically
LL 1 1 Left Logically

Function of Shift and Rotate Instructions

MnemonicOutlineBit operations
SRAShift Right ArithmeticallyShift Right Arithmetically
SLA†Shift Left ArithmeticallyShift Left Arithmetically
SRLShift Right LogicallyShift Right Logically
SLL†Shift Left LogicallyShift Left Logically
RRARotate Right ArithmeticallyRotate Right Arithmetically
RLARotate Left ArithmeticallyRotate Left Arithmetically
RRLRotate Right LogicallyRotate Right Logically
RLLRotate Left LogicallyRotate Left Logically

† SLA and SLL instructions have different flag states after execution. (See Flag functions for details)


Flag Functions

CF: Carry Flag, VF: oVerflow Flag, NF: Negative Flag, ZF: Zero Flag

MnemonicOutline of instruction functions Effect on Execution Post-execution status
CFVFNFZF CFVFNFZF
NOPNo OPeration ---- ----
HLTHaLT ---- ----
OUTOUTput ---- ----
ININput ---- ----
RCFReset Carry Flag ---- 0---
SCFSet Carry Flag ---- 1---
SRAShift Right Arithmetically ---- b00NZ
SLAShift Left Arithmetically ---- b7VNZ
SRLShift Right Logically ---- b00NZ
SLLShift Left Logically ---- b70NZ
RRARotate Right Arithmetically b7--- b00NZ
RLARotate Left Arithmetically b0--- b7VNZ
RRLRotate Right Logically ---- b00NZ
RLLRotate Left Logically ---- b70NZ
LDLoaD ---- ----
STSTore ---- ----
SBCSuBtract with Carry c--- CVNZ
ADCADd with Carry c--- CVNZ
SUBSUBtract ---- -VNZ
ADDADD ---- -VNZ
EORExclusive OR ---- -0NZ
OROR ---- -0NZ
ANDAND ---- -0NZ
CMPCoMPare ---- -VNZ
BABranch Always ---- ----
BVFBranch on oVerFlow -VF-- ----
BNZBranch on Not Zero ---
ZF
----
BZBranch on Zero ---ZF ----
BZPBranch on Zero or Positive --
NF
- ----
BNBranch on Negative --NF- ----
BPBranch on Positive --
NF∨ZF
----
BZNBranch on Zero or Negative --NF∨ZF ----
BNIBranch on No Input ---- ----
BNOBranch on No Output ---- ----
BNCBranch on Not Carry
CF
--- ----
BCBranch on Carry CF--- ----
BGEBranch on Greater than or Equal -
VF⨁NF
- ----
BLTBranch on Less Than -VF⨁NF- ----
BGTBranch on Greater Than -
(VF⨁NF)∨ZF
----
BLEBranch on Less than or Equal -(VF⨁NF)∨ZF ----

Effect on Execution†

Post-execution status‡


Quick Instruction Code Chart

Assignment and arithmetic instructions for ACC
ACC IX d [d] (d) [IX+d] (IX+d)
LD ACC, 60 61 62 64 65 66 67
ST ACC, - - - 74 75 76 77
SBC ACC, 80 81 82 84 85 86 87
ADC ACC, 90 91 92 94 95 96 97
SUB ACC, A0 A1 A2 A4 A5 A6 A7
ADD ACC, B0 B1 B2 B4 B5 B6 B7
EOR ACC, C0 C1 C2 C4 C5 C6 C7
OR ACC, D0 D1 D2 D4 D5 D6 D7
AND ACC, E0 E1 E2 E4 E5 E6 E7
CMP ACC, F0 F1 F2 F4 F5 F6 F7

Assignment and arithmetic instructions for IX
ACC IX d [d] (d) [IX+d] (IX+d)
LD IX, 68 69 6A 6C 6D 6E 6F
ST IX, - - - 7C 7D 7E 7F
SBC IX, 88 89 8A 8C 8D 8E 8F
ADC IX, 98 99 9A 9C 9D 9E 9F
SUB IX, A8 A9 AA AC AD AE AF
ADD IX, B8 B9 BA BC BD BE BF
EOR IX, C8 C9 CA CC CD CE CF
OR IX, D8 D9 DA DC DD DE DF
AND IX, E8 E9 EA EC ED EE EF
CMP IX, F8 F9 FA FC FD FE FF

Shift Instructions
ACC IX
SRA 40 48
SLA 41 49
SRL 42 4A
SLL 43 4B
RRA 44 4C
RLA 45 4D
RRL 46 4E
RLL 47 4F

Branch Instructions
BA 30
BVF 38
BNZ 31
BZP 32
BP 33
BNI 34
BNC 35
BGE 36
BGT 37
BZ 39
BN 3A
BZN 3B
BNO 3C
BC 3D
BLT 3E
BLE 3F

Control Instructions
NOP 00
HLT 0F
OUT 10
IN 1F
RCF 20
SCF 2F

KUE-CHIP2 Simulator JAVA

The KUE-CHIP2 educational board is very useful for understanding the operation of the processor. However, the user interface is mainly limited to a few buttons and switches and two types of 7-segment displays.

It is not easy to input programs, display data, and check program operation with such an interface. We improved this point by simulating the KUE-CHIP2 instruction set in software, and added the following functions that are difficult to realize in hardware.

The simulator is written as a Java applet. Therefore, the simulator can be used by anyone with a Java-compatible browser at any time via the Internet, independent of the user's computer environment. The simulator can be used by anyone with a Java-compatible browser, independent of the user's computer environment. In addition, because it is a Java applet, the load on a particular server can be reduced.


Back to the KUE-CHIP2 Simulator JAVA page