Delta AH500 — 6.21.2 Explanation of String Processing Instructions

Chapter 6 Applied Instructions S1 b15 b0 b7 b8 +1 S1 b15 b0 b7 b8 D +2 S1 +3 S1 After the instruction is executed +1 D +5 S1 +4 S1 10 Larger than the number of characters which can be deleted in the string in S1 4. If the value in S 2 is equal to 0, the instruction is not executed. S3 S2 3 Example: When M0 is ON, the data in D0~D3 is “1234567”. When the instruction $DEL is executed, the characters in D0~D3 starting from the character indicated by the value in D11 are deleted. The number of characters which are deleted is indicated by the value in D10, and the result is stored in D20~D22. If the values in D10 and D11 are 3 and 4 respectively, the execution result is as follows.

b15 b0 b7 b8 D1 D0 b15 b0 b7 b8 D20 D3 D2 D22 D21 After the instruction is executed D11 D10 3 4 If the values in D10 and D11 are 5 and 4 respectively, the execution result is as follows. Owing to the fact that the number of characters which are deleted exceeds the range, the characters in D0~D3 starting from the fourth character to the last character are deleted.

b15 b0 b7 b8 D1 D0 D2 After the instruction is executed D21 D20 D3 D10 5 Exceeding the range D11 4 6-491 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#36(6) 16#35(5) 16#38(8) 16#37(7) 16#30(0) 16#39(9) Ignored 16#00 16#32(2) 16#31(1) 16#0000 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#36(6) 16#35(5) 16#00 16#37(7) 16#32(2) 16#31(1) 16#37(7) 16#33(3) 16#00 16#32(2) 16#31(1) 16#34(4) 16#33(3) 16#36(6) 16#35(5) 16#00 16#37(7) 16#32(2) 16#31(1) 16#00 16#33(3)