Difference between revisions of "83Plus:Software:usb8x/BASIC Interface/ExportVariable"
m |
m (Fixed both MSDInit links) |
||
(One intermediate revision by one other user not shown) | |||
Line 15: | Line 15: | ||
== Notes == | == Notes == | ||
− | Be sure to initialize the mass storage driver with [[ | + | Be sure to initialize the mass storage driver with [[83Plus:Software:usb8x/BASIC_Interface/MSDInit|MSDInit]] before calling this entry point. |
This entry point will fail if a *.8x* file of the same name is already in the specified directory. | This entry point will fail if a *.8x* file of the same name is already in the specified directory. | ||
Line 32: | Line 32: | ||
To send prgmGAME to the "test" directory, use the following for the string: | To send prgmGAME to the "test" directory, use the following for the string: | ||
<code> | <code> | ||
− | "prgmGAME:/ | + | "prgmGAME:/TEST" |
</code> | </code> | ||
Line 39: | Line 39: | ||
"ABC:/" | "ABC:/" | ||
</code> | </code> | ||
+ | |||
+ | Do not enter lowercase letters in the string. | ||
== Example == | == Example == | ||
Line 52: | Line 54: | ||
== See Also == | == See Also == | ||
− | [[ | + | [[83Plus:Software:usb8x/BASIC_Interface/MSDInit|MSDInit]] - Initialize the mass storage driver |
Latest revision as of 15:26, 9 November 2009
Synopsis
Name: ExportVariable
Function Number: 9
Minimum usb8x version: 0.10
Exports variable from RAM or Flash to specified directory as *.8x* file.
Inputs
- 2: String variable to use (Str1-0)
Outputs
- 1: Error code (0 = success)
Notes
Be sure to initialize the mass storage driver with MSDInit before calling this entry point.
This entry point will fail if a *.8x* file of the same name is already in the specified directory.
You have your choice of Str1-Str0 to use with this function. Pass this number as the second element in Ans.
String Format
The variable to export starts the string. It is the token for the variable you want to transfer. This means you must select this variable from a menu instead of typing it yourself (for example, selecting "Str9" from the VARS menu, not typing 'S', 't', 'r', '9'). A colon follows this, and finally the path to export the variable to.
For example, to send matrix A to the root directory, use the following for the string:
"[A]:/"
The "[A]
" was selected from the [2nd]+[MATRX] menu.
To send prgmGAME to the "test" directory, use the following for the string:
"prgmGAME:/TEST"
To send a REAL variable or AppVar, simply enter the string. If a REAL variable and AppVar have the same name, it will send the REAL variable. To send AppVar ABC to the root directory:
"ABC:/"
Do not enter lowercase letters in the string.
Example
The following code will export ZTETRIS to the root directory:
OpenLib(USBDRV8X {7 ExecLib ;initialize mass storage driver "prgmZTETRIS:/->Str1 {9,1 ExecLib ;export variable in Str1
See Also
MSDInit - Initialize the mass storage driver