Kaiyi — 6.21.2 Explanation of String Processing Instructions

AH500 Programming Manual S 1 b15 b0 b7 b8 b0 b7 b8 D +1 S1 b15 +2 S1 S +3 1 Afte is ex r th nstru on ec d e i ute cti +1 D S S +5 1 +4 1 1 0 Lar tha he numbe ha s wh can del in str n S ger n t r of c racter ich be eted the ing i 1 4 2 ction is not executed. S S 3 2 3 . If the value in S is equal to 0, the instru Example: is ON, the data in D0~D3 is “1234567”. When the instruction $DEL is executed, the 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.

When M0 characters If the values in D10 and D11 are 3 and 4 respectively, the execution result is as follows. b15 b0 b7 b8 D0 D1 b15 b0 b7 b8 D20 D3 D2 D22 D21 After the instruction is executed D11 D10 3 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.

4 b15 b0 b7 b8 D0 D1 b15 b0 b7 b8 D2 After the instruction is executed D21 D20 D3 D10 5 Exceeding the range D11 4 6-495 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)