Q-Code User Manual
Ver. 7.0 2021/11/30
102
[0x4, 0x5, 0x3F6, 0x8, 0x10],
[0x0F, 0x1C, 0x2, 0x3, 0xF4]
}
[Path]
P1: R0=2, R1=1, TableL(Trans,R0,R1,R2)
; R2 = 0x6.
P2: R0=2, R1=1, TableM(Trans,R0,R1,R2)
; R2 = 0xF.
P3: R0=2, R1=1, TableH(Trans,R0,R1,R2)
; R2 = 0x3.
Table command:
Table { Return_Type } (Table_Name, Col_Index, Row_Index, Return_Reg)
ReturnType:
{L, M, H}
; L: obtain data[3:0], M: obtain data[7:4], H: obtain
data[11:8].
Table_Name:
{name of Table}
Col_Index:
{Constant or RAM}
; Constant: 0 ~ 15, RAM: User RAM.
Row_Index:
{Constant or RAM}
; Constant: 0 ~ 15, RAM: User RAM.
Return_Reg:
{RAM}
Note:
1. The table matrix must be filled, or Q-Code will automatically fill empty address with 0.
2. “0” will be read if address exceeds the size of array.
3.9.22 ASM
Sometimes during the development of certain project, the accuracy and efficiency of timing control of
Q-Code
might not meet user’s demand because it is a simple high level language. In this case, instead
of re-composing the whole program with assembly language, user can consider directly composing
certain subroutines in
[ASM]
section to meet the demand. The subroutines composed with assembly
language in
[ASM]
section can be directly called in
[Path]
,
[Background1]
and
[Background2]
sections.
Note: NX1 does not support ASM section.
Due to the fact that these assembly subroutines are using different syntax from
Q-Code,
it is required
to program the name of the assembly subroutine, “{”, “}”and each instruction of assembly language at
an independent line.
Syntax:
[ASM]
Name
{
...
assembly code