CARD_CREATE
Syntax |
CARD_CREATE card,size,filename$ |
Location |
SMSQ/E for Q68 |
Creates a new file on an SD card that is size MB in size with the name given by $filename.
Being a complex comand, it can return many different errors depending on what has gone wrong.
Error |
Num |
Description |
err.drfl |
-1 |
|
err.imem |
-3 |
|
err.orng |
-4 |
|
err.bffl |
-5 |
|
err.fex |
-8 |
|
err.inam |
-12 |
|
err.ipar |
-15 |
|
err.mchk |
-16 |
|
Example
10 CARD_CREATE 1,200,"test.win" : REMark create empty file, 200 MB in size
20 WIN_DRIVE 4,1,"test.win" : REMark point win4_ to it
30 WIN_FORMAT 4 : REMark allow formatting of win4_
40 FORMAT win4_name : REMark format win4_
Note 1
There must be an empty slot in the first 16 entries of the FAT32 volume and the file name must obey the “8.3 rule”.
Note 2
The file is not zeroed out and may contain random data.
Note 3
The maximum file size is dependant on the cluster size for the FAT32 volume.
Cluster size |
Max file size |
2 |
just under 8 GB |
4 |
just under 16 GB |
8 |
just under 32 GB |
Note 4
SMSQ/E only checks the first 16 entries. If there are more than 16 and an empty entry exists in the first 16, if may be possible to create an duplicate entry with the name of an existing file.
CROSS-REFERENCE