Drawing & Display
Instructions in this category draw graphics and output numbers or text on the display.
Every coordinate is an 8-bit value (00~FF), written in hexadecimal in the program. Coordinates are shifted by an offset and converted by the MCU into commands for the main screen. Shapes are drawn with the pen color taken from the drawing-color register, and the text background follows the background-color register.
0x55 Display Number (SC)
Display the value of a register at the given position, formatted as a decimal number with optional decimal places.
- Instruction Form
- Mnemonic Form
000 10 000A 0064 R10 = 100
001 55 280A 0A01 show R10 at (40,10) with 1 decimal place
000 FZ 000A 0064 R10 = 100
001 SC 280A 0A01 show R10 at (40,10) with 1 decimal place
The value is divided by 10ⁿ before display: with one decimal place, 100 is shown as 10.0.
| Operands | Value/Range | Remark |
|---|---|---|
| OP-00 | 00~FF | X coordinate |
| OP-01 | 00~FF | Y coordinate |
| OP-10 | 00~FF | Source register holding the value |
| OP-11 | 00~FF | Low 4 bits: number of decimal places n (displayed as value/10ⁿ); high 4 bits: fixed display length |
The format of OP-11 (decimal places / fixed length) is pending on-hardware verification.
0x56 Display Text (WZ)
Display ASCII characters read from consecutive memory starting at a register.
- Instruction Form
- Mnemonic Form
000 10 0014 4849 R20 = "HI" (48 49 hex)
001 56 0000 1402 show 2 chars from R20 at (0,0)
000 FZ 0014 4849 R20 = "HI" (48 49 hex)
001 WZ 0000 1402 show 2 chars from R20 at (0,0)
Characters are read byte by byte starting at the register given in OP-10: high byte of R[n], low byte of R[n], high byte of R[n+1], and so on. In the example, H (48) is stored in the high byte and I (49) in the low byte of R20.
| Operands | Value/Range | Remark |
|---|---|---|
| OP-00 | 00~FF | X coordinate |
| OP-01 | 00~FF | Y coordinate |
| OP-10 | 00~FF | Starting register number |
| OP-11 | 01~10 | Number of characters, at most 16 |
0x57 Draw Circle (YX)
Draw a hollow circle with the specified center and radius.
- Instruction Form
- Mnemonic Form
000 57 7070 0A00 hollow circle, center (112,112), radius 10
000 YX 7070 0A00 hollow circle, center (112,112), radius 10
| Operands | Value/Range | Remark |
|---|---|---|
| OP-00 | 00~FF | Circle center X coordinate |
| OP-01 | 00~FF | Circle center Y coordinate |
| OP-10 | 00~FF | Radius |
| OP-11 | 00 | Ignored |
0x58 Draw Filled Circle (YXTC)
Draw a filled circle with the specified center and radius.
- Instruction Form
- Mnemonic Form
000 58 7070 0A00 filled circle, center (112,112), radius 10
000 YXTC 7070 0A00 filled circle, center (112,112), radius 10
| Operands | Value/Range | Remark |
|---|---|---|
| OP-00 | 00~FF | Circle center X coordinate |
| OP-01 | 00~FF | Circle center Y coordinate |
| OP-10 | 00~FF | Radius |
| OP-11 | 00 | Ignored |
0x59 Draw Rectangle (JX)
Draw a hollow rectangle with the specified diagonal vertices.
- Instruction Form
- Mnemonic Form
000 59 3030 5580 hollow rectangle, (48,48) to (85,128)
000 JX 3030 5580 hollow rectangle, (48,48) to (85,128)
| Operands | Value/Range | Remark |
|---|---|---|
| OP-00 | 00~FF | Vertex X0 coordinate |
| OP-01 | 00~FF | Vertex Y0 coordinate |
| OP-10 | 00~FF | Vertex X1 coordinate |
| OP-11 | 00~FF | Vertex Y1 coordinate |
0x5A Draw Filled Rectangle (JXTC)
Draw a filled rectangle with the specified diagonal vertices.
- Instruction Form
- Mnemonic Form
000 5A 1010 2020 filled rectangle, (16,16) to (32,32)
000 JXTC 1010 2020 filled rectangle, (16,16) to (32,32)
The width of the rectangle is x1−x0 and the height is y1−y0.
| Operands | Value/Range | Remark |
|---|---|---|
| OP-00 | 00~FF | Vertex X0 coordinate |
| OP-01 | 00~FF | Vertex Y0 coordinate |
| OP-10 | 00~FF | Vertex X1 coordinate |
| OP-11 | 00~FF | Vertex Y1 coordinate |
0x5B Draw Line (HX)
Draw a straight line between two specified points.
- Instruction Form
- Mnemonic Form
000 5B 6060 2020 line from (96,96) to (32,32)
000 HX 6060 2020 line from (96,96) to (32,32)
| Operands | Value/Range | Remark |
|---|---|---|
| OP-00 | 00~FF | Endpoint 1 X coordinate |
| OP-01 | 00~FF | Endpoint 1 Y coordinate |
| OP-10 | 00~FF | Endpoint 2 X coordinate |
| OP-11 | 00~FF | Endpoint 2 Y coordinate |