Summary
Ring-shifts the memory data in blocks.
Performs ring-shift between the start and ending addresses in block units (by the specified number of words). When an error occurs, the error status is written to LS9150.
Format
memring ([Start Address], [End Address], Words in 1 Block)
Parameter 1: Internal Device
Parameter 2: Internal Device
Parameter 3: Numeric Value (1 to 640)
When Parameter 1 is less than Parameter 2 (P1 < P2), the block data is shifted upward.
When Parameter 1 is greater than Parameter 2 (P1 > P2), the block data is shifted downward.
Make sure that the Start Address and End Address are set to the same type of device (LS or USR).
Example expression 1:
memring ([w:[#INTERNAL]LS1000], [w:[#INTERNAL]LS1030], 10)
(When Parameter 1 is less than Parameter 2 (P1 < P2))
Data moves upward in 10-word block units.
Example expression 2:
memring ([w:[#INTERNAL]LS1030], [w:[#INTERNAL]LS1000], 10)
(When Parameter 1 is greater than Parameter 2 (P1 > P2))
Data moves downward in 10-word block units.
Example expression 3:
memring ([w:[#INTERNAL]LS1000], [w:[#INTERNAL]LS1050], 10)
(When the range contains a block where all words are "0")
Data moves upward in 10-word block units only, from the starting block to the block with "0" data. If data exists after the block with "0" data, the data is ignored.
Example expression 4:
memring ([w:[#INTERNAL]LS1050], [w:[#INTERNAL]LS1000], 10)
(When a block with "0" data exists within the range)
Data moves downward in 10-word block units only, from the starting block to the block with "0" data. If data exists after the block with "0" data, the data is ignored.
Error Status
Editor Function Name |
LS Area |
Error Status |
Cause |
memring ( ) |
LS9150 |
0000h |
Completed Successfully |
0001h |
Parameter error |
||
0003h |
Write/Read error |
The processing time required is proportional to the range designated by the start and end addresses. The larger the designated range, the longer the processing time becomes. The Part is not refreshed until processing is completed.
The effective LS address range that can be specified is limited to the designated user area (LS20 to LS2031 and LS2096 to LS8191).