I have a problem trying to use the DATA statement.
The application consist to include in a single EXE file
an EEPROM source loader for an industrial target device.
The size of the PROM source file (intelhex format)
is about 100ko and consist in about 2000 lines.
I try to include the file in the program with DATA statement
but an error occurs while compiling it.
The source file is divided in few differents sections of about 30ko of data
because-> "There is a limit of 64k of DATA statements per Sub or Function."
dixit online help.
in the following example 1 data page of 30ko could be compiled (loadmap1() only)
but not more
What do I wrong ?
**** CODE SAMPLE ******
'1st page of data
FUNCTION loadmap1() AS LONG
DIM i AS LONG
DIM r AS LONG
FUNCTION=0
FOR i=1 TO DATACOUNT
'here a function to read data and send to device (r=func(...))
NEXT
DATA ":0200000400FFFB"
DATA ":022032008D9689"
DATA ":0200000400FEFC"
DATA ":10FE9400435553540055534552005454455400445B"
DATA ":10FEA4004D545600303132333435363738394142C7"
.... ABOUT 30KO (in term of string size -> :10FEA4004D545600303132333435363738394142C7)
.... I mean sum of bytes
DATA ":10FED40032202033202034202035202036202037A3"
DATA ":10FEE4002020382020392020412020422020432077"
DATA ":10FEF40020442020452020462020204153434949C6"
END FUNCTION
' 2nd page of data
FUNCTION loadmap2() AS LONG
DIM i AS LONG
DIM r AS LONG
FUNCTION=0
FOR i=1 TO DATACOUNT
'here a function to read data and send to device (r=func(...))
NEXT
DATA ":10FEA4004D545600303132333435363738394142C7"
....
DATA ":10FEF40020442020452020462020204153434949C6"
END FUNCTION
Comment