Difference between revisions of "83Plus:Software:usb8x/Asm Interface/MSD/MSD ImportVariable"
From WikiTI
m |
|||
Line 25: | Line 25: | ||
== Notes == | == Notes == | ||
− | |||
Example code to import "game.8xp" in the root directory to RAM: | Example code to import "game.8xp" in the root directory to RAM: | ||
<code> | <code> |
Revision as of 11:45, 17 August 2006
Synopsis
Name: MSD_ImportVariable
Minimum usb8x version: 0.10
Imports *.8x* file from specified directory and stores in RAM/Flash.
Inputs
- HL points to an ASCIIZ string of *.8x* file (path included)
- A is flags byte
Bit 0 | Set if existing variable should be deleted if duplicate is found; reset otherwise |
Bit 1 | Set if variable should be created in Flash; reset if in RAM |
Outputs
- Variable is created in RAM or Flash
- C set if problems
- Returns C set if duplicate variable was found
Destroys
- AF, BC, DE, HL
Notes
Example code to import "game.8xp" in the root directory to RAM:
ld hl,sFilename xor a ;do not overwrite existing variable and create in RAM U_CALL MSD_ImportVariable ... sFilename: DB "/game.8xp",0
If you are writing an application, you must copy the strings you use to RAM first, or else usb8x will not be able to see them.
See Also
- [[../MSD_ExportVariable|MSD_ExportVariable]] - Export variable in RAM/Flash to specified directory as *.8x* file