Q-Code User Manual
Ver. 7.0 2021/11/30
157
[Subroutine]
SUB:PA=0xF, DELAY(0.5), PA=0x0, DELAY(0.5), PlayV(Ch1, $V1)
[Path]
TR1:SUB, PlayV(Ch1, $V2)
; After executing “SUB” subroutine, executePlayV($V2).
4.4.11 Label(Pathname)
User could use Label instead of ": " to set the path name for reducing the program segment in program.
Ex.
TR1: PlayV(Ch1, $V0), Label(Pathname), PlayV(Ch1, $V1) , Pathname
; After playing V0, play $V1 repeatedly.
The path above is equal to the following:
TR1: PlayV(Ch1, $V0), Label_Loop
; Play V0, and jump to path “Loop1”.
Label_Loop : PlayV(Ch1, $V1) , Label_Loop
; Play $V1 repeatedly.
4.4.12 Macro
User can name and define a snippet of
Q-Code
command in
[Macro]
. A named snippet of commands
is a macro. User can place macro name in
Q-Code
program.
Q-Code
compiler will expand the content
of macro whenever macro name is met at compiling time.
Ex.
Use macro name when defining a path.
[Macro]
MAC: PA=0xF, Delay(0.166)
[Path]
TR1: MAC, PlayV(Ch1, $V1)
; After executing “MAC” macro, execute
PlayV($V1).
4.4.13 1ms_RET
Return to
1ms path.
Note:
1. NY4 / NY5 / NY5+ / NY6 / NY7 / NX1 do not support this command.
2. After executing 1ms path, must execute 1ms_RET command. Otherwise, there will be
unexpected system error.
3. If TimeBase=4ms, 1ms path will not be executed.
Ex.
[Option]
TimeBase
= 1ms