
B–61803E–1/10
6. FUNCTIONS OF THE MACRO
EXECUTOR
PROGRAMMING
93
If control code G339 is specified, the directory information on a memory
card can be read or deleted.
To use this function, open the memory card in the directory information
control mode. The directory information control mode is selected by
specifying address P34 when opening the memory card. On this occasion,
no file should be specified.
(1) Reading directory information (G339 P1)
G339 P1 Ff Ll Ss ;
(a) (b) (c) (d)
(a) G339 P1 reads file directory information into specified variables.
(b) Address F specifies the number (1 to 9999) of the file of which
directory information is read.
(c) Address L specifies the head variable number of a 12–variable
string which contains the read file name (12 characters). Each
character of the file name is set as a decimalized ASCII code.
(d) Address S specifies the number of the variable that stores the size
of the read file.
If the directory of the specified file is not found, end code 114 is
returned.
(Example)
G330 P34 ; Opened in the directory information control mode
G339 P1 F1 L100 S110 ; Directory information read
IF [#8539 NE 0] GOTO100 ;
End of reading
G331 ; Memory card closed
GOTO200 ;
N100 Error ;
N200 Next processing ;
(2) Deleting a file (G339 P2)
G339 P2 (Ll/Ff) ;
(a) (b)
(a) G339 P2 deletes a specified file.
(b) Specify address L or F. Address L specifies the head variable
number of the variable string containing the name (ASCII code)
of the file to be deleted. Address F specifies the number of the
file to be deleted.
When a file is deleted, the file numbers of subsequent files are
decremented. Note this change when specifying the number of the
file to be deleted.
(Example)
G330 P34 ; Opened in the directory information control mode
G339 P2 ; File deleted
IF [#8539 NE 0] GOTO100 ;
End of reading
G331 ; Memory card closed
N100 Errorn ;
N200 Next processing ;
6.5.2.7
Controlling Directory
Information (G339)