Mitsubishi Electronics FXCPU Video Game Controller User Manual


 
26 Applied Instructions (Character String Control)
26.7 MIDR / Random Selection of Character Strings
641
FXCPU Structured Programming Manual
[Basic & Applied Instruction]
21
Applied Instructions
(Real Time
Clock Control)
22
Applied Instructions
(External Device)
23
Applied Instructions
(Extension
Function)
24
Applied Instructions
(Others)
25
Applied Instructions
(Block Data
Operation)
26
Applied Instructions
(Character
String Control)
27
Applied Instructions
(Data Operation 3)
28
Applied Instructions
(Data Comparison)
29
Applied Instructions
(Data Table
Operation)
30
Applied Instructions
(External Device
Communication)
Function and operation explanation
1. 16-bit operation (MIDR/MIDRP)
" + 1" characters are extracted leftward from the position specified by of the character string data
stored in the device specified by and later, and stored to the device specified by and later.
When characters are extracted from a character string, "00H" is automatically added at the end of the
extracted characters.
1) When the number of extracted characters of the device specified by " +1" is odd, "00H" is stored in
the high-order byte of a device storing the last character.
2) When the number of extracted characters of the device specified by " + 1" is even, "0000H" is stored
in the device after the last character.
a) A character string specified by indicates data stored in devices from the specified device until
"00H" is first detected in units of byte.
b) When the number of characters to be extracted specified by " + 1" is "0", the extraction
processing is not executed.
c) When the number of characters to be extracted specified by " + 1" is "-1", the entire character
string specified by is stored to the device specified by and later.
46H(F) 45H(E)
48H(H) 47H(G)
49H(I)
48H(H)
46H(F) 45H(E)
47H(G)
49H(I)
5th character
+1
+2
+4
+3
+5
"ABCDEFGHIJK"
+1
+2
5 characters starting from 5th character
+1
42H(B) 41H(A)
44H(D) 43H(C)
4AH(J)
00H 4BH(K)
00H
"EFGHI"
+1
5
5
1st character
Target character string (extraction source)
Extracted character string
+0
+0
+0
ds1
s2
s2
b15 b8 b7 b0 b15 b8 b7 b0
s2
MIDR
EN ENO
d
s1
s2
Head device storing extracted
character string
Command
input
Head device storing a character string
Head device specifying the head position and number of
characters to be extracted
4AH(J) 49H(I)
48H(H)
46H(F) 45H(E)
47H(G)
4AH(J) 49H(I)
4BH(K)
46H(F) 45H(E)
48H(H) 47H(G)
4BH(K)
5th character position
+1
+2
+4
+3
+5
"ABCDEFGHIJK"
+1
+2
42H(B) 41H(A)
44H(D) 43H(C)
00H
"EFGHIJK"
+1
-1
5
00H
+3
+0
+0
+0
d
s1
s2
s2
b15 b8 b7 b0 b15 b8 b7 b0