Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
26 Applied Instructions (Character String Control)
26.8 MIDW / Random Replacement of Character Strings
644
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
Function and operation explanation
1. 16-bit operation (MIDW/MIDWP)
Character data specified by " + 1" are extracted from the left end (that is, the head) of the character string
data stored in the device specified by and later, and stored to the position specified by and later of
the character string data stored in the device specified by and later.
1) The character string specified by or indicates data stored in devices from the specified device
until "00H" is first detected in byte units.
2) When the number of characters to be overwritten specified by " + 1" is "0", the overwriting processing
is not executed.
3) When the number of characters to be overwritten specified by " + 1" exceeds the last character of the
character string stored in the device specified by and later, data is stored up to the last character.
+1
+2
+4
+3
+1
+0
+0
s2
s1
48H(H) 47H(G)
35H(5) 34H(4)
31H(1) 30H(0)
32H(2)
31H(1) 30H(0)
33H(3) 32H(2)
35H(5) 34H(4)
"012345678"
+1
+2
37H(7) 36H(6)
00H 38H(8)
42H(B) 41H(A)
44H(D) 43H(C)
46H(F) 45H(E)
"ABCDEFGHI"
6
3
Position from the left end in the character string
stored in and later
Number of characters from the left end in the
character string stored in and later
+3
+4
00H 49H(I)
Before execution
+1
+2
42H(B) 41H(A)
33H(3)
"AB012345I"
+3
+4
00H 49H(I)
After execution
1st
character
3rd
characte
r
3rd
characte
r
6th character
1st
characte
r
Six characters starting from 3rd character
(overwritten character string)
+0
+0
d
s1
d
d
b15 b8 b7 b0 b15 b8 b7 b0
b15 b8 b7 b0
MIDW
EN ENO
d
s1
s2
Command
input
Head device storing a character string used in overwriting
Head device specifying the head position and number of
characters to be overwritten
Head device storing a character
string overwritte
34H(4)
33H(3)
46H(F) 45H(E)
48H(H) 47H(G)
49H(I)
31H(1) 30H(0)
32H(2)
31H(1) 30H(0)
33H(3) 32H(2)
37H(7)
35H(5) 34H(4)
36H(6)
+1
+2
+4
+3
"012345678"
+1
+2
00H 38H(8)
42H(B) 41H(A)
44H(D) 43H(C)
"ABCDEFGHI"
+1
8
5
+3
+4
00H
Before execution
+1
+2
42H(B) 41H(A)
44H(D) 43H(C)
"ABCD01234"
+3
+4
00H
Characters from the 5th character to the last character are overwritten.
Excessive characters, "35H (5)" to "37H (7)", are not stored.
1st
character
5th
characte
r
5th
characte
r
8th character
+0
+0
+0
+0
s1 d
d
s2
Number of characters from the left end in
the character string stored in
and later
s1
Position from the left end in the
character string stored in and later
d
b15 b8 b7 b0 b15 b8 b7 b0
b15 b8 b7 b0
After execution