Brief
An opcode is a specific function that belongs to a category. Opcodes are represented in the form of an 8-bit (one byte) hexadecimal number in opcode mode, or in abbreviation form in "mnemonic mode".
The instruction set is published in six booklets:
- Basic Control & Jumps —
0x000x0F,0x410x44 - Register Operations —
0x100x21,0x2A0x2E,0x30,0x32 - Plotting —
0x55~0x5B - Sensors —
0xAD - Peripherals —
0xC00xD0,0xE10xE3,0xEB~0xEF - Lights & Music —
0xE4~0xE7,0xE8,0xFE
Program Line Format
Each line of code consists of five bytes: [inst] [P00] [P01] [P10] [P11]. On the programmer interface a line is displayed as:
LINE INST OP-0 OP-1
where LINE is the 3-digit hexadecimal line address, INST is the opcode (2 hex digits) or its mnemonic, OP-0 = P00+P01 and OP-1 = P10+P11 (each 4 hex digits).
Basic Units
| Label | Description | Range |
|---|---|---|
| P00 | First 8-bit operand byte | 00~FF |
| P01 | Second 8-bit operand byte | 00~FF |
| P10 | Third 8-bit operand byte | 00~FF |
| P11 | Fourth 8-bit operand byte | 00~FF |
Combined 16-bit Operands
| Label | Composition | Range |
|---|---|---|
| OP-0 | P00 + P01 combined as 16-bit | 0000~FFFF |
| OP-1 | P10 + P11 combined as 16-bit | 0000~FFFF |
Operand Interpretation Modes
Since instruction set v2, operands are interpreted in exactly three ways. Whenever a parameter is a 16-bit value, it is always annotated as P00P01 = 16-bit whole or P10P11 = 16-bit whole — never split it into two independent bytes.
Mode A — two 8-bit sub-operands + one 16-bit whole
| P00 | P01 | P10P11 |
|---|---|---|
00~FF | 00~FF | 0000~FFFF (whole) |
Typical: the jump family (0x04~0x0E, P10P11 = target line), 0x10 FZ (P10P11 = immediate value), 0x02/0x03 (P00P01 = time value, P10P11 = addressing + unit code).
Mode B — four independent 8-bit sub-operands
| P00 | P01 | P10 | P11 |
|---|---|---|---|
00~FF | 00~FF | 00~FF | 00~FF |
Typical: the plotting family (X/Y coordinates), 0xE4 CD (LED number + R/G/B).
Mode C — 16-bit whole + 16-bit whole
| P00P01 | P10P11 |
|---|---|
0000~FFFF (whole) | 0000~FFFF (whole) |
Typical: 0xE10xE3, 0xEB0xEF (channel bit-masks / duty cycles).
Don't-Care Operands
Some opcodes do not require operands, or certain operand bytes are ignored. These are marked "don't care" in the booklet tables.
Operands marked as "don't care" can be any value. For clarity and consistency, ignored operands are documented as 00 or 0000.
Unit Codes
The unit of a time value is selected by a unit code in P11, shared by 0x02 YS (delay) and 0x03 DS (timer):
| Code | 0 (default) | 1 | 2 | 3 | 4 | 0x10 |
|---|---|---|---|---|---|---|
| Time | 1 ms | 10 ms | 100 ms | 1 s | 10 s | 1 min |
Port System
The port system is shared by 0x0B TZ, 0x13 SS, 0x14 QS, 0x41 JT and 0x42 DK:
| Port | Pins | Direction | Description |
|---|---|---|---|
| Port0 | 00~06 | read-only | 7 onboard buttons |
| Port1 | 10~17 | bidirectional | 8 digital IO (LED network) — SS write restores the output direction, QS read switches to input with pull-up |
| Port2 | 20~23 | output | 4 IO/PWM shared pins |
| Port3 | 30~3F | read-only | ADS1115 16 channels (>2.5 V = 1 / millivolt values) |
| Port4~6 | 40~6F | write-only | PCA9685 modules 0/1/2, 16 channels each |
Pin addressing: one byte = port<<4 | pin, e.g. 0x14 = Port1 Pin4.