BLOAD

Top  Previous  Next

Action

Writes the Content of a File into SRAM

 

 

Syntax

BLoad sFileName, wSRAMPointer

 

 

Remarks

sFileName

(String) Name of the File to be read

wSRAMPointer

(Word) Variable, which holds the SRAM Address to which the content of the file should be written

 

This function writes the content of a file to a desired space in SRAM. A free handle is needed for this function.

 

 

 

See also

INITFILESYSTEM , OPEN , CLOSE, FLUSH , PRINT, LINE INPUT, LOC, LOF , EOF , FREEFILE , FILEATTR , SEEK , BSAVE , KILL , DISKFREE , DISKSIZE , GET , PUT , FILEDATE , FILETIME , FILEDATETIME , DIR , FILELEN , WRITE , INPUT

 

 

 

ASM

Calls

_BLoad

 

Input

X: Pointer to string with filename

Z: Pointer to Long-variable, which holds the start position of SRAM

Output

r25: Errorcode

C-Flag: Set on Error

 

 

Example

' THIS IS A CODE FRAGMENT, it needs AVR-DOS in order to work

'now the good old bsave and bload

Dim Ar(100)as Byte , I Asbyte

For I = 1 To 100

Ar(i) = I                                                 ' fill the array

Next

 

Wait 2

 

W = Varptr(ar(1))

Bsave"josef.img", W , 100

For I = 1 To 100

Ar(i) = 0                                                 ' reset the array

Next

 

Bload "josef.img" , W                                       ' Josef you are amazing !

 

For I = 1 To 10

Print Ar(i) ; " ";

Next

Print