Difference between revisions of "Code:NextBasic Snippets"
From SpecNext official Wiki
(Created page with " '''NextBasic Snippets ''' To read a file of any type or size to any bank this will load myfile.bin to bank 22 (8kbs): <syntaxhighlight> .extract myfile.bin -mb 22 </syntaxh...") |
|||
Line 7: | Line 7: | ||
<syntaxhighlight> | <syntaxhighlight> | ||
.extract myfile.bin -mb 22 | .extract myfile.bin -mb 22 | ||
+ | </syntaxhighlight> | ||
+ | |||
+ | To get the filesize of a file in to var fsize: | ||
+ | |||
+ | <syntaxhighlight> | ||
+ | OPEN #4, "myfile" | ||
+ | DIM #4 TO %a | ||
+ | fsize=%a | ||
+ | CLOSE #4 | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 12:45, 11 December 2023
NextBasic Snippets
To read a file of any type or size to any bank this will load myfile.bin to bank 22 (8kbs):
.extract myfile.bin -mb 22
To get the filesize of a file in to var fsize:
OPEN #4, "myfile"
DIM #4 TO %a
fsize=%a
CLOSE #4