Q-Code User Manual
Ver. 7.0 2021/11/30
109
[QIO Custom]
{
; Start QIO process.
QIOF_CLR
; Clear QIO flag.
LOAD_QIO_ADDR
; Load QIO TABLE.
rbro
0
; Read QIO data.
@@QIO_DATA_CHECK:
mvma
rod2
; Check Wave Mark or QIO.
andl
b'0001'
; Mask QIO data.
caje
0x1,@@check_wavemark
; If is Wave Mark, process it.
if (QIO_Custom_Signal >= 8)
; Judge QIO file signal channel >= 8 or not.
rbro
1
; Read QIO data[3:0] and QIO Table 1.
mpg
pa_page
; Set RAM page of PA state register.
mvam
pa_state
; Save QIO data[3:0] to PA state register.
mvat
pa
; Output QIO data[3:0] to PA.
mvma
rod1
; Read QIO data[7:4] to ACC.
mpg
pb_page
; Set RAM pageof PB state register.
mvam
pb_state
; Save QIO data[7:4] to PB state register.
mvat
pb
; Output QIO data[7:4] to PB.
endif
if (QIO_Custom_Signal >= 16)
; Judge QIO file signal channel >= 16or not.
rbro
1
; Read QIO data[3:0] and QIO Table 1.
mpg
pc_page
; Save RAM page of PC state register.
mvam
pc_state
; Save QIO data[3:0] to PC state register.
mvat
pc
; Output QIO data[3:0] to PC.
mvma
rod1
; Read QIO data[7:4] to ACC.
mpg
pd_page
; Set RAM page of PD state register.
mvam
pd_state
; Save QIO data[7:4] to PD state register.
mvat
pd
; Output QIO data[7:4] to PD.
endif
if (QIO_Custom_Signal >=24)
; Judge QIO file signal channel >= 24
rbro
1
; Read QIO data[3:0] and QIO Table 1.
mpg
pe_page
; Set RAM page of PE state register.
mvam
pe_state
; Save QIO data[3:0] to PE state register.
mvat
pe
; Output QIO data[3:0] to PE.
mvma
rod1
; Read QIO data[7:4] to ACC.
mpg
pf_page
; Set RAM page of PF state register.