High−level Instructions
3 − 229
Application example
In combination with the F98 (CMPR)/P98 (PCMPR) instruction, this can be used to construct an optional
buffer.
(1) Executing the F99 (CMPW)/P99 (PCMPW) instruction
When data items are written to the first address of the buffer (the area of the specified range), they
are stored and accumulated in the buffer in sequential order. The oldest data will be stored in the
last address of the buffer.
0
0
0
31
44
555
31
0
11
Specified
data range
F99 (CMPW)
execution
(2) Executing the F98 (CMPR)/P98 (PCMPR) instruction
When the data in the last address of the buffer (the area of the specified range) has been read, data
can be extracted in sequential order, starting from the oldest data.
The rest of the data in the buffer is shifted in the direction of the first address, so normally, the oldest
data at that point is stored in the last address of the buffer.
11
0
0
0
44
555
(11)
31
0
0
0
31
44
(555)
0
555
F99 (CMPW)
execution
This can be used to extract valid non−zero data from the data written in random order.
0
0
0
112
131
12
S
0
D1
D2
12
0
0
131
112
0
31
Effective data
Executing the F99 (CMPW) instruction causes only the valid data to be stored.