133
File Memory Instructions
Section 3-24
3-24 File Memory Instructions
Instruction
Mnemonic
Code
Symbol/Operand
Function
Location
Execution
condition
READ DATA FILE
FREAD
@FREAD
700
Output
Required
WRITE DATA
FILE
FWRIT
@FWRIT
701
Output
Required
C: Control word
S1: 1st source
word
S2: Filename
D: 1st destination
word
FREAD(700)
C
S1
S2
D
Memory Card or EM file memory
(Specified by the 4
th
digit of C.)
File specified
in S2
CPU Unit
Number of
words
Number
of words
written
to D and
D+1.
Reads the specified data or amount of data from the specified data file in file
memory to the specified data area in the CPU Unit.
Memory Card or
EM file memory
(Specified by the
4
th
digit of C.)
Starting read address
specified in S1+2 and
S1+3
File specified
in S2
CPU Unit
Number of
words specified
in S1 and S1+1
D
C: Control word
D1: 1st
destination word
D2: Filename
S: 1st source
word
FWRIT(701)
C
D1
D2
S
Memory Card or EM file memory
(Specified by the 4
th
digit of C.)
File specified in D2
CPU Unit
Starting word
specified in
D1+2 and
D1+3
Number of
words specified
in D1 and D1+1
Overwrite
Starting
address
specified
in S
Memory Card or EM file memory
(Specified by the 4
th
digit of C.)
File specified in D2
CPU Unit
End of
file
Number of
words specified
in D1 and D1+1
Append
Starting
address
specified
in S
Existing
data
Memory Card or EM file memory
(Specified by the 4
th
digit of C.)
File speci-
fied in D2
CPU Unit
Beginning
of file
Number of words
specified in D1
and D1+1
Starting
address
specified
in S
New file created
Overwrites or appends data in the specified data file in file memory with the
specified data from the data area in the CPU Unit. If the specified file doesn't
exist, a new file is created with that filename.
Summary of Contents for CJ1G-CPU series
Page 3: ...iv...
Page 5: ...vi...
Page 21: ...xxii Conformance to EC Directives 6...
Page 169: ...148 Task Control Instructions Section 3 32...
Page 203: ...182 Programming Device Operations for Tasks Section 4 4...
Page 253: ...232 Using File Memory Section 5 3...
Page 337: ...316 Other Functions Section 6 11...
Page 347: ......
Page 369: ......
Page 373: ......
Page 379: ......
Page 381: ...360 Revision History...